PDA

View Full Version : Dynamic widgets adding and connecting signals& slots



jjbabu
22nd May 2009, 12:40
Hi,
Is the below task is achievable by QT or not?
My requirement is,
I have a scroll area at right corner on mainwindow.It will not contain anything when application is compiled.I have login window and when i logged in correctly at the same time i have to place one Groupbox containing some pushbuttons on Scroll area in mainwindow.
I can logged in many times from mainwindow and Number of group boxes are adding to the Scrollarea.

NOTE: On more thing i need to implement is i have to connect signals and slots for dynamically added pushbuttons in the Group box.

Can it be possible?
If any example matches to above task,please provide to me .
thanks...

alisami
22nd May 2009, 13:35
if I have understood your question correctly, you can create a QWidget and add any number of QGroupBoxes to that widget. and then set it to the QScrollArea's widget.

also you can connect the signals and slots of the widgets you have created dynamically at run-time. check QObject::connect

Lykurg
22nd May 2009, 13:36
I have a scroll area at right corner on mainwindow.It will not contain anything when application is compiled.I have login window and when i logged in correctly at the same time i have to place one Groupbox containing some pushbuttons on Scroll area in mainwindow.

possible!


I can logged in many times from mainwindow and Number of group boxes are adding to the Scrollarea.

also possible!


NOTE: On more thing i need to implement is i have to connect signals and slots for dynamically added pushbuttons in the Group box.

Still possible. Create a new button, get the layout of the group box and add the new button.


Can it be possible?

Of course, that are barely low requirements...


If any example matches to above task,please provide to me.

I don't know any examples, but go ahead and try yourself. And when you struggle ask here...