Results 1 to 4 of 4

Thread: Dynamically grow a list of widgets

  1. #1
    Join Date
    Dec 2009
    Posts
    22
    Thanks
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Dynamically grow a list of widgets

    Hi All,
    I hope someone can help me out in my learning of Qt. My basic problem I'm facing now is I want to dynamically expand a group of widgets. I'm using Qt creator 5 on linux. Basically on my mainwindow.ui form I have

    label line edit combo box
    addbutton

    when I click click the add button I want to add another row with the lable line edit and combo widgets below the current line. So evey time I click add a new set of widgets is added to the bottom of the “list” .
    On a second note, is it possible to somehow set the max number of widget rows so that if I exceed a scroll side bar is added. A bit like on the text edit window when to many rows are added a vertical scroll bar is added.
    Sorry about the terminology I'm just learning so am unsure of all the correct words to describe some items.

    Thanks in advance.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamically grow a list of widgets

    Will QScrollArea help you

  3. #3
    Join Date
    Aug 2014
    Posts
    1

    Default Re: Dynamically grow a list of widgets

    @aamer4yu thank you for it I wasn't in known that this exists.

  4. #4
    Join Date
    Dec 2009
    Posts
    22
    Thanks
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Dynamically grow a list of widgets

    Thanks I think that will solve the second part

Similar Threads

  1. QML list and dynamically loaded content
    By matsukan in forum Qt Quick
    Replies: 5
    Last Post: 21st November 2013, 08:41
  2. Adding derived objects to a list dynamically
    By alizadeh91 in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2013, 14:59
  3. Replies: 1
    Last Post: 4th July 2012, 12:17
  4. Replies: 1
    Last Post: 29th November 2010, 17:22
  5. Replies: 2
    Last Post: 20th August 2010, 13:20

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.