View Full Version : dynamically add rows to tableview
maarvi
28th June 2011, 15:03
I want to have a table view in my Qt code. It has four column and many rows (not know ) before hand in table view Qt how can I dynamically add rows as
QStandardItemModel model(0,2);
What to do to add rows dynamically
Lykurg
28th June 2011, 15:15
QStandardItemModel::appendRow()?
maarvi
28th June 2011, 15:20
Thank u .sir can u kindly give me lilte example or link to example not the documentation as i am new to it i am unable to understand the documentation wid out example thanks
ChrisW67
29th June 2011, 00:57
or QStandardItem::setRowCount(). Here is your example:
model.setRowCount(1);
szisziszilvi
29th June 2011, 07:25
what do you mean dynamically? Do you want to add or delete rows based on some user interaction or other parameter changes? Anyway I would suggest QTableWidget, very nice class for designing a table.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.