Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Showing a QWidget in a separate thread

Showing a QWidget in a separate thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 296 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
    LeftDad
    wrote on last edited by
    #1

    I made a widget for splash screen. It will open before MainWindow opens, but when calling MainWindow, Splash Screen freezes for a while until MainWindow opens. I want to open the Splash Screen widget to another thread in main.cpp so that it does not freeze. Can you help me?

    JonBJ 1 Reply Last reply
    0
    • L LeftDad

      I made a widget for splash screen. It will open before MainWindow opens, but when calling MainWindow, Splash Screen freezes for a while until MainWindow opens. I want to open the Splash Screen widget to another thread in main.cpp so that it does not freeze. Can you help me?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @LeftDad
      Hello and welcome.

      You cannot/must not do any Qt UI operations from any secondary thread. Only the main, UI thread is allowed to do anything to widgets etc. So that is not the way to do it.

      Find out/show what it is that you are doing which causes a problem. Qt provides a QSplashScreen class intended for just this purpose.

      1 Reply Last reply
      3

      • Login

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