diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-03 10:23:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-03 10:23:56 +0200 |
commit | e2f66f921594b7be4af4a058c959557489e86879 (patch) | |
tree | cc44931708b57bd5a761906797c7dee0360d1d6b /examples/widgets | |
parent | 933bf178aab88ab5df8a68cbf02611d6d8744b1b (diff) | |
parent | 754efa57d89c62d1796e01b407e9222e67450f52 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/corelib/global/qnamespace.qdoc
src/corelib/io/qwindowspipereader.cpp
src/corelib/io/qwindowspipereader_p.h
src/corelib/statemachine/qstatemachine.cpp
src/corelib/statemachine/qstatemachine_p.h
src/plugins/platforms/xcb/qxcbconnection.h
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/tools/qmake/tst_qmake.cpp
tests/manual/touch/main.cpp
Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/doc/images/imagegestures-example.jpg | bin | 0 -> 38962 bytes | |||
-rw-r--r-- | examples/widgets/doc/src/plugandpaint.qdoc | 9 | ||||
-rw-r--r-- | examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc | 3 | ||||
-rw-r--r-- | examples/widgets/graphicsview/boxes/boxes.pro | 6 | ||||
-rw-r--r-- | examples/widgets/widgets/imageviewer/imageviewer.cpp | 2 | ||||
-rw-r--r-- | examples/widgets/windowcontainer/windowcontainer.cpp | 18 |
6 files changed, 23 insertions, 15 deletions
diff --git a/examples/widgets/doc/images/imagegestures-example.jpg b/examples/widgets/doc/images/imagegestures-example.jpg Binary files differnew file mode 100644 index 0000000000..c8484b4a71 --- /dev/null +++ b/examples/widgets/doc/images/imagegestures-example.jpg diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc index 7a8a2cf2fc..a1e26272bc 100644 --- a/examples/widgets/doc/src/plugandpaint.qdoc +++ b/examples/widgets/doc/src/plugandpaint.qdoc @@ -30,8 +30,7 @@ \title Plug & Paint Example \ingroup examples-widgets-tools - \brief The Plug & Paint example demonstrates how to write Qt - applications that can be extended through plugins. + \brief Demonstrates how to extend Qt applications using plugins. \image plugandpaint.png Screenshot of the Plug & Paint example @@ -314,6 +313,9 @@ /*! \example tools/plugandpaintplugins/basictools \title Plug & Paint Basic Tools Example + \brief A plugin providing the basic tools for painting functionality. + + \image plugandpaint.png Screenshot of the Plug & Paint example The Basic Tools example is a static plugin for the \l{tools/plugandpaint}{Plug & Paint} example. It provides a set @@ -499,6 +501,9 @@ /*! \example tools/plugandpaintplugins/extrafilters \title Plug & Paint Extra Filters Example + \brief A plugin providing the extra filters. + + \image plugandpaint.png Screenshot of the Plug & Paint example The Extra Filters example is a plugin for the \l{tools/plugandpaint}{Plug & Paint} example. It provides a set diff --git a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc index 07acef6b4d..2751c64e76 100644 --- a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc +++ b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc @@ -28,10 +28,13 @@ /*! \example gestures/imagegestures \title Image Gestures Example + \brief Demonstrates the use of simple gestures in a widget This example shows how to enable gestures for a widget and use gesture input to perform actions. + \image imagegestures-example.jpg + We use two classes to create the user interface for the application: \c MainWidget and \c ImageWidget. The \c MainWidget class is simply used as a container for the \c ImageWidget class, which we will configure to accept gesture input. Since we diff --git a/examples/widgets/graphicsview/boxes/boxes.pro b/examples/widgets/graphicsview/boxes/boxes.pro index e608b1c845..15d26f02f0 100644 --- a/examples/widgets/graphicsview/boxes/boxes.pro +++ b/examples/widgets/graphicsview/boxes/boxes.pro @@ -1,10 +1,6 @@ QT += opengl widgets -contains(QT_CONFIG, opengles.) { - contains(QT_CONFIG, angle): \ - warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") - error("This example requires Qt to be configured with -opengl desktop") -} +contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") HEADERS += 3rdparty/fbm.h \ glbuffers.h \ diff --git a/examples/widgets/widgets/imageviewer/imageviewer.cpp b/examples/widgets/widgets/imageviewer/imageviewer.cpp index c32f21e7f3..0b8513f090 100644 --- a/examples/widgets/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/widgets/imageviewer/imageviewer.cpp @@ -107,7 +107,7 @@ void ImageViewer::open() mimeTypeFilters.sort(); const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); QFileDialog dialog(this, tr("Open File"), - picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first()); + picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.last()); dialog.setAcceptMode(QFileDialog::AcceptOpen); dialog.setMimeTypeFilters(mimeTypeFilters); dialog.selectMimeTypeFilter("image/jpeg"); diff --git a/examples/widgets/windowcontainer/windowcontainer.cpp b/examples/widgets/windowcontainer/windowcontainer.cpp index 022b6dafc4..a38a10e6f6 100644 --- a/examples/widgets/windowcontainer/windowcontainer.cpp +++ b/examples/widgets/windowcontainer/windowcontainer.cpp @@ -92,10 +92,12 @@ public: } void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE { - m_mouseDown = true; - m_polygon.clear(); - m_polygon.append(e->pos()); - renderLater(); + if (!m_mouseDown) { + m_mouseDown = true; + m_polygon.clear(); + m_polygon.append(e->pos()); + renderLater(); + } } void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE { @@ -106,9 +108,11 @@ public: } void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE { - m_mouseDown = false; - m_polygon.append(e->pos()); - renderLater(); + if (m_mouseDown) { + m_mouseDown = false; + m_polygon.append(e->pos()); + renderLater(); + } } void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE { |