[Qt-interest] ****SPAM**** Re: Add "external" graphical elements to a derived widget?

André Somers andre at familiesomers.nl
Sat Mar 20 20:12:40 CET 2010


Hi,

QFrame is a QWidget, but it adds a little suger in that it can display
frames, or can appear sunken or raised. That could be useful if you want the
different elements of your widget to appear grouped. Other than that, I
don't know of any differences that appear significant to you.

On your second question, I think the only way is to create a designer plugin
for your widget. I have never done that myself, but it should not be too
hard. That way, you could use your actual widget in your form designs. I
don't know if it would be worth the effort in your case though.

André



-----Oorspronkelijk bericht-----
Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens K. Frank
Verzonden: zaterdag 20 maart 2010 17:17
Aan: Qt-interest
Onderwerp: ****SPAM**** Re: [Qt-interest] Add "external" graphical elements
to a derived widget?

André -

Thanks.

On Sat, Mar 20, 2010 at 9:30 AM, André Somers <andre at familiesomers.nl>
wrote:
> Hi,
> I don't think there is an easy way to do what you want.

Yes, I don't see any way either.

> I would go for your approach 2, deriving from QWidget or QFrame and
> putting the (modified) QTableWidget inside of it.
> ...

I have two follow-up questions:

First, could you give me a little guidance on the difference between QWidget
and QFrame, and whether I might prefer one over the other?

Second -- and this is not a big deal -- when I derive my custom widget from
QWidget, then to use it in Qt designer, I drop a QWidget on my form, and
then promote it to my custom widget.  A minor inconvenience with this is
that the place-holder QWidget behaves a little differently in Qt designer
that does QTableWidget or my custom widget.  It looks different, and it
sizes itself differently in layouts, and such.  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)?

Your advice is appreciated.


K. Frank


> ...
> André
> -----Oorspronkelijk bericht-----
> Onderwerp: [Qt-interest] Add "external" graphical elements to a derived
> widget?
>
> Hi List -
> I would like to derive a widget from QTableWidget, but have the custom
> widget contain
> some additional graphical elements (check boxes, and labels, and the
> like) that appear above the table proper.
> ...

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list