Python Forum
How can I measure progress and display it in the progress bar in the interface?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I measure progress and display it in the progress bar in the interface?
#3
First and foremost the fact that you are using the Designer to create your Gui is just going to be fraught with much development pain continuously. This if for 2 reasons (1) Its black-box untouchable code and this should be avoided as much as possible in a coding situation and only when absolutely necessary and never self-inflicted which is what you do when you use the Designer (2) The process of learning to use the Designer correctly actually takes more time than learning to use Python-Qt correctly (be it PyQt5, PySide2 or any other flavor) (3) Once you learn how to use Python-Qt as it was meant to be used it is nearly as fast initially as the Designer and definitely a lot faster later on -- when you go to make changes and such.

Okay that being said as @michael1789 eludes to you will need to be able to denote to your parent (that handles the progress bar) the status of its child (or children) as to their current state. I would suggest perhaps looking into QThreading the sub-processes and having the Signal back to the Parent at specific intervals as I think that might be the most straight-forward and perhaps best way to handle this -- not I am not saying its the easiest because unless you have played with QThreads before you might have them a bit tricky especially since the how to in the Qt Documentation is wrong (old Python-Qt4 docos vs current Python-Qt5) which is to say you do not, and let me repeat you do not -- sub-class a QThread in Python-Qt5

If you need more help on this and/or want help on how to learn proper Python-Qt just shoot out another question I have no problems helping teach others how to properly use Python-Qt and I, in fact, run a free Discord classroom for this very purpose.
Reply


Messages In This Thread
RE: How can I measure progress and display it in the progress bar in the interface? - by Denni - Dec-11-2019, 03:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How To Make A PyQt5 Progress Bar Run While Executing A Function rcwildabeast 1 338 Apr-26-2024, 02:18 AM
Last Post: menator01
  [PyQt] Generate Progress Bar while executing a task maiya 7 8,397 Aug-10-2022, 10:05 AM
Last Post: mfitzp
Photo [PyQt] Connecting progress bars to sensors anastejzja 1 1,185 May-28-2022, 09:09 AM
Last Post: Axel_Erfurt
  Which GUI toolkit creating tool to measure distance/area on image kboortz 1 3,462 Aug-29-2020, 11:34 AM
Last Post: Larz60+
  [Tkinter] tkinter progress bar for decending number justaloser 1 2,643 Nov-10-2019, 12:31 AM
Last Post: Larz60+
  [Tkinter] Progress Bar While Sending an Email maxtimbo 3 4,186 Oct-09-2019, 09:13 PM
Last Post: woooee
  Progress Bar While Sending an Email maxtimbo 0 2,151 Oct-08-2019, 02:13 PM
Last Post: maxtimbo
  Need help setting up a PySimpleGUI progress bar that I can maually update in script Soundtechscott 1 10,154 Jun-10-2019, 06:14 AM
Last Post: Soundtechscott
  Display and update the label text which display the serial value jenkins43 5 9,179 Feb-04-2019, 04:36 AM
Last Post: Larz60+
  Display more than one button in GUI to display MPU6000 Sensor readings barry76 4 3,997 Jan-05-2019, 01:48 PM
Last Post: wuf

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020