quntity of rectangles will change and colour will depend on temperature from sensors
42029995bf36e9f50f882e4cda11fb3d8e66b211.jpg
quntity of rectangles will change and colour will depend on temperature from sensors
42029995bf36e9f50f882e4cda11fb3d8e66b211.jpg
You can use QProgressBar for all of the rectangles, I think. You could also look on the inqlude and linux-apps web sites for libraries that contain similar widgets.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
maybe not good example, my rectangle have to be full painted not level or part, change colour only
You can still use QProgressBar, just set the value to 100% of the range. If all you want is a plain rectangle with different background color, then you can use a QWidget and simply change the QPalette Window color role to the color you want.
If you don't want something like the picture you posted, then what *do* you want? Why post a picture of something that is different from what you want, and then ask us how to make something that looks like the picture? You waste our time.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Vadym (22nd August 2017)
I have an idea to use scrolArea then insert QWidgets and in every QWidget paint (using QPainter) rectangle or polygon even .
but I do not know how to write code to paint figure in separate QWidget.....will be good it or not ? sorry for maybe stupid questions but I new in qt, sthanks
Your Qt distribution comes with a huge set of example programs, including many on painting widgets. Why don't you study those and understand how it works before trying to do something yourself?
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks