[Qt-interest] Fwd: Fwd: Custom widget promotion
ami guru
dosto.walla at gmail.com
Thu Dec 11 16:20:17 CET 2008
Hi Benjamin,
Practically i can set that through coding that directly as i did in some
cases as follows:
********************
ui.nodesDockWidget->setWidget(view);
*******************
But i think the above is possible through the designer as well but do not
know how to make that work.
the property browser guys made that work . I asked them about that issue as
well. But i got no reply so far.
I am attaching the ui.h header file and you will get the understanding that
it has been done.
Thanks
Sajjad
---------- Forwarded message ----------
From: Benjamin <ikipou at gmail.com>
Date: Thu, Dec 11, 2008 at 1:20 PM
Subject: Re: [Qt-interest] Fwd: Custom widget promotion
To: ami guru <dosto.walla at gmail.com>, Qt Interest List <
qt-interest at trolltech.com>
Hi,
When you add a DockWidget to designer, it is already populated with a
widget, you just add yours inside the existing one and set the layout.
Pragmatically, you can add your custom widgets directly in the Dock,
but with Designer I don't think so.
regards,
Benjamin
2008/12/11 ami guru <dosto.walla at gmail.com>:
> Hello Benjamin,
>
> that is what i am trying to follow from an example where they have used
> widget promotion to create property browser.
>
> In he main example they have promoted a tree view widget to their
customized
> widget and inserted that widget inside a dock widget.
>
> And that insertion gets a little confusing to me.
>
> I drag the customized widget inside the dock , and in the "Object
Inspector"
> it shows that the customized widget is the child of the
> dockWidgetContents but not the child of dockWidget itself .
>
> In the example the customized widget is direct child of the dock widget
and
> there is no dockWidgetContents in between.
>
> Any feedback to get around with that issue?
>
>
>
> Regards
> Sajjad
>
> ---------- Forwarded message ----------
> From: Benjamin <ikipou at gmail.com>
> Date: Wed, Dec 10, 2008 at 11:23 PM
> Subject: Re: [Qt-interest] Custom widget promotion
> To: ami guru <dosto.walla at gmail.com>, Qt Interest List
> <qt-interest at trolltech.com>
>
>
> I don't see any problem to promote a widget contained inside a dock
widget.
>
> Note that adding a custom widget directly into Qt Designer is not very
> complex:
http://doc.trolltech.com/4.4/designer-creating-custom-widgets.html
> When you are not satisfied with promote, taking a few minutes to write a
> plugin makes you happy again ;).
>
> regards,
> Benjamin
>
> 2008/12/10 ami guru <dosto.walla at gmail.com>
>>
>> Hello forum,
>>
>> i want to discuss some issues related to custom widgets using Qt
designer.
>>
>>
>> when a widget is not there we have to create
>> the widget class a subclass of the nearest
>> parent class available. And that parent class work
>> as a placeholder for the customized one.
>>
>>
>> What if we have a customized widget that is the child of Qtreeview
>> and we want that customized widget to be contained inside dock widget.
>> And how to do that from within Qt Designer using the promotion?
>>
>>
>> Looking forward to feedback and references
>>
>>
>> Thanks
>> Sajjad
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081211/cfa9f2be/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui_SampleApp.h
Type: text/x-chdr
Size: 3636 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081211/cfa9f2be/attachment.bin
More information about the Qt-interest-old
mailing list