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. OnMouseRelease does not trigger

OnMouseRelease does not trigger

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.1k 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.
  • A Offline
    A Offline
    Ascee
    wrote on last edited by
    #1

    Hi,

    I have the visualization of a graph, with big round vertices and some edges connecting these. The Graph is a QGraphicsScene. Vertices and Edges are QGraphicsPolygonItem's.
    I did not write this software; the original author is unavailable and I was tasked to maintain it and fix a few bugs.

    The problem is that when a vertex or edge is clicked with the mouse something is supposed to happen. For vertices this works like a charm, but for edges nothing is happening right now.
    I sprinkled a few debug messages throughout the code and found out, that the onMouseRelease method for Edges is never being called. This is very strange to me because the onMousePress method works as intended.
    So at some point the release event is lost but I dont know why and I dont know where.

    Unfortunately I am fairly new to Qt and never worked much with it before. I guess I would have to read through all kinds of documentations before I can fully grasp the core of this problem and work on a solution.
    My hope is, that maybe someone here can point me in the right direction to save me some trouble.

    I would really appreciate any kind of info on this, thank you very much.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Ascee
      wrote on last edited by
      #2

      bump. Anyone?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Ascee
        wrote on last edited by
        #3

        If anyone is having the same problem here is the solution I found after reading all kinds of documentations:
        The graphics item needs to have the flag "selectable" enabled. Otherwise no onMouseRelease events will ever be fired for this graphics item.

        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