summaryrefslogtreecommitdiffstats
path: root/examples/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Cleanup Widgets examples - new signal/slot syntaxChristian Ehrlicher2019-01-0614-140/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Widget examples - use the new signal/slot syntax where possible - painting and richtext subdirectory Change-Id: If0e365ab1cabf9184076595494cfca151406fddf Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Cleanup Widgets examples - new signal/slot syntaxChristian Ehrlicher2019-01-0313-61/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Widget examples - use the new signal/slot syntax where possible - tutorials subdirectory Change-Id: I741589f6616578412ad74f8371e0e3c87df783a2 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * | Cleanup Widgets examples - new signal/slot syntaxChristian Ehrlicher2019-01-0313-94/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Widget examples - use the new signal/slot syntax where possible - layout, statemachine, tools and touch subdirectory Change-Id: I466b309b643ef7ffc27be7591fa10f4c75cfd3f8 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Fix typo in fetchmore example documentationJeremy Whiting2018-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In fetchmore example documentation there's a typo on the first line. The text should read 'shows how to' but instead reads 'shows how two' Change-Id: Ifc169581e8fc43315dc01c7d1f267dd45600af82 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Cleanup Itemviews examplesChristian Ehrlicher2018-12-1724-92/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Itemviews examples - use nullptr instead 0 - use for loop instead foreach - include own header first - remove uselss includes Change-Id: I32e9f64356e42038707d063dcad977239ce1fe9e Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Cleanup Widgets examples - Validator exampleChristian Ehrlicher2018-12-174-85/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the widgets examples - move the ValidatorWidget class into its own source/header file instead of implementing it in main.cpp Change-Id: I2b74ca4f2491168453dc31e0631f31e3ac83123c Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Cleanup Widgets examples - parent ctorChristian Ehrlicher2018-12-1325-30/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Widgets examples - add missing parent parameter Change-Id: I5cd7aa333dbb8e6e4b7b9e05c085120733da83ec Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | DropSite example: fix documentationChristian Ehrlicher2018-12-102-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DropSite documentation mentioned the foreach keyword which was removed some times ago in the code. Therefore also remove the corresponding documentation snippet. Change-Id: Id9dd3f01dbdd37eeda43fabe12b60ef9e0b32d10 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-12-047-2/+441
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-047-2/+441
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
| | | * Codecs example: Add a dialog for showing common C++ encodingsFriedemann Kleint2018-11-307-2/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a dialog where the user can enter a line of text, which is then displayed in several encodings with special characters converted suitable for C++/Python string literals. Task-number: QTBUG-60635 Change-Id: Ibd436f9f76e128c93cbb581235c730d636641d8a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | | Cleanup SimpleDomModel exampleChristian Ehrlicher2018-12-046-44/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the SimpleDomModel example: - include own headers first - use nullptr - use const where possible - init members in initialization list Change-Id: If7029a774793927b9a3a9115ea4a7053402a86a1 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * | | Cleanup StarDelegate exampleChristian Ehrlicher2018-12-048-50/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the StarDelegate example: - use QStyledItemDelegate instead QItemDelegate - use nullptr and other useful c++11 constructs - include the correct headers Change-Id: If2f65fe7cbdcdd4571d10ffa98d36eeab7836bbb Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * | | Cleanup Addressbook exampleChristian Ehrlicher2018-12-0411-134/+120
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Addressbook example: - use nullptr - use for instead foreach - don't use public members but setters/getters - use QVector instead QList - make user-visible translatable Change-Id: Ie7bdad8a2799c8fa6f634659b51c3064cc8a04ce Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * | Cleanup Spreadsheet exampleChristian Ehrlicher2018-11-238-71/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the Spreadsheet example: - use nullptr - use for instead foreach Change-Id: I55deed157403a46d98a6d753ef46e4cbe5730b4f Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-1329-192/+161
| |\| | | | | | | | | | Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
| | * Itemviews: Cleanup examplesChristian Ehrlicher2018-11-1229-192/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup some minor issues in the chart example: - remove unused members - use initializer list for members - pass a proper role to dataChanged() - honor roles parameter in PieView::dataChanged() - use nullptr instead 0 - use new-style connect - fix indentation and other whitespaces Change-Id: Idb212b07c006fe3ae31bee9cd9b1ba4d03043b5e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-107-2/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborcommon.h src/corelib/tools/qlocale_data_p.h tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
| | * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-096-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| | | * Update the floppy disk icon (save) to be physically correctThiago Macieira2018-11-066-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Documentation] Fixed the icons for the "file save" action that were inaccurate representations of a 3.5-inch floppy disk (the cut edge was on the wrong side). Now all floppy representations are physically accurate. Change-Id: Ia3b27ae12a1a4fefa3b7fffd155bb86fee5271c3 Fixes: QTBUG-71012 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Fix composition example during OpenGL resizesAllan Sandfeld Jensen2018-11-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous images were sometimes not cleared correctly. Change-Id: I62949b756bf797aa79c5160774f2f258e5c353dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Qt Forward Merge Bot2018-11-064-44/+61
| |\| | | | | | | | | | | | | | refs/staging/dev
| | * | Tablet example: Fix warning about switch/fallthroughFriedemann Kleint2018-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Q_FALLTHROUGH(), fixing: tabletcanvas.cpp:222:55: warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: I573f4add56774218e28a7c5f1dac09c5402333c0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Notepad example: Get rid of auto-connection slotsAlexander Volkov2018-11-013-43/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Their correctness is not checked at compile time and even object renames can break code. Change-Id: I99273a28743a79a76c00e6db0ed4cd6d7eba8bf2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | | Fix use of deprecated ItemDataRoles Background/TextColorRoleChristian Ehrlicher2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole and explicit deprecate them for 5.13 Change-Id: I6b0d99844a32d2f5fdfd1878317a7b7422b800d3 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Fix usage of QGuiApplication::set/resetOverrideCursorChristian Ehrlicher2018-11-057-20/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Replace all occurrences of QApplication::set/resetOverrideCursor with the QGuiApplication::set/resetOverrideCursor since it's a static function of QGuiApplication. Change-Id: Ic898ab50a7ad4ed2bc9c6acb26cf4a979c2f82af Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Move arthurwidget based examples to new QOpenGL classesAllan Sandfeld Jensen2018-10-1718-239/+346
| | | | | | | | | | | | | | | | | | | | | | | | Several of the examples were not even working besides using deprecated classes. Change-Id: I352e0629d490593edcc5868d2ec5a8ff222eaeab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-173-10/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "animation" featureLiang Qi2018-10-123-10/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | CMake: allow custom plugin output/install directoriesTobias Hunger2019-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Only require TYPE if no OUTPUT_DIRECTORY, ARCHIVE_INSTALL_DIRECTORY and INSTALL_DIRECTORY is provided. Change-Id: I6db1cfaa576bfa3ee3dc8ecf81db20e3afcd61e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | CMake: Add widgets examplesTobias Hunger2019-03-26192-0/+4052
|/ / | | | | | | | | Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | 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>