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. How can I judge user click position is on one QTreeView item(index) 's "+" (expanded flag)
Forum Updated to NodeBB v4.3 + New Features

How can I judge user click position is on one QTreeView item(index) 's "+" (expanded flag)

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 492 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.
  • J Offline
    J Offline
    jzq740176597
    wrote on 22 Aug 2014, 10:03 last edited by
    #1

    I need to do some process before the item collapsed or expanded. So I derived MyTreeView : public QTreeView .

    Overload QTreeView ::MousePressEvent(). I know most stuff useful for me is in QTreeViewPrivate. But is private in QTreeView .the Derived MyTreeView is not accessible.

    I think : VisualRect(index) and style()->getSubElement() . may help me to get the rect of "+" flag.

    Thanks in advance for any advice!

    1 Reply Last reply
    0

    1/1

    22 Aug 2014, 10:03

    • Login

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