Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2
-
None
-
Windows 7
-
26fbba6
Description
I have written a plugin, with a QIcon property.
class ZLogWidget : public QWidget {
Q_PROPERTY(QIcon browseButtonIcon READ browseIcon WRITE setBrowseIcon);
QIcon browseIcon() const;
void setBrowseIcon(const QIcon&);
}
The plugin loads perfectly in QtDesigner and the property can be set without any problem there.
Now, when I create a form using this widget in a project and then compiler the project, it fails with following error:
ui_TestForm.h(306) : error C2039: 'setBrowseButtonIcon' : is not a member of 'ZLogWidget'
D:\Sources_QT\Plugins\ZLogWidget\src\ZLogWidget.h(54) : see declaration of 'ZLogWidget'
The moc generated code contains setBrowseButtonIcon() instead of setBrowseIcon().
Note: I use different names for the property name, the READ feature and the WRITE feature due to a limitation of doxygen, since it is not possible to comment a property and a function that have the same name.