[Qt-interest] Basic question on QWidget

Wagner Sales wsales at gmail.com
Fri Jan 1 17:11:59 CET 2010


Nitin,

Have you an layout on widget A and are you adding the widget B to this layout?


Regards,

Wagner

2010/1/1 Nitin Mahajan <nitinm76 at yahoo.com>:
> HI!
>
> I have a basic question about QWidget.
>
> I have derived a class A from QWidget and class B also from QWidget.
>
> Class B has a HBoxLayout and has only QSlider object added to it.
>
> In class A's constructor When I crate a object of class B with parent as A,
> I can see only the slider and not the Widget B itself. I do a proper setGeometry for B, but it changes only the length of slider and does not show Widget B at all.
>
> When I remove Slider from B, I cannot see B's widget at all bing displayed as a Child of A.
>
> Now I created one more object directly from QWidget and set A as parent. It shows, where as if the child is derived from QWidget it does not show up at all. Can someone please give me some pointers towards whats the basic thing that is going wrong here?
>
> regards
>
> -Nitin
>
>
>
>
>      New Email names for you!
> Get the Email name you've always wanted on the new @ymail and @rocketmail.
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
>
> _______________________________________________
> 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