Hello,
I want to insert in my QTableWidget a Checkbox...
I don`t know how I can do that...
For example:
In the first column have to be the Checkbox and in the second a QString...
Hello,
I want to insert in my QTableWidget a Checkbox...
I don`t know how I can do that...
For example:
In the first column have to be the Checkbox and in the second a QString...
Check the Qt Examples and Demos, under the Widgets section, see the Icons demo. It has an example of what you're describing.
thanks...
but i can`t found something about that what i want...
do you have a little code example for me?
It might not be possible to put QCheckBox for QTableWidget instead you need to put QTableWidgetItem item to table and then mark that as checkable. Next piece of code shows one way to add "checkboxes" for table:
Qt Code:
checkBoxItem->setCheckState(Qt::Unchecked); table->setItem(row, column, checkBoxItem);To copy to clipboard, switch view to plain text mode
Seriously, look here:
http://doc.trolltech.com/4.6/widgets-icons.html
In this example, in the bottom left corner, there's a TableWidget with a checkbox (as well as other widgets). There are links to code examples.
hi guys,
thanks a lot for your help...
it works
bye
Bookmarks