Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt Certification
  4. Abstract Class -> ASSERT failure in QWidget: "Widgets must be created in the GUI thread."

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

Scheduled Pinned Locked Moved Qt Certification
2 Posts 2 Posters 4.5k Views
  • 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 Offline
    L Offline
    Leocor
    wrote on 2 Aug 2013, 17:22 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Aug 2013, 19:30 last edited by
      #2

      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
      0

      1/2

      2 Aug 2013, 17:22

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved