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. create a QList of QThreads
Qt 6.11 is out! See what's new in the release blog

create a QList of QThreads

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

    Hello, I am trying to implement a list of threads(for me it seems the idea that might work, but i am new to QT). In my program i have an UI, it runs the event loop which takes multiple videos for processing. I want each video to be processed on a separate thread. I thought about using timmers, signals, slots on an objects to handle multiple videos, but the video processing it's pretty heavy computationally and I can't run it o a single thread. I thought about using a thread pool but the threads that are supossed to do video processing have to communicate with only one another thread which writes some information on disk and with the UI event loop thread ( from my point of view, sublcassing QThread gives more flexibility). If you can give me some advices, that's appreciated, thank you!

    jsulmJ 1 Reply Last reply
    0
    • I IonutP

      Hello, I am trying to implement a list of threads(for me it seems the idea that might work, but i am new to QT). In my program i have an UI, it runs the event loop which takes multiple videos for processing. I want each video to be processed on a separate thread. I thought about using timmers, signals, slots on an objects to handle multiple videos, but the video processing it's pretty heavy computationally and I can't run it o a single thread. I thought about using a thread pool but the threads that are supossed to do video processing have to communicate with only one another thread which writes some information on disk and with the UI event loop thread ( from my point of view, sublcassing QThread gives more flexibility). If you can give me some advices, that's appreciated, thank you!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @IonutP

      QList<QThread*> threads;
      ...
      threads.append(new QThread());
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      4

      • Login

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