PDA

View Full Version : Qt Designer Custom widget properties not showing in Qt Designer



nguarracino
19th November 2010, 01:06
I have a custom widget that is derived from QPushButton, and adds a couple properties, defined with Q_PROPERTY. I'd like to be able to use this widget and set its properties from within Qt Designer.

I have created a plugin and installed it in the Qt Designer plugins directory. It shows up in the widget box and I can create instances of it in a form, but I don't see the properties I defined in my widget subclass. I thought they would show up automatically since I am using Q_PROPERTY. Am I missing something?

Thanks!

nguarracino
19th November 2010, 14:09
OK, I figured it out. I had set my properties to read only because I didn't want clients to be able to change the properties. But by not setting a Q_PROPERTY WRITE property, there was no way for Qt Designer to set the properties either, so they weren't showing up in the Property Editor!