tescrin
30th July 2012, 22:14
I'm looking to add pixmaps via Q_PROPERTIES. I notice that QPushButton (and similar) have nice little browsing capabilities for finding the file. I'm curious how to get that functionality with my custom widgets.
I've thought of a few ideas:
Q_PROPERTY(QString... [where the user could see the path they've typed in, and the path is saved for use]
Q_PROPERTY(QPixmap...
etc..
but I'm not sure. Theirs displays a pixmap after you've selected/browsed for a resource/file AND displays the location. Near as I can tell these will only accomplish one or the other; and further I doubt it'll add the browsing functionality I'm speaking of.
It may help to mention how the code-generation feature knows what code to generate. If I know this much I may be able to customize that code to my liking.
I've thought of a few ideas:
Q_PROPERTY(QString... [where the user could see the path they've typed in, and the path is saved for use]
Q_PROPERTY(QPixmap...
etc..
but I'm not sure. Theirs displays a pixmap after you've selected/browsed for a resource/file AND displays the location. Near as I can tell these will only accomplish one or the other; and further I doubt it'll add the browsing functionality I'm speaking of.
It may help to mention how the code-generation feature knows what code to generate. If I know this much I may be able to customize that code to my liking.