Results 1 to 2 of 2

Thread: How to prevent an icon being highlighted?

  1. #1
    Join Date
    Dec 2009
    Posts
    16
    Thanks
    2
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default How to prevent an icon being highlighted?

    I have a listwidget with items which have icons. When the item is selected both the text and the icon are highlighted. My problem is that when the icon is highligted it just goes entirely black because im using only two colours. Is there a way to prevent the icon from being selected?
    Thanks

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

    Default Re: How to prevent an icon being highlighted?

    Provide your own item delegate where you will not take selection into consideration for the icon. Alternatively provide a QIcon object to your item which will contain an appropriate pixmap for the selected state.
    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. Highlighted text/image inside delegate
    By hailflex in forum Newbie
    Replies: 0
    Last Post: 11th December 2009, 15:36
  2. Replies: 1
    Last Post: 5th August 2008, 13:53
  3. Couple of questions: main window icon + toolbar icon
    By bpackard in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 19:03
  4. QomboBox - activated(), highlighted()
    By Salazaar in forum Newbie
    Replies: 10
    Last Post: 14th June 2007, 11:50
  5. Qtreeview selection highlighted problem?
    By thefisher in forum Qt Programming
    Replies: 4
    Last Post: 24th November 2006, 09:50

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.