Results 1 to 6 of 6

Thread: QAbstractItemView - Show all contents all the time...

  1. #1
    Join Date
    Apr 2008
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default QAbstractItemView - Show all contents all the time...

    Hi!

    How to tell a QListWidget (QAbstractItemView) to never show any scrollbars and display all content all the time.

    Because it is part of an extra QScrollArea, I do not need the scrolling in the QListWidget.

    Any ideas?

    Greetings

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QAbstractItemView - Show all contents all the time...

    Set the vertical size policy to expanding and turn off the scrollbars using by setting their policy to AlwaysOff.

  3. #3
    Join Date
    Apr 2008
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: QAbstractItemView - Show all contents all the time...

    Well, does not work.

    If I modify the "minimumHeight" at item-inserting it seems to work best ... but not perfect for all item views:



    Greetings
    Last edited by youkai; 30th August 2008 at 00:04.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QAbstractItemView - Show all contents all the time...

    Get rid of all the nested views and place a single QTreeViewand apply a custom delegate to it that will paint your items accordingly.

  5. #5
    Join Date
    Apr 2008
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: QAbstractItemView - Show all contents all the time...

    Well, I think it's a custom view - not a delegate - that I need Hmm....

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QAbstractItemView - Show all contents all the time...

    No, it's a custom delegate you need. From the picture you have shown us it is obvious that I'm looking at a "would be" tree view. The only thing that might be reimplemented from it is the item layout mechanism (so that they flow from left to right).

Similar Threads

  1. Replies: 3
    Last Post: 30th May 2008, 08:37
  2. Show System Time Stamp ??
    By dheeraj in forum Qwt
    Replies: 3
    Last Post: 21st April 2008, 12:54
  3. Show progress of a time consuming operation
    By rainman110 in forum Newbie
    Replies: 7
    Last Post: 10th February 2008, 13:07

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
  •  
Qt is a trademark of The Qt Company.