Abstract Class -> ASSERT failure in QWidget: "Widgets must be created in the GUI thread."



  • Hi to everyone!

    I'm developing with Qt 5.1 (VS2012 - 32bit).

    I have a strange problem. I use a abstract class (iLog) and derived classes (e.g. ConsoleLog -> to log into stdout/stderr). One (PopupLog) class creates QMessageBoxes with errors ..

    When I use:
    Popuplog *p = new Popuplog();
    p->error("blah blah");//this is a virtual function -> virtual void iLog::error(QString&) = 0;
    It works fine!!

    When I use:
    iLog *p = new Popuplog();
    p->error("blah blah");
    My software crashes with:
    ASSERT failure in QWidget: "Widgets must be created in the GUI thread.", file kernel\qwidget.cpp, line 1111
    QObject::killTimers: timers cannot be stopped from another thread

    To be honest, I have no clue why!
    Do you have any advice or a idea??

    SRY I made a mistake could the ADMIN remove this topic!
    I created a new post: http://qt-project.org/forums/viewthread/30820/


  • Lifetime Qt Champion

    Please don't post the same thread on multiple sub forum especially when they are not related.

    "Duplicate":http://qt-project.org/forums/viewthread/30820/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.