diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 3 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qscrollbar.cpp | 10 |
4 files changed, 17 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index ca2b783f55..e24d308d65 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2378,7 +2378,8 @@ QList<QUrl> QFileDialog::getOpenFileUrls(QWidget *parent, This function is used to access local files on Qt for WebAssembly, where the web sandbox places restrictions on how such access may happen. Its implementation will - make the browser display a native file dialog, where the user makes the file selection. + make the browser display a native file dialog, where the user makes the file selection + based on the parameter \a nameFilter. It can also be used on other platforms, where it will fall back to using QFileDialog. diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index d658f7fe0c..a723c3a955 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1213,7 +1213,8 @@ QMimeData *QFileSystemModel::mimeData(const QModelIndexList &indexes) const /*! Handles the \a data supplied by a drag and drop operation that ended with the given \a action over the row in the model specified by the \a row and - \a column and by the \a parent index. + \a column and by the \a parent index. Returns true if the operation was + successful. \sa supportedDropActions() */ diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 2160e54b8f..db3c269949 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5952,7 +5952,11 @@ void QWidget::setWindowTitle(const QString &title) has been set, windowIcon() returns the application icon (QApplication::windowIcon()). - \sa windowTitle + \note On \macos, window icons represent the active document, + and will not be displayed unless a file path has also been + set using setFilePath. + + \sa windowTitle, setFilePath */ QIcon QWidget::windowIcon() const { diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp index 34ea017279..2ce1d50c86 100644 --- a/src/widgets/widgets/qscrollbar.cpp +++ b/src/widgets/widgets/qscrollbar.cpp @@ -497,14 +497,20 @@ bool QScrollBar::event(QEvent *event) void QScrollBar::wheelEvent(QWheelEvent *event) { event->ignore(); + bool horizontal = qAbs(event->angleDelta().x()) > qAbs(event->angleDelta().y()); + // The vertical wheel can be used to scroll a horizontal scrollbar, but only if + // there is no simultaneous horizontal wheel movement. This is to avoid chaotic + // scrolling on touchpads. + if (!horizontal && event->angleDelta().x() != 0 && orientation() == Qt::Horizontal) + return; // scrollbar is a special case - in vertical mode it reaches minimum // value in the upper position, however QSlider's minimum value is on // the bottom. So we need to invert the value, but since the scrollbar is // inverted by default, we need to invert the delta value only for the // horizontal orientation. - int delta = (orientation() == Qt::Horizontal ? -event->angleDelta().x() : event->angleDelta().y()); + int delta = horizontal ? -event->angleDelta().x() : event->angleDelta().y(); Q_D(QScrollBar); - if (d->scrollByDelta(orientation(), event->modifiers(), delta)) + if (d->scrollByDelta(horizontal ? Qt::Horizontal : Qt::Vertical, event->modifiers(), delta)) event->accept(); if (event->phase() == Qt::ScrollBegin) |