Results 1 to 2 of 2

Thread: Display contents of list widget based on a RegEx

  1. #1
    Join Date
    Jan 2016
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Display contents of list widget based on a RegEx

    Hello all,

    My first time posting here so I hope I'm asking properly.

    I'm attempting to make my own music player though the QT frame work. Everything so far has been going very well and I have found a lot of great resources on the internet.

    My issue has now become displaying 3 separate list boxes (Artist, Album, Track). I am wondering if there is a straightforward way for me to change the contents of the boxes based on a RegEx of string matching.

    i.e. if I click on the artist list and select "artist1" then I want the other boxes to only show items which data matches "artist1".

    In addition to this I am wondering is there a easy method that is essentially "click to update" other lists?

    Many thanks for any responses!

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Display contents of list widget based on a RegEx

    You could use a QSortFilterProxyModel to filter the actual model, or implement the filter in the model itself.

    Cheers,
    _

Similar Threads

  1. Using a tree widget to display a list of model objects
    By xtal256 in forum Qt Programming
    Replies: 9
    Last Post: 30th May 2011, 03:00
  2. Making a QDropBox show a list contents
    By alitoh in forum Newbie
    Replies: 1
    Last Post: 26th April 2011, 13:23
  3. Replies: 3
    Last Post: 1st April 2011, 14:02
  4. Display contents of .txt file
    By karmo in forum Newbie
    Replies: 17
    Last Post: 23rd January 2010, 20:39
  5. Replies: 4
    Last Post: 10th December 2006, 09:04

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