Results 1 to 6 of 6

Thread: change text color for handmade Widget in QListWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2014
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    1

    Post change text color for handmade Widget in QListWidget

    Hello all. I need your advice. I have a QListWidget, and QListWidgetItem
    QListWidgetItem *item = new QListWidgetItem;
    item->setSizeHint(size);
    ui.listWidget->addItem(item);

    and I add my handmade navigation widget to item
    ui.listWidget->setItemWidget(itm, navWidget);

    Now I change background for selected item
    QListWidget:item:selected:active
    {
    background: gray;
    color: yellow;
    }
    and I want my navigation widget changed text color when item, to which it belongs, is selected. If another item selected, previous item navigation widget return his previous color text. How I can release this task?
    Attached Images Attached Images
    Last edited by Holiday; 31st October 2014 at 19:08. Reason: the task is complete

Similar Threads

  1. Replies: 0
    Last Post: 25th April 2014, 08:59
  2. change text color on QRadioButton
    By vonCZ in forum Newbie
    Replies: 4
    Last Post: 7th November 2012, 20:05
  3. Replies: 3
    Last Post: 16th July 2012, 15:04
  4. Replies: 3
    Last Post: 22nd January 2010, 16:46
  5. how to change text color in QTableView?
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2008, 10:03

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.