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. What is the best way to run and update progress of external function in QT app?
Forum Updated to NodeBB v4.3 + New Features

What is the best way to run and update progress of external function in QT app?

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

    I have the interface for my shared library implemented in QT. The library is programmed by me, so I can change whatever I want.

    I was wondering how can I start a process in my library and update a progress bar in my GUI. What would be the best way of doing this in QT? I would not like to use QT inside the shared library. What is the standard way to report progress to QT from a external library? Is it possible?

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NicuPopescu
      wrote on last edited by
      #2

      Hi

      for instance QWebPage can emit the loadProgress signal to report the loading status

      so basically the solutions would be:

      1. by a QTimer checking a shared status variable
      2. your lib should emit signals providing the progress as parameter by connecting it to your GUI slot handling the progress bar

      Cheers!

      1 Reply Last reply
      0
      • X Offline
        X Offline
        XxOsurfer3xX
        wrote on last edited by
        #3

        Thanks for the answer.

        I'm interested in method 1, because the 2nd would require to emit signals from my librery and i'm gessing that would need QT.

        By shared variable you are referring to a pointer?

        And would it be possible to have the task running on a separate thread so the app interface does not freeze?

        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