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. on_TableWidget_doubleClicked(const QModelIndex &index);
Qt 6.11 is out! See what's new in the release blog

on_TableWidget_doubleClicked(const QModelIndex &index);

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 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.
  • C Offline
    C Offline
    Chrisw01
    wrote on last edited by
    #1

    Greetings,

    I have a table widget in a tab, I used the on_doublClicked slot in the ui editor works great but how does one filter out the left button on the double click.

    header file declaration.

    void on_employeeTableWidget_doubleClicked(const QModelIndex &index);
    
    
    void MainWindow::on_employeeTableWidget_doubleClicked(const QModelIndex &index) {
    
    // wish to process the left button only here...
    
    }
    
    

    Thanks..

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

      Hi,

      "Filter out the left button" ? Why ? It's him that is usually used for double clicking, no ?

      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
      1
      • C Offline
        C Offline
        Chrisw01
        wrote on last edited by
        #3

        Because it fires whether you double click the right or left button. I wish to ignore the event if it is not the left button.

        Thanks

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

          In that case, shouldn't you rather use the activated signal ?

          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