Results 1 to 3 of 3

Thread: get all QListWidgetItem*(visible and hidden )

  1. #1
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default get all QListWidgetItem*(visible and hidden )

    Please help me to find interface which returns all items af QlistWidget hidden and not
    thanks in advance

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: get all QListWidgetItem*(visible and hidden )

    I'm afraid there's no convenience function/class (such as QTreeWidgetItemIterator for QTreeWidget) for QListWidget and you have to iterate through the items in the list widget yourself and test each items visibility.
    J-P Nurmi

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

    Default Re: get all QListWidgetItem*(visible and hidden )

    One could use QListWidget::findItems() to retrieve all the elements. It should work if provided a regexp of ".*". Of course to have only the visible items, one has to iterate through the list and test the visibility.

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.