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. Generic progress reporting system design
Qt 6.11 is out! See what's new in the release blog

Generic progress reporting system design

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k 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.
  • A Offline
    A Offline
    aureshinite
    wrote on last edited by
    #1

    I am currently writing several GUI applications which have lengthy operations (like installation, import of data, remote execution, etc...) and I want to report the progress for each operation (let's say using a QProgressDialog). The progress information consists of:

    • started
    • stopped
    • progress value
    • progress text

    Basically, what you can obtain asynchronously via a "QFutureWatcher":http://doc.qt.digia.com/qt/qfuturewatcher.html
    I was thinking about QtConcurrent::run first but It seems its future cannot report progress.

    So my idea is to subclass QObject instead and create a class which have the desired signals and functions. This class will be the superclass of my program components, and my components will be running in their own thread.This way, I have a uniform way of reporting progress to the user interface. Is it a good design ? Is there a way to achieve this without replicating QFuture interface?

    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