Results 1 to 12 of 12

Thread: QListWidget Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Platforms
    MacOS X Unix/X11
    Thanks
    1
    Thanked 52 Times in 52 Posts

    Default Re: QListWidget Question

    Try setCurrentItem(newLayer, QItemSelectionModel::Select)
    It's nice to be important but it's more important to be nice.

  2. #2
    Join Date
    Jan 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7

    Default Re: QListWidget Question

    Quote Originally Posted by axeljaeger View Post
    Try setCurrentItem(newLayer, QItemSelectionModel::Select)
    Hmm, still doesn't seem to be working

  3. #3
    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
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QListWidget Question

    To me it seems you are doing something wrong if setSelected(true) didn't work. Either the item is not selectable or your code is never ran or something unselects the item after you select it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. New member and a question about QListWidget
    By Pokepasa in forum Qt Programming
    Replies: 2
    Last Post: 4th November 2009, 10:24
  2. QListWidget question
    By rishid in forum Qt Programming
    Replies: 8
    Last Post: 18th January 2008, 13:50
  3. extracting a item from a QListWidget question
    By impeteperry in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2007, 09:08
  4. question regarding qlistwidget
    By amulya in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2006, 07:17
  5. Replies: 1
    Last Post: 7th April 2006, 11:13

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.