summaryrefslogtreecommitdiffstats
path: root/examples/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Make the textedit example use dark text on light background on macOSMorten Johan Sørvig2018-09-251-0/+8
| | | | | | | | | Many text documents will be designed for a white-paper look, and in these cases it is desirable that the editor colors matches. Change-Id: I66d721f8c2e27b78a2b885c6cfd74f897fe42389 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Move touch examples around so they get included in docsPaul Wicking2018-09-1430-0/+1843
| | | | | | Task-number: QTBUG-59249 Change-Id: I71f1d2e28f0cadbad1d6bcf117198018eaf8e012 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Example: Close popup on mouse click without assigning new lens positionPaul Wicking2018-09-101-0/+4
| | | | | | | | | | | | Clicking in the main renderer window passes a new position to the lens, disregarding the "What's This" (documentation) overlay window. This change checks if the documentation window is open on click, and if it is, closes the documentation window and returns without further handling of the mouse event. Fixes: QTBUG-7205 Change-Id: I821245ec6c78be00d80af461baf8e4d59e0f351f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-071-1/+1
|\ | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * Examples: Fix minor bug in Tree Model Completer ExamplePaul Wicking2018-08-301-1/+1
| | | | | | | | | | | | | | | | Minor bug that caused highlighter to not work properly. Task-number: QTBUG-66084 Change-Id: I7860d7a13c402e3236f4c844020e35e11f6e53e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Tablet example: paint only the changed areas of the canvasShawn Rutledge2018-08-301-2/+4
| | | | | | | | | | | | | | This improves performance significantly. Change-Id: I9a8782148ce03a2bc85759c4e8c1eecb37467cf6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Tablet example: add a menu item to clear the canvasShawn Rutledge2018-08-234-4/+22
| | | | | | | | | | | | | | | | It's annoying to have to kill the app and start over when it gets too cluttered. Change-Id: Ic72e372e5742de4e7c6bb818a3150283498a517b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-0/+0
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * Doc: Update out-of-date screenshots in example docsPaul Wicking2018-08-161-0/+0
| | | | | | | | | | | | Task-number: QTBUG-63248 Change-Id: I4cd47977ae020b43ca92b1781ac8b038e6ef851c Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Doc: Synchronize documentation with code snippetPaul Wicking2018-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | * The plugin IID with version number was removed in transition to new plugin system, see efde205586a70320d0525e941e5a1cd9657bdd30. * This change re-adds the version number, so that we deliver on the best practices as mentioned in the documentation for the example. Task-number: QTBUG-59487 Change-Id: I88596e71cf18be88d0b1d28d56b6d3bb72fe756b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge branch '5.11' into devEdward Welbourne2018-07-311-10/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * Doc: Update Tetrix examplePaul Wicking2018-07-191-10/+21
| | | | | | | | | | | | | | | | Use new connect syntax throughout the example. Task-number: QTBUG-69503 Change-Id: I5ab1453318e60586a9655ecb58263778c02aba4f Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Add demo of the new QGradient presets to the gradients exampleEirik Aavitsland2018-07-244-4/+74
| | | | | | | | | | | | | | | | In the gradients example, allow the user to select and show QGradient's named presets. Change-Id: I40bc6cbe3a0316ce49d67d63511881b6f6112574 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-0223-73/+95
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Notepad example: Wrap clipboard functions with QT_CONFIG(clipboard)Topi Reinio2018-06-221-0/+17
| | | | | | | | | | | | | | | | And disable menu actions for functionality that's not available. Task-number: QTBUG-68168 Change-Id: I153487860e8dda8271ae04e9cd2ad8b26a4b130f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Doc: Fix typo in Scribble examplePaul Wicking2018-06-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68549 Change-Id: Ib83d3297e2ebefe6f42799a14dde35411a8ec120 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-2118-18/+18
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Update Extension exampleNico Vertriest2018-06-131-47/+53
| | | | | | | | | | | | | | | | | | | | -language review -rewrite some paragraphs Task-number: QTBUG-60635 Change-Id: I96154cd5d78b9517409ac67ec416c53031dcb909 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Factorial ExampleNico Vertriest2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | Updated connect syntax Task-number: QTBUG-60635 Change-Id: Ib5280326c158221129c1817a4853bfd79bbcd895 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Elided Label exampleNico Vertriest2018-06-071-6/+5
| | | | | | | | | | | | | | | | | | Updated connect syntax Task-number: QTBUG-60635 Change-Id: I8d770f62557d5056375d72d778c4e2079511b848 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-0719-139/+293
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Examples: Cleanup and modernize Plug&PaintAndre Hartmann2018-06-069-99/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use C++11 member init * Use auto where appropriate * Replace foreach with range-for * Replace last Qt4-style connects * Sort includes to common style * Fix some Clang warnings Task-number: QTBUG-60635 Change-Id: I61c98b34b954e416dd175b56ca589125217083de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Doc: Update connect syntax Plugandpaint ExampleNico Vertriest2018-06-053-16/+18
| | | | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I354a0886b22c63be57bd927308163abd3246be77 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Add formatting features to Notepad exampleNico Vertriest2018-06-017-22/+182
| | | | | | | | | | | | | | | | - bold, italic, underline - About button Change-Id: I8ece7d2bfca0b148b681a2fccb4a439ce179848a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-293-3/+3
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | glextensions.h: simplify #if-ery to avoid conflictEdward Welbourne2018-05-311-12/+4
| | | | | | | | | | | | | | | | The prior #if-ery was needlessly confusing; and most of it was redundant anyway. Change-Id: I82da1b38c08b93b9dc2220dd7b15ecb7dcc002af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-292-3/+5
|\| | | | | | | Change-Id: I8d8b03ea46c537b091b72dc7b68aa6aa3a627ba6
| * Doc: Update Echoplugin ExampleNico Vertriest2018-05-281-0/+0
| | | | | | | | | | | | | | | | | | | | - screenshot - connect syntax Task-number: QTBUG-60635 Change-Id: I18c3e1fef5c623565bbf6cf33bf88e9d8135d8be Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Fetchmore exampleNico Vertriest2018-05-281-3/+5
| | | | | | | | | | | | | | | | | | | | - minor edit - updated screenshot Task-number: QTBUG-60635 Change-Id: I988ad28723131127eee0a93671b0562d8f446139 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-244-9/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Doc: Update connect syntax Order Form ExampleNico Vertriest2018-05-162-4/+4
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Ia474a23db7c32e68cb23ffa6ec14b9c6376cadec Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Modify connect statements Echoplugin ExampleNico Vertriest2018-05-161-4/+4
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I4313ff65875d20b768d7ad6e9c8322bd5cf7f1ab Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: update connect syntax digitalclock exampleNico Vertriest2018-05-161-1/+1
| | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I9d8411b639e5cf74c9cb03de4b5f6081bb549151 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * QLineEdit example: fix link to QLineEdit::setInputMaskChristian Ehrlicher2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | Fix a typo to properly link to setInputMask instead setMask. Task-number: QTBUG-61775 Change-Id: I0cb00de8dcaece613467e25b41e93661d6e98308 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Rename the tablet example to avoid triggering a bug in tablet driversAndre de la Rocha2018-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems there is a subtle bug in the Wacom tablet drivers for Windows that is triggered in the very particular case where the running executable is named "tablet.exe", regardless of its installation path. It causes WM_POINTER* messages not to be delivered to the application, initially, but only after the application's window is reselected, after another application's window had been selected. It happens at least on Windows 10 systems with Wacom Bamboo tablets and drivers, and was reproduced with non-Qt-based applications also. It looks like a bad compatibility setting that makes "tablet" a cursed target name for applications using tablet functionality. It seems older versions of the drivers used to contain an executable with this name, although it seems to be absent in newer versions. Unfortunately, the Qt tablet example uses this name, which breaks it when used with upcoming WM_POINTER* messages support. Change-Id: I931cc725b9117b4604267f7b0172110ae61700de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-036-7/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * Examples: Fix unused variable warnings by ClangFriedemann Kleint2018-05-023-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | mainwindow.cpp(59,11): warning: unused variable 'ROWS' [-Wunused-const-variable] const int ROWS = 2; mainwindow.cpp(60,11): warning: unused variable 'COLUMNS' [-Wunused-const-variable] const int COLUMNS = 3; mainwindow.cpp(76,19): warning: unused variable 'message' [-Wunused-const-variable] Task-number: QTBUG-60635 Change-Id: I97c31462ffa826da9baa32c33c0ff0140bf46dfc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Examples: Fix Clang warning about hiding QGraphicsItem:::advance()Friedemann Kleint2018-05-023-3/+3
| | | | | | | | | | | | | | | | | | In file included from edge.cpp:52: ./node.h(76,10): warning: 'Node::advance' hides overloaded virtual function [-Woverloaded-virtual] bool advance(); Change-Id: I9d437059362c367e452b1b4f16077d4e0abd18de Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-262-41/+58
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| * Doc: Update doc for Dir View ExampleNico Vertriest2018-04-251-11/+10
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I4a23f4866c76b9f5c29653ca30e44c3b844a9aa8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Gradients ExampleNico Vertriest2018-04-251-30/+48
| | | | | | | | | | | | | | | | | | modify to latest syntax for connect statements Task-number: QTBUG-60635 Change-Id: Ie0f8f6bdbd5aec7379f7572e978adf65b9a96bdc Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Examples: fix wrong QRegExp in Custom Sort/Filter Model ExampleChristian Ehrlicher2018-04-222-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | Fix wrong QRegExp in Custom Sort/Filter Model Example and replace it with QRegularExpression. Task-number: QTBUG-61129 Change-Id: I515474ee6985d36195d90dcd93876ba28a83bccc Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLars Knoll2018-04-121-1/+1
|\| | | | | | | Change-Id: I9f802cb9b4d9ccba77ca39428a5cb1afd2d01642
| * Fix documentation of the Event Transitions ExampleFriedemann Kleint2018-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix warning: eventtransitions.qdoc:50: (qdoc) warning: Unknown command '\s1' Amends 3b2d2ada5b1b66ad65eda10d70b5b48d32ef9c5. Task-number: QTBUG-60635 Change-Id: I4002c9769d30d9b8cb2a7255aa2258f6251ea39f Reviewed-by: Martin Smith <martin.smith@qt.io>
* | textedit example: Fix disabled Cut/Copy menu itemsGabriel de Dietrich2018-04-101-0/+2
| | | | | | | | | | | | | | This amends commit fe1ea010b946518803ca1cec1332945c26be83af. Change-Id: Ia1f9fa4a6dd4481b5295df986f882f1120c3d8b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-105-52/+101
|\| | | | | | | Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
| * Doc: Update connect syntax in I18n Widgets ExampleNico Vertriest2018-04-092-4/+7
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Icfa0d09ac6c9ad4396fbe1138277bb1dd866a803 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Add brief statements to Address Book Example chaptersNico Vertriest2018-04-091-2/+8
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Ice6d2b6a475ba4352a87bb46366826334aed2af2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>