Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Qt Certification
    2
    2
    4216
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Leocor last edited by

      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/

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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/

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post