![]() For specialized widgets that subclass standard classes, the obvious choice of placeholder is the base class of the custom widget for example, QSlider might be used for specialized QSlider subclasses.įor specialized widgets that do not share a common API with standard Qt widgets, it is worth considering adapting a custom widget for use in Qt Designer. When choosing a widget to use as a placeholder, it is useful to compare the API of the missing widget with those of standard Qt widgets. For example, we might represent instances of a custom push button class, MyPushButton, with instances of QPushButton and promote these to MyPushButton so that uic generates suitable code for this missing class. If some forms must be designed, but certain custom widgets are unavailble to the designer, we can substitute similar widgets to represent the missing widgets. In all other cases, where the source code to the custom widgets is available, we can adapt the custom widget for use with Qt Designer. To achieve this, we can use the widget promotion feature of Qt Designer. In the above situations, it is still possible to design forms with the aim of using custom widgets in the application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |