Dear all, I am using multiple threads in my application, and now I am wondering if I am doing something bad.
My application has a 'worker' thread that builds a tree with QTreeWidgetItems, setting QIcons for them. Reading around, I found contradictory information about QPixmap (a warning that triggered my question here) and non-GUI threads. Is this code safe to execute in a thread? The underlying graphic system *IS* initialized and running at the time the thread starts, this is something I can guarantee. item = new QTreeWidgetItem(QStringList(params)); item->setIcon(0, QIcon(icons[i])); // WARNING !!! item->setData(1, 0, QVariant(file)); item->setData(2, 0, QVariant(idx)); The warning is "QPixmap: It is not safe to use pixmaps outside the GUI thread". Also, besides QIcons, am I heading for disaster in creating widgets as I am doing in a separate threads? Thanks & Cheers! _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest