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. How to running logic after window and widget is shown up?
Forum Update on Monday, May 27th 2025

How to running logic after window and widget is shown up?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 3 Posters 230 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.
  • C Offline
    C Offline
    callmejauhari
    wrote on last edited by
    #1

    Hi guys,
    I want to build non user interaction application using qt but i'm confused. How to running my logic or initialization logic after window and widget is shown up? it must be multithreading or not? i have try running those logic using invoke method but my widget will visible after those logic is done.
    in my case, my first ui is loading or progress bar, and if my progress bar is shown up, i will running my initialization logic, and update progress bar. how to achieve that?
    Thanks guys, i'am new in Qt btw.

    JonBJ 1 Reply Last reply
    0
    • C callmejauhari

      Hi guys,
      I want to build non user interaction application using qt but i'm confused. How to running my logic or initialization logic after window and widget is shown up? it must be multithreading or not? i have try running those logic using invoke method but my widget will visible after those logic is done.
      in my case, my first ui is loading or progress bar, and if my progress bar is shown up, i will running my initialization logic, and update progress bar. how to achieve that?
      Thanks guys, i'am new in Qt btw.

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

      @callmejauhari
      Hi & welcome. Sorry you didn't get a helpful answer.

      You will have to explain a bit what you are trying to do. For one thing, you say

      I want to build non user interaction application

      but then you tell us you are using widgets/windows?

      You can set off a QProgressBar or a QSplashScreen to show early and then remove it when you are ready to proceed. You can also do logic work when, say, a widget/window is first opened/shown to the user, if that's what you want.

      But one thing you are unlikely to want is "multithreading". If at all possible, especially as a beginner, don't jump into threads. Qt is a naturally "asynchronous" framework, usually it's possible to do things without blocking the UI yet without creating your own threads. (I'm not saying there are not cases you might actually need a thread, just that you need a good reason if you do.)

      Anyway, as I said, to answer better we'd need some more detail about what you are trying to do when.

      1 Reply Last reply
      1

      • Login

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