Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to impliment signal and slot when click on checkbox in first row of the QTreeWidgetitem
Qt Enthusiast last edited by Qt Enthusiast
I have following code and I want to impliment signal and slot
int main(int argc, char **argv)
QApplication app(argc, argv);
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setFlags(item->flags() | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable);
koahnig last edited by
You can't simply implement something in main and expect to get it to work with signal and slots. You need a class which inherits from QObject in order to benefit from signal slot mechanism.
I suggest that you are examining the examples e.g. http://doc.qt.io/qt-5/qtwidgets-itemviews-editabletreemodel-example.html
There you have a good start for some experiments. Using the debugger will help you to understand some more details about the functionality.