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. Ctrl+Mouse Click doesn't work as advertised with QListView...
QtWS25 Last Chance

Ctrl+Mouse Click doesn't work as advertised with QListView...

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 4.6k 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.
  • R Offline
    R Offline
    ronM71
    wrote on last edited by
    #1

    @ // Set up multi-select for the contacts list
    ui->ContactsList->setSelectionMode(QAbstractItemView::ExtendedSelection);

    // select whole rows
    ui->ContactsList->setSelectionBehavior(QAbstractItemView::SelectRows);@
    

    And I still can only use the shift for multiple line select. Documentation regarding AbstractItemView::ExtendedSelection clearly states:

    bq. When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.

    Is that a QT Bug?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      ronM71
      wrote on last edited by
      #2

      Got It.

      The documentation is indeed misleading. On Mac OSX, it's the "Command" key + Left Mouse Click that selects multiple non-contiguous rows. I guess CTRL+Click would work on Windows and perhaps Linux.

      The documentation needs to mention that ;-)

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        Then please write a "Jira":http://bugreports.qt.nokia.com/secure/Dashboard.jspa entry for documentation so it reaches the people. Please ad there a link to this forum post and perhaps here the Jira link. Thanks.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ronM71
          wrote on last edited by
          #4

          Submitted a bug report. Thanks.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            Could you please link to the bug in JIRA? Such a link makes it so much easier to follow topics across the various sites:-)

            Thanks!

            1 Reply Last reply
            0
            • R Offline
              R Offline
              ronM71
              wrote on last edited by
              #6

              Link to the bug: http://bugreports.qt.nokia.com/browse/QTBUG-18312

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #7

                It is mentioned in the docs for "QKeySequence":http://doc.qt.nokia.com/4.7/qkeysequence.html, but if you do not happen to stumble over it, it's unlikely you have read it.

                bq. On Mac OS X, references to "Ctrl", Qt::CTRL, Qt::Control and Qt::ControlModifier correspond to the Command keys on the Macintosh keyboard, and references to "Meta", Qt::META, Qt::Meta and Qt::MetaModifier correspond to the Control keys. Developers on Mac OS X can use the same shortcut descriptions across all platforms, and their applications will automatically work as expected on Mac OS X.

                BTW: Qt just switches to the Mac's standard behavior here - so, it is not really a surprise. A Mac user without knowledge of Qt's docs would have done it the correct way intuitively :-)

                http://www.catb.org/~esr/faqs/smart-questions.html

                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