Display some data after uploading csv file
-
Hello ,
Currently , i upload a csv file and i display all the data in a tablewidget .
i want to display some line of my loaded csv file in another tablewidget .
How to do this
thank you@dziko147 said in Display some data after uploading csv file:
Currently , i upload a csv file and i display all the data in a tablewidget .
i want to display some line of my loaded csv file in another tablewidget .The same way as however you say you currently do it? Copy whatever data you want from one
QTableWidgetto another. -
thanks for your reply , but when you use this solution you must reload the file .
What i want is loading the file for only one time then display some lines on another tablewidget .
I hopeb that my question is clear :) -
in the header
private: QSortFilterProxyModel *m_filterProxy; QTableView* m_secondTable;in the source
m_filterProxy = new QSortFilterProxyModel(this); m_filterProxy->setSourceModel(tableWidget.model()); m_filterProxy->setFilterRegularExpression(QStringLiteral("^[Aa].*")); // only show items starting with A m_secondTable = new QTableView(this); m_secondTable->setModel(m_filterProxy); // m_secondTable->show();