[Qt-interest] setWidget() problem for QScrollArea
Sujan Dasmahapatra
sdh at lmwindpower.com
Mon Jul 18 08:38:32 CEST 2011
Dear Friends
I am trying to create some widgets on the QScrollArea...I can create
them on a widget and set that widget to QScrollArea OR I can directly
create on the ScrollArea.
When I am creating it on the widget and setting that widget on
QScrollArea I can see the controls but when I am creating on the
QScrollArea directly not setWidget() function then I am able to see
them.
Why is this happening any suggestions.
e.g
QScrollArea * area = new QScrollAreal;
QWidget *wid = new QWidget(area);
area->resize(800,600);
area->setWidget(wid);
area->show();
QPushButton *button = new QPushButton("click me",wid);
button->setGeometry(0,0,200,50);
button->show();
Kind Regards,
This is not working. Instead if I don't create a widget and simply I
put
QPushButton *button = new QPushButton("click me",area);
Then its working . its creating the button...But in this case I cannot
scroll because there's not widget to move...
Please give some suggestions Thanks sujan
Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group
Tel +91 80 66470248
Mob
sdh at lmwindpower.com <mailto:%25EMAIL%25>
LM Wind Power Blades
lmwindpower.com
Together we capture the wind to power a cleaner world
________________________________
This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110718/d3431780/attachment.html
More information about the Qt-interest-old
mailing list