[Qt-interest] Promoting custom widgets in designer
Tony Rietwyk
tony.rietwyk at rightsoft.com.au
Fri May 14 06:10:59 CEST 2010
Hi Everybody,
I have created a custom widget and plugin and designer loads it. I have successfully created various ui files using the custom widget, and they work OK when the application runs.
In one particular case, I need to override a virtual method in the custom widget. I was surprised to find that right-clicking a custom widget does not show the "promote to ..." menu item. It does have a "promoted widgets..." item, but the combo in the New Promoted Class section only has Qt widgets, and I cannot enter the name of my custom widget as base class.
I have worked around the issue by replacing the custom widget with its base Qt class (QWidget) and then promoting that. Luckily in this case, the custom widget does not have any special sizing requirements. If it did, this workaround would not be acceptable, as the layouts would not respond in an appropriate way.
Have I missed something? Are there any plans to fix this? Should I raise a bug?
Thanks,
Tony.
More information about the Qt-interest-old
mailing list