[Qt-interest] Can an Qt Application contain 2 mainwindow?
Till Oliver Knoll
till.oliver.knoll at gmail.com
Thu Sep 22 20:36:02 CEST 2011
[3rd attempt to get the recipient right... *sigh*]
Am 22.09.2011 um 11:46 schrieb Vincent Cai <wcai at cypress.com>:
> The error happens when I try to new b window in other thread.
>
Meeep! Bummer! ;) A classic one I'd say ;)
You can only create or modify widgets in the "main" (aka "GUI") thread - the thread where QApplication "lives in", to be specific (which usually happens to be the thread which the OS starts for you when calling your entry main() function, since that is the place where one usually instantiates QApplication).
Check the Qt thread docs again, specifically the chapter about "painting and threads".
Cheers, Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110922/ea9184de/attachment.html
More information about the Qt-interest-old
mailing list