summaryrefslogtreecommitdiffstats
path: root/examples/widgets/desktop
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Correct qdoc compilation errors qtbaseNico Vertriest2020-01-091-2/+2
| | | | | | Task-number: QTBUG-79824 Change-Id: I4be365d92b1adfde09efd04d088f75c506666a95 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-152-3/+4
| | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-121-4/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| * Fix the systray example to only show an icon when requestedVolker Hilsheimer2019-07-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The "None" and "Custom icon" cases where using the same value for icon type, which resulted in both options showing the application icon. Use -1 to indicate the custom option, and treat all other options the same. Task-number: QTBUG-76916 Change-Id: Ib715f5d328175bd6e221b3f507087954fa542838 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-201-0/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| * Use High DPI pixmaps in prominent examples and testsFriedemann Kleint2019-03-151-0/+2
| | | | | | | | | | | | | | | | | | Set AA_UseHighDpiPixmaps. Task-number: QTBUG-52622 Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Cleanup Widgets examples - foreachChristian Ehrlicher2019-01-231-1/+2
| | | | | | | | | | | | | | | | | | Cleanup the Widgets examples - replace foreach with range-based for loop in the remaining directories Change-Id: I321e6c0f414401a1ae4fb65762b97d894b725afa Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | Cleanup Widgets examples - nullptrChristian Ehrlicher2019-01-232-2/+2
|/ | | | | | | | | Cleanup the widgets examples - replace 0 with nullptr Change-Id: Id4bf119b9a41f6d10117f3a613a6e604128fa196 Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-202-0/+2
|\ | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-122-0/+2
| | | | | | | | | | | | | | | | | | Compiling the default examples should be possible without compile errors. Task-number: QTBUG-53141 Change-Id: I73d8787241291ae6230861a89b38e91d900fede0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Use dependencies instead of CONFIG+=orderedAllan Sandfeld Jensen2017-12-021-1/+0
|/ | | | | | | | Also drops a few instances where the dependency was purely runtime, especially for examples. Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-252-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| * examples: Use QOverload to select overloaded signals and slotsAlexander Volkov2016-12-222-4/+2
| | | | | | | | | | | | | | | | | | | | | | We can use QOverload since Qt 5.7 (it depends on Q_COMPILER_VARIADIC_TEMPLATES which is required since Qt 5.7). Use it in the examples to show the best practice. qOverload currently can't be used because it requires c++14. Change-Id: I94a3c0db9d551fe169fa3d19c07ec0b329d5946c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-132-2/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * Doc: update Qt Widgets examplesNico Vertriest2016-12-122-2/+3
| | | | | | | | | | | | | | | | - \image --> \borderedimage - update screenshot if required Change-Id: I0318b1df67154b70c061da7cbd509b8d5337b311 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Support large custom icons for the system tray balloon notificationSerge Lysenko2016-09-071-2/+10
|/ | | | | | | | | | | | Modern platforms such as macOS and Windows support large fancy icons in the system balloon notification. We just need to pass the icon into platform plugin. [ChangeLog][QtWidgets][QSystemTrayIcon] Support custom icons in showMessage() Task-number: QTBUG-49283 Change-Id: Iaeca36fe1bf350eae34d105549010ecbedf9c0a1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-152-3/+3
|/ / | | | | | | | | | | | | | | Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* / Unify license header usage.Jani Heikkinen2016-03-297-23/+83
|/ | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Doc: removed double occurrence of systray.qdocNico Vertriest2016-01-261-7/+6
| | | | | | Task-number: QTBUG-50287 Change-Id: Iaf8602fc338dadcc0998f33d41ad9fbc827589e2 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Fix the closeEvent of the systray example on OS XAlejandro Exojo2015-11-032-1/+10
| | | | | | | | | | | The implementation of the close event handler requires handling the two close events that are received on OS X when the user quits through the application menu bar or the Command+Q shortcut. The first is an spontaneous event, and the second a non-spontaneous one with the window already closed. Change-Id: I24e3d3f0de4d631bd2d5616c85ce747f085691e0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-023-0/+183
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Doc: System Tray Icon exampleNico Vertriest2015-09-043-0/+183
| | | | | | | | | | | | | | | | Moved from qtsvg to qtbase Task-number: QTBUG-47201 Change-Id: Iab185ea2e270893c0937d1ff87fdb544d226d603 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Polish the screen shot example.Friedemann Kleint2015-09-013-82/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove unneeded member variables. - Set window sizes depending on screen geometry for High DPI screens. - Flesh out code for saving the image, setting the supported mime types on the file dialog. - Streamline constructor code, remove create...() functions. - Use new connection syntax in createActions(), - Obtain the screen from the widget. - Adapt documentation. Remove note saying that widgets do not need the parent parameter (since creating parentless widgets can result in flicker in some cases), explain that QScreen pointers should be checked. Change-Id: I0332bbf10eafe861fe3fd5573522694ab5c0183a Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Polish the systray example.Friedemann Kleint2015-09-011-12/+13
|/ | | | | | | | - Port it to new connection syntax. - Replace module include by class includes. Change-Id: I1b8d682bb7bb2e05b6b2b77a9c0d01730ea09cf2 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-156-18/+18
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-116-30/+30
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* systray example: revert the heart icon to its previous versionShawn Rutledge2015-01-281-0/+0
| | | | | | | | | Change e910c36a3f5cdd01c1a7bebe409189fda2d128e2 unintentially included a cropped version of this icon to test what happens with non-square tray icons. Now reverting to the original version. Change-Id: If49de2f54bfce7f11576317908f8742abffc105a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* D-Bus tray icon: ensure that the image is square before sendingShawn Rutledge2015-01-231-0/+0
| | | | | | | | | Sometimes KDE doesn't render non-square icons properly when they have been received over the D-Bus protocol. Change-Id: Icc6fa3d64a1598ea8f719192ae18d32f287d6a79 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Balloon tip must follow systemtray iconAllan Sandfeld Jensen2014-09-251-0/+1
| | | | | | | | | | | | | | | If the a message notification is created at the same time as the system tray icon is embedded it may start at a wrong location, since the icon location it bases its own location is not yet final. This patch adds code to update the balloon tip location when the system tray icon is moved or resized. The bug and fix can be tested by the systray example by disabling the icon and letting show message trigger both showing it and the message. Change-Id: Ie1dc10489ad420e581e32afeb757c236fb5129ab Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-152-3/+3
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-092-4/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-186-6/+6
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-171-1/+2
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove QT+=widgets from SUBDIRS projectsOswald Buddenhagen2012-12-171-2/+0
| | | | | | | it makes no sense whatsoever Change-Id: Ica7c764575079a12512ee2eb62a995ebbefa09a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix compile with -DQT_NO_SYSTEMTRAYICONMontel Laurent2012-12-063-1/+34
| | | | | Change-Id: Icca0bef7efca77a841b30f40692144663e7ae913 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-293-12/+2
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* delete .desktop files of examplesOswald Buddenhagen2012-11-282-22/+0
| | | | | | | | | they were added without an explanation, and they can't be particularly useful (because they contain hard-coded paths and refer to non-existing icons). Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-263-6/+6
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QtBase: example code styleDavid Schulz2012-11-253-26/+15
| | | | | Change-Id: I0685f7e2c7c698a4bf288b8b1ae909167932a3fb Reviewed-by: hjk <qthjk@ovi.com>
* Fix building of examples.Friedemann Kleint2012-11-213-7/+7
| | | | | | | | | | | - Correct install path of widget examples to contain widgets directory in target tree. - Add missing resources. Task-number: QTBUG-27977 Change-Id: If4cb117998892b0b165d7678367553d3a7553b91 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-226-36/+36
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Moving .qdoc files under examples/widgets/docGabriel de Dietrich2012-08-2016-0/+870
Updated those .qdoc files to refer to the new relative examples emplacement. Images and snippets to be moved later. Also grouped all widgets related examples under widgets. Change-Id: Ib29696e2d8948524537f53e8dda88f9ee26a597f Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>