Results 1 to 3 of 3

Thread: Dynamic widgets adding and connecting signals& slots

  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Dynamic widgets adding and connecting signals& slots

    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...

  2. #2
    Join Date
    May 2008
    Posts
    61
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic widgets adding and connecting signals& slots

    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

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Dynamic widgets adding and connecting signals& slots

    Quote Originally Posted by jjbabu View Post
    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.