[Qt-interest] Promoting custom widgets in designer
K. Frank
kfrank29.c at gmail.com
Fri May 14 16:17:18 CEST 2010
Tony -
(Sorry not to be of help. I'm just chiming in with a "me too.")
On Fri, May 14, 2010 at 12:10 AM, Tony Rietwyk
<tony.rietwyk at rightsoft.com.au> wrote:
> 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.
I don't have any designer-integrated custom widgets that I have written myself,
but I am using Qwt (a set of technical plotting widgets), and they are packaged
as a designer plugin and seem to work properly with designer.
> 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 see what you mean -- I hadn't noticed this before. I tried a test
-- I created a
fresh QWidget-based designer form and dropped both a QTextEdit and QwtPlot
onto it.
Just as you say, right-clicking on the QTextEdit brings up "Promote to ..." as a
menu item, while right-clicking on the QwtPlot brings up instead the "Promoted
widgets..." menu item, and, indeed, the "Base class name:" combo of the
"Promoted Widgets" dialog lists only Qt widgets, and none of the Qwt widgets.
> ...
> Have I missed something? Are there any plans to fix this? Should I raise a bug?
I see exactly what you are describing. Is there is some additional
way to integrate
custom widgets into designer that makes available the promotion functionality?
I have no idea one way or the other. (It looks to me more like a
design limitation
than an outright bug, but maybe it is supposed to work.)
(I'm using Qt Designer 4.6.1.)
>
> Thanks,
> Tony.
Good luck.
K. Frank
More information about the Qt-interest-old
mailing list