[Qt-interest] How does Qt designer manage resizing widgets at design time?
K. Frank
kfrank29.c at gmail.com
Mon Mar 22 01:45:01 CET 2010
Andreas -
Thank you.
On Sun, Mar 21, 2010 at 8:06 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 21.03.10 18:46:43, K. Frank wrote:
>> >> Is there any (easy) way to get
>> >> my place-holder widget (in my test case, a QWidget) to mimic in Qt designer
>> >> more closely QTableWidget (or my custom widget)?
>> > ...
>> Again, this is certainly good enough for my practical needs, but I would
>> like to follow up on Sean's comment, and ask if it is possible to tweak
>> my QWidget place-holder so that behaves more realistically in designer.
>
> You could try to play with the stretch factors and/or the other
> size-values. But unless you provide a qt designer plugin for your custom
> widget you probably won't get the same behaviour as with a real
> qtablewidget. The reason is that the place-holder doesn't have the same
> implementation for the sizeHint and other size-related methods.
>
> Andreas
Yes, this makes sense. If I want the realistic behavior at design time, then
a plugin is the way to go.
(In this particular case, my custom widget is a one-off, application-specific
widget, so I don't think I will go to the effort of packaging it as a designer
plugin.)
K. Frank
More information about the Qt-interest-old
mailing list