Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27221

Shift and ctrl keyboard modifiers do not work at all in OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.0.0 Beta 1, 5.0.0 RC 1, 5.0.0
    • Fix Version/s: 5.0.0 Beta 2
    • Labels:
      None
    • Environment:
      OS X 10.7.4
    • Platform/s:
      macOS
    • Commits:
      c12b4f26852bc885217ae5ddcd105d88a502328a

      Description

      ExtendedSelection mode does not work in OS X. Shift-click and command-click don't extend selection, only select the new item.

      The following code works in 4.8. It also works in 5.0 on Windows.

      #include <QtWidgets>
      
      int main(int argc, char **argv)
      {
      	QApplication app(argc, argv);
      	QStringList numbers;
      	numbers << "123456" << "123" << "1234" << "123" << "12"
      	<< "123" << "1234" << "12345" << "123" << "1234567"
      	<< "12" << "12" << "12" << "12" << "12";
      	QAbstractItemModel *model = new QStringListModel(numbers);
      	QListView *view = new QListView;
      	view->setSelectionMode(QAbstractItemView::ExtendedSelection);
      	view->setViewMode(QListView::IconMode);
      	view->setFlow(QListView::TopToBottom);
      	view->setModel(model);
      	view->show();
      	return app.exec();
      }
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              sorvig Morten Sørvig
              Reporter:
              stephenju Stephen Chu
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes