![]() ![]() This widget is actually a mix of a compound widget and custom widget in that we are using the built-in Qt QDial component for the dial, while drawing the power bar ourselves. For a working example we'll be building the following widget - a customisable PowerBar meter with a dial control. In this article we'll take what we've learnt so far and use it to construct a completely new custom GUI widget. Now you know how to use QPainter you know how to draw your own custom widgets! This process of drawing on a surface with QPainter is in fact the basis by which all widgets in Qt are drawn. In the previous tutorial we introduced QPainter and looked at some basic bitmap drawing operations which you can used to draw dots, lines, rectangles and circles on a QPainter surface such as a QPixmap.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |