Search code examples
c++qtqprogressbar

QProgressbar with 2 Labels with differend alignment


When a Client connects to my application a new QProgressbar will show and display his set name and display some more information. This works fine. But based on the length of the name it doesn't look perfect if multiple people connect. And it is getting harder to read.

What i want is two labels. One For the name which is left aligned and one on the right side for the other information with right alignment

Here a visual example what i want

So is there a way to display two different labels on top of the progressbar and have one aligned to the left and one to the right?


Solution

  • Such behaviour is not provided by standard Progress Bar, you must subclass and implement your behaviour yourself.