Results 1 to 1 of 1

Thread: Combining expandable items in QListView - is it possible?

  1. #1
    Join Date
    Oct 2011
    Location
    Israel
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Combining expandable items in QListView - is it possible?

    Hi all

    I'm not so experienced in QT, and I have a dilemma for quite time now.
    I'll explain my dilemma.
    I have data that I need to display. My data consists of items, and each item has a name and a value. The value of each item can be updated and the view needs to show those updates.
    In general the data is divided into two types, the first type is a standalone item (that does not have any "children"), and the second type, is an item that has sub-items (or "children"), these items also have a name and a value.

    I tried to display the data using a QTreeView, but because I have many items to display, the tree becomes a long list, and this forces me to scroll back-and-forth to view the entire list and detect the items that were updated. These changes might be not so hard to detect, because I mark the updated items with different color, but I think the QTreeView is not the perfect view to use.
    Then I tried to display the data using a QListView, and setting the flow direction to be QListView::LeftToRight, this functionality spared the need of scrolling the entire view, and another thing that I liked is that when the QListWidget (that holds the QListView) changes its size, the items are re-organized exactly as I want them to be. But now I cannot expand items that can be expanded.

    Another solution that I came across with is using the Q3ListView, but using this I get some compilation errors that I don't want to deal with, and my project is a brand new one, so I'd like to use QT4 for the entire project code.

    I'm using QT4 (4.7.4) with Microsoft's Visual Studio 2008.

    Can anyone think of a solution to my problem?
    Did I forget to mention that the value of the items can also be manually updated? Well they can be updated..

    I don't want to start implementing new customized views, and frankly I'm not sure I know where to start...

    I'd appreciate any help.

    Yossi

  2. The following user says thank you to yossi.gohar@ceva-dsp.com for this useful post:


Similar Threads

  1. Replies: 0
    Last Post: 15th April 2011, 19:04
  2. Replies: 2
    Last Post: 20th August 2010, 05:18
  3. QTreeView and expandable items
    By SiLiZiUMM in forum Qt Programming
    Replies: 6
    Last Post: 29th April 2008, 13:21
  4. Rendering items on QListView
    By rcintra in forum Qt Programming
    Replies: 6
    Last Post: 10th May 2007, 22:22
  5. moving Qlistview items
    By :db:sStrong in forum Qt Programming
    Replies: 0
    Last Post: 21st February 2006, 12:25

Tags for this Thread

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.