Home > Mobile > Questions about tablewidget and tabwidget in QT
Questions about tablewidget and tabwidget in QT
Time:10-11
Have A, B, C three Windows, there is A window in the window A tabwidget controls B (including buttons and tablewidget), click on the button pop-up window C, input data to insert in the window of tablewidget B, test data into A success (mysql connection) but tablewidget display data is not updated, how to solve
CodePudding user response:
CodePudding user response:
When you insert the data need beginInsertRows (QModelIndex (), 0, 0). M_dataLst. Insert (0, data); endInsertRows ();
Or all of the refresh (in the case of large amount of data will flash) BeginResetModel (); M_dataLst. Insert (0, data); EndResetModel ();