QUiLoader: requirements for loading .ui file with custom widgets?
问题 I've created a UI using Qt5-Designer which I load at runtime by calling QUiLoader().load(qfile_object, this); Works like charm but now I've promoted some QLabel elements to a widget class MyQLabel with is derived from QLabel . When I now try to load the UI I get a warning for each promoted widget: "QFormBuilder was unable to create a custom widget of the class 'MyQLabel'; defaulting to base class 'QLabel'." The class looks like this: class MyQLabel : public QLabel { Q_OBJECT public: MyQLabel