Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] "Widgets must be created in the GUI thread" error
Forum Updated to NodeBB v4.3 + New Features

[Solved] "Widgets must be created in the GUI thread" error

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 3.3k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    remy_david
    wrote on last edited by
    #1

    I spend several hours trying to find out what was the reason for this error.
    My Qt/QML application was running into sigsev with this error but I was unable to backtrace its origin.

    Most of the time it happens in a QML application when you try to create a QWidget derived class in the main.cpp before calling app.exec().
    I knew that already, and I was pretty sure I was not using QWidget in the initialisation code of my main.cpp.

    However, somewhere deep inside one of the networking class I was using in my initialisation routine, a QWebView was created to retrieve the UserAgent of the device. And QWebView is a QWidget...

    I hope this will be of any help.

    1 Reply Last reply
    0

    • Login

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