Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt ListView Highlight on MouseOver
Forum Updated to NodeBB v4.3 + New Features

Qt ListView Highlight on MouseOver

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.2k 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.
  • U Offline
    U Offline
    UbuntuPenguin
    wrote on 31 Oct 2012, 02:06 last edited by
    #1

    Hello Everyone,
    I am a complete rookie when it comes to using Qt or C++. I decided to start small, and make a list that highlights an object when you mouse over it. I started this mouse over journey 3 days ago... I absolutely hate scrounging for examples in forums, but I was wondering if anyone had an example or direction as to where I should look to get a ListView to have a highlight-on-mouseover effect. Right now I'm drowning in a see of QAbstractItemViews, QListItemWidgets, Components and Delegates.

    For more information, have you seen the Github for Windows app ? You know on the left side there is that list/menu that lists "local" and "remote" and when you mouse over it, you get a blue background ? That is the effect I am going for and failing miserably at.

    Any help is greatly appreciated.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      Nosf
      wrote on 22 Nov 2012, 16:35 last edited by
      #2

      @ QListView::item:hover {
      background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
      stop: 0 #FAFBFE, stop: 1 #DCDEF1);
      }@

      Check "Here":http://doc.qt.digia.com/main-snapshot/stylesheet-examples.html#customizing-qlistview

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qtforet
        wrote on 2 Mar 2015, 03:40 last edited by
        #3

        Link broken viv, working one here:
        http://doc.qt.digia.com/4.5/stylesheet-examples.html#customizing-qlistview

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qtforet
          wrote on 2 Mar 2015, 03:40 last edited by
          #4

          Link broken viv, working one here:
          http://doc.qt.digia.com/4.5/stylesheet-examples.html#customizing-qlistview

          1 Reply Last reply
          0

          • Login

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