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. QTreeview DecorationRole changes on click but only after the mouse moves out of the row. Why?
Forum Updated to NodeBB v4.3 + New Features

QTreeview DecorationRole changes on click but only after the mouse moves out of the row. Why?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 202 Views
  • 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.
  • T Offline
    T Offline
    Tater
    wrote on last edited by
    #1

    I have a TreeView with two columns. The first column has an icon that changes when clicked. This works but when you click, it does not update until the mouse moves off of the row/column. Why does it wait for the mouse to be out of the row/column? How can I fix this?

    I have implemented a MousePressEvent and all other functionality works (selections ect.).

    Christian EhrlicherC 1 Reply Last reply
    0
    • T Tater

      I have a TreeView with two columns. The first column has an icon that changes when clicked. This works but when you click, it does not update until the mouse moves off of the row/column. Why does it wait for the mouse to be out of the row/column? How can I fix this?

      I have implemented a MousePressEvent and all other functionality works (selections ect.).

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Tater said in QTreeview DecorationRole changes on click but only after the mouse moves out of the row. Why?:

      Why does it wait for the mouse to be out of the row/column? How can I fix this?

      Because you most likley doing something wrong (e.g. do not tell the view that something changed) but as you don't show code we can't say anything.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

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