[Qt-interest] why terminated () or finsished () signals are not emitted when run() is finished.
Ender EREL
erelender at yahoo.com
Thu Sep 3 09:37:33 CEST 2009
Bradley T. Hughes wrote:
> You are creating GUI elements in a non-GUI thread. This is not
> supported. See http://qt.nokia.com/doc/4.5/threads.html
>
Actually, i have a question here. QTableWidgetItem does not inherit from
QObject or QWidget, therefore it can be thought of as a collection of
data that QTableWidget uses, not a GUI element. Of course this is just
my observation from the documentation, I have not looked at the source
code. Am I wrong?
Does creating a QTableWidgetItem still count as a GUI operation? What
happens when someone creates a QTableWidgetItem in a worker thread, then
moves that to the GUI thread and then inserts to a QTableWidget?
Of course the best practice would be creating the QTableWidgetItem in
the GUI thread with the data coming from the worker thread via a signal.
I am asking just out of curiousity.
Best Regards.
--
Ender EREL
More information about the Qt-interest-old
mailing list