Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] ListView -- Change color of current item text when moving to new item
Forum Updated to NodeBB v4.3 + New Features

[Solved] ListView -- Change color of current item text when moving to new item

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 879 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duff
    wrote on 1 Feb 2014, 21:23 last edited by
    #1

    Hi,

    Is there anyway to gain access to my delegates text color and change it when i move from one item to the next in my ListView?

    Brian

    --Duff

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Duff
      wrote on 1 Feb 2014, 22:12 last edited by
      #2

      Hi,

      I developed my delegate this way to accomplish it ...
      @
      Component {
      id: categoryDelegate

      Text {
      id: delText
      x: 25;
      color: ListView.isCurrentItem ? "white" : "red"
      text: name;
      font.family: openSansReg.name
      font.pointSize: 36
      Behavior on color { ColorAnimation {duration: 200 }}
      }
      }
      @

      --Duff

      1 Reply Last reply
      0

      1/2

      1 Feb 2014, 21:23

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved