Results 1 to 2 of 2

Thread: Widgets inside ListWidget ?

  1. #1
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Widgets inside ListWidget ?

    Hi,
    I have a Widget called VideoItem, it's a QWidget objetc with some buttons inside, also I have the main widget called MainWidget with a ListWidget to the left and a PushButton to the rigth, I need to add a new VideoItem to the ListWidget when I press the PushButton.

    I have tried using QListWidgetItem but it doesnt work for me.

    Am I using the correct widget to display the VideoItems ? Any idea, any help ?

    Basically, I need to show a list of widgets inside a ListWidget, with a vertical scrollbar, like the Add/Remove Programas MS Windows Control Panel .

    Thanks and forgive me my english.

  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: Widgets inside ListWidget ?

    QListWidget takes string or QListWidgetItem objects.

    For you solution I guess QListView will be useful, but am not sure how.

    I have another idea -
    Instead of QListWidget, use a QFrame. and apply a QVBLayout to it.
    Then at runtime, add widgets to the layout. I guess this will work. Only am not sure if it will display scrollbars.


    Or in Qt 4.4 u can use widgets in the graphics view.

  3. The following user says thank you to aamer4yu for this useful post:

    MrShahi (25th April 2008)

Similar Threads

  1. Qt3 - Multiple transparent widgets
    By bythesea in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2009, 11:24
  2. Fast painting scrollable widget
    By bunjee in forum Qt Programming
    Replies: 20
    Last Post: 24th October 2007, 19:47
  3. widgets behind hidden widgets not working
    By bpetty in forum Newbie
    Replies: 13
    Last Post: 7th September 2007, 20:23
  4. QT 4.2.3 Using GTK Widgets inside QT App
    By chuckshaw in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2007, 03:40
  5. Replies: 11
    Last Post: 7th July 2006, 13:09

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.