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 to prevent Q3ListView::contentsMouseDoubleClickEvent(QMouseEvent * e) from executing
Forum Updated to NodeBB v4.3 + New Features

How to prevent Q3ListView::contentsMouseDoubleClickEvent(QMouseEvent * e) from executing

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 224 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
    Deltec
    wrote on last edited by
    #1

    I have a Q3ListView that opens an edit window on a double click of the mouse. The problem is, the double click also causes Q3ListView::contentsMouseDoubleClickEvent(QMouseEvent * e) to expand the list view item if it is collapsed and collapse it if it is expanded. I don't want this behavior. I just want to process the double click to open the edit window and not have Q3ListView call setOpen(!open) at all. I've tried everything I can think of but my reimplementation of contentsMouseDoubleClickEvent() doesn't ever get called. Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You might want to try an event filter. However, you should really consider updating your code. Q3ListView was a helper class to port Qt3 code to Qt4.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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