View Full Version : Add QPushButton to cell in QTableView?
nikhil
13th July 2010, 11:20
Hi to all
I'm using QTableView I'd like to include in each row a QPushButton Is there a way to get a button into a QTableView cell?
Thanks you.
Lykurg
13th July 2010, 11:32
No Problem with a custom delegate. See QAbstractItemView::setItemDelegateForColumn().
ahmdsd_ostora
13th July 2010, 12:07
If you aren't forced to use QTableView, you can use QTableWidget, it's straightforward
//use this to add any widget to any cell in the table:
QTableWidget::setCellWidget();
// and this to get a pointer to this added widget:
QTableWidget::cellWidget()
nikhil
14th July 2010, 09:01
is it Possible two split cell ?
or merge horizontal headers in QTableWidget.
Thanks in advance
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.