×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    23

    QListWidget doesn't show the selected item when not focused

    Hi!

    My problem is (hopefully) quite simple but still I couldn't find the solution.
    I'm developing Qt for Symbian S60 5th and recently updated my version in phone to Qt 4.06(3).

    I have multiple QListWidgets side by side and before the update when the focus changed from one list
    to another, the selection of first list was still showed but now I can only see the selection of focused widget.

    Please someone tell me how to get back to old style where selection is showed even when the QListWidget is not focuses????

    Thanks for any help!!

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QListWidget doesn't show the selected item when not focused

    Is it maybe a change in the scheme, with regard to the coloring of the various list item states?

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    23

    Re: QListWidget doesn't show the selected item when not focused

    I'm not yet too familiar with Qt so how can I test that?

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: QListWidget doesn't show the selected item when not focused

    I too have the same problem.

    Also the spacing between the list components has changed but that's minor.

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QListWidget doesn't show the selected item when not focused

    Quote Originally Posted by Klaxuz View Post
    I'm not yet too familiar with Qt so how can I test that?
    It would involve style sheets. There are various pseudo-states that allow the background colors (and many other style options) to be set for individual items on the screen. How these interact is poorly documented (and, alas, apt to change between releases), but presumably the right combination of selectors (including pseudo states) in a style sheet might allow you to achieve the sort of highlighting you seek.

  6. #6
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Re: QListWidget doesn't show the selected item when not focused

    Hi,

    this is also my problem. I need the current item to be highlighted even if the list has not the focus. I try to play with the style sheets. This line sets the background even with no focus:

    Code:
    ui.iList->setStyleSheet(QString::fromAscii("QListView::item:selected {border: #EEEEEE}"));
    The problem is that this does not follow the theme of the phone. If the theme uses a grey background, the user will not be able to distinguish the current item.

    I still don't know how to get the 4.6.2 drawing behaviour.

    I have posted a Qt bug:
    http://bugreports.qt.nokia.com/browse/QTBUG-11941
    Last edited by bounlith.sirivong; 2010-07-05 at 14:24. Reason: Add link

Similar Threads

  1. Replies: 1
    Last Post: 2010-03-23, 10:43
  2. Get text of selected area in focused control
    By stenlik in forum Symbian
    Replies: 0
    Last Post: 2009-12-03, 15:34
  3. help: how to get the name of focused item
    By bankbreaker in forum Symbian
    Replies: 7
    Last Post: 2008-11-23, 12:48
  4. Browser API - Location of focused item
    By ferranhalden in forum Symbian
    Replies: 5
    Last Post: 2007-10-19, 10:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×