summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* tablet example: don't update the cursor image on iOSShawn Rutledge2017-06-021-0/+2
| | | | | | | | There is no visible cursor on iOS, so updating the image is a waste of time. Removing this does in fact speed up rendering of the strokes. Change-Id: If958fabeefd4273644707277d4a084855d415bb1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-292-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Doc: Replace "Macintosh" with something suitable or omit itLeena Miettinen2017-05-231-2/+2
| | | | | | | | | | Change-Id: I3067bd7e6ae2d6d68d5232a56eaf368a0415876c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Add some missing breaks in switch statementsMarc Mutz2017-05-101-0/+2
| | | | | | | | | | | | | | | | Found by GCC 7. Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QVulkanWindow: return QMatrix4x4 by valueMarc Mutz2017-05-223-3/+3
| | | | | | | | | | | | | | The function never returns nullptr, so return the matrix by value. Change-Id: I7c1eeb43b9693866049763565b575348ddd35548 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QVulkanWindow: use QVector, not QSet, for small int setMarc Mutz2017-05-223-4/+3
| | | | | | | | | | | | | | | | | | | | Apart from being more efficient to construct and test, for the expected very small number of entries, the example code itself shows that a sorted vector is much more useful than an unordered set. Change-Id: Ic5e38df0176ac4be08eac6a89c2e1cabab2a9020 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | tablet example: enable high-DPI renderingShawn Rutledge2017-05-152-16/+25
| | | | | | | | | | | | Change-Id: Ie03867208902fdc9cf794de16d7249c8994351f4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-101-1/+1
|\| | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| * Remove some more register keywordsMarc Mutz2017-05-061-1/+1
| | | | | | | | | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tablet example: use stylus rotation property correctlyShawn Rutledge2017-05-081-5/+5
| | | | | | | | | | | | | | | | | | It was backwards from the expected value, consistently on iOS and xcb. It was already that way in 5.6, and we don't document which way is clockwise. So it seems to be just the example which is wrong. Change-Id: Ibbdadc2ae240017abc87439a2694fb5fbd3d07f8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | tablet example: make smoother strokes with the rotation stylusShawn Rutledge2017-05-082-2/+12
| | | | | | | | | | | | | | | | | | | | Each stroke is a polygon (quadrilateral) connecting the previous tablet event point to the current one. Previously we used the same width for both ends of the stroke, so rapid changes in pressure caused steps in the stroke width. Now it is tapered from one end to the other. Change-Id: I909a2e85334a1a6e20fd28ee4babf6825da36612 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-073-6/+3
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * examples: fix compile without gui modulePeter Seiderer2017-05-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With disabled gui module qmake in the directory examples/gui and examples/widgets failes with: Project ERROR: Could not find feature opengl. Fix this by protecting 'qtConfig(opengl)' by 'qtHaveModule(gui)' as already done in examples/examples.pro. Task-number: QTBUG-60488 Change-Id: Ia842124e818e8c81d41d2b8e3b8905bf1dee58ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Update rasterwindow example to not create() in the constructorTor Arne Vestbø2017-04-211-4/+1
| | | | | | | | | | | | | | QBackingStore should be able to handle a non-created QWindow just fine. Change-Id: I42299aa0e985422e1fe4279c1385b9979d267a47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-206-43/+44
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-183-31/+32
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| | * Doc: updated QSyntaxHighlighter documentation and use QRegularExpressionSamuel Gaist2017-04-123-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of QSyntaxHighlighter still uses the deprecated QRegExp class. This patch updates the code samples as well as cleanup some typos. Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | examples: remove some unneeded QStringRef::toString() callsMarc Mutz2017-04-073-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - when appending to another string - when just comparing - when just calling toInt() Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | hellovulkanwidget example: Add a widget showing debug outputFriedemann Kleint2017-03-303-9/+34
| | | | | | | | | | | | | | | | | | | | | Add a tab widget for vulkan info and debug log. Change-Id: I0428bb5b6f847d0e94d62e846d34e4cb69eda5b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add the Vulkan cube exampleLaszlo Agocs2017-03-2931-1/+5703
| | | | | | | | | | | | | | | | | | | | | Features a little bit more than a cube, though. Change-Id: I636d4875ba9ccf722ed3caab97f14570be785748 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-283-10/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-273-11/+11
| |\| | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * Build examples and tests only if their requirements are metUlf Hermann2017-03-223-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the respective modules aren't available we cannot build the tests and examples. We drop the qtConfig(opengl) requirement for the opengl examples as a, we would need to make the QtGui configuration available for that to work, and b, we should not add too much detail to the tests and examples build configurations. Checking each test and example for every feature it uses would be too much. Task-number: QTBUG-57255 Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Clarify the front face winding order in the Vulkan examplesLaszlo Agocs2017-03-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | After applying the correction matrix the front face is CW, not CCW. The examples work either way but fix them up to avoid reader confusion. Change-Id: I491e6dc17c21897a59f36d32061e937f2b6c4c9d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Introduce QVulkanWindowLaszlo Agocs2017-03-2238-1/+2765
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A convenience subclass of QWindow that provides a Vulkan-capable window with a double-buffered FIFO swapchain. While advanced use cases are better served by a custom QWindow subclass, many applications can benefit from having a convenient helper that makes getting started easier. Add also three examples of increasing complexity, and a variant that shows embeddeding into widgets via QWindowContainer. [ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of QWindow. Task-number: QTBUG-55981 Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-202-5/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-132-5/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Example: migrate treemodelcompleter example to use QRegularExpressionSamuel Gaist2017-03-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Update the treemodelcompleter example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I9fa91ca6e847603de37019e4ca86fc69a51a3772 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: fix memory leak in relationnaltablemodel exampleSamuel Gaist2017-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The example creates a view on the heap but doesn't delete it on application end. This patch uses a QScopedPointer to fix that. Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Fix building of various examples and tools with -no-feature-processUlf Hermann2017-03-062-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | We should not check for platforms, but rather for features. Also, if dbus is available it doesn't automatically mean that QProcess is. Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Deprecate QSignalMapperOlivier Goffart2017-03-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does not make much sense now that we can connect to lambda functions [ChangeLog][QtCore][QSignalMapper] QSignalMapper is now marked as deprecated. Change-Id: I89135f23fdf16b42142a125eb7c9a86084c90bfc Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-148-64/+178
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | Fix computegles31 examplePaolo Angelelli2017-03-083-48/+82
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the example that contained problems showing up with mesa/nouveau drivers. Change-Id: Ic90f6028e394138781f00bcc00c145c56134f441 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
| * | Replace outdated BSD license textKai Koehne2017-03-038-16/+96
| | | | | | | | | | | | | | | | | | | | | | | | For examples and documentation, use new BSD license text that includes the commercial licenses. Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-022-1/+1
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-1/+0
| |\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| | * use regular configure mechanism for openssl library referencesOswald Buddenhagen2017-02-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | make TabletMove hover events conditional on QWidget::tabletTrackingShawn Rutledge2017-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the tabletTracking property in the same way that mouseTracking already existed: there is a WA_TabletTracking attribute, and a TabletTrackingChange event to notify when it changes. So for widget applications it's an opt-in feature. QtQuick applications don't yet make use of tablet events, but when they do in the future, we don't yet have a mechanism to turn the move events off; it remains to be seen whether that will be necessary. [ChangeLog][QtWidget] QWidget now has a tabletTracking property, analogous to mouseTracking, which will enable TabletMove events while the stylus is hovering, even if no button is pressed. This allows applications to show feedback based on the other tablet event properties such as rotation and tilt. Task-number: QTBUG-26116 Change-Id: Ie96e8acad882b167e967796cdd17f1ad747a2771 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Add support for custom texture format in QOpenGLWidgetLaszlo Agocs2017-02-262-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...in order to support sRGB framebuffers. Add a --srgb option to the qopenglwidget example to allow testing. [ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying custom internal texture formats in QOpenGLWidget in order to make it possible to have the widget backed by an sRGB-capable framebuffer. Task-number: QTBUG-50987 Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Examples: use std::atan2 for simper angle calculationsEdward Welbourne2017-02-235-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using std::atan2 gets the right answer directly from dy and dx, without having to fix up quadrant as we needed to with acos (albeit we have to negate dy in some cases, to match prior sense of angles). In the process, it avoids explicit division, which would be an error when the line's length is zero. Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-178-54/+56
|\| | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.unix Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-167-51/+54
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| | * Example: migrate flightinfo to QRegularExpressionSamuel Gaist2017-02-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Update the flightinfo example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I2395b37170565e922500e675210c400e90ae0f73 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate grabber to use QRegularExpressionSamuel Gaist2017-02-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Update the legacy grabber example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I1d1871b7e82cdb214fdd8ad55a606d5e7682fab1 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate the arthur code sample to use QRegularExpressionSamuel Gaist2017-02-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the arthur code sample to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ic7efd4466b4c0fa50170b80ebb22fcb3624399ce Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate the codecs example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the codecs example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ibd60b7256071f8166c4bf38e6a40935494c3cf3f Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate settingseditor example to use QRegularExpressionSamuel Gaist2017-02-152-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | Update the settingseditor example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I07e34bf916bdde161c4253fca70b853061cd589b Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate stylesheet example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the stylesheet example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I7061b8fd462ff012cb67bfdade656b3bfe442dd8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | macOS: Make QMacNativeWidget example more usableTor Arne Vestbø2017-02-121-3/+2
| | | | | | | | | | | | | | | Change-Id: I3948c998dfbc2982a79d597c7ea3bc226df9c125 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Polish the XML bookmarks examplesFriedemann Kleint2017-02-1716-208/+227
|/ / | | | | | | | | | | | | | | | | | | | | | | | | - Use Qt 5 connect syntax. - Streamline code, remove unused members. - Add a context menu for copying and opening the URLs. - Add const to XML code. - In the XML code, show the use of QStringLiteral in static inline functions to create strings versus QLatin1String in comparison overloads to avoid allocating strings from const char * literals. Change-Id: Ib5e62ca188e271ffe01996dff3c9ea8e0b60739a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>