Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    4
    7
    4162
    Loading More Posts
    • 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
      ronM71 last edited by

      @ // 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 Reply Quote 0
      • R
        ronM71 last edited by

        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 Reply Quote 0
        • G
          giesbert last edited by

          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 Reply Quote 0
          • R
            ronM71 last edited by

            Submitted a bug report. Thanks.

            1 Reply Last reply Reply Quote 0
            • T
              tobias.hunger last edited by

              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 Reply Quote 0
              • R
                ronM71 last edited by

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

                1 Reply Last reply Reply Quote 0
                • G
                  goetz last edited by

                  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 Reply Quote 0
                  • First post
                    Last post