summaryrefslogtreecommitdiffstats
path: root/examples/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-143-40/+32
|\ | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * Examples/OpenGLWindow: do not use hardcoded indicesChristian Ehrlicher2019-10-021-11/+14
| | | | | | | | | | | | | | | | | | | | | | Don't use the hardcoded indices 0 and 1 but the ones returned from QOpenGLShaderProgram::attributeLocation(). Also change them from GLuint to GLint. Fixes: QTBUG-43566 Change-Id: I582bcf899f20d90f4ec1cd61326a177aabb69992 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Cleanup QtOpenGL examplesChristian Ehrlicher2019-09-303-32/+21
| | | | | | | | | | | | | | | | | | | | | | Cleanup the OpenGL examples - use nullptr (clang-tidy) - use member-initialization - avoid redundant checks for != nullptr when deleting a pointer Change-Id: I3e4702690ed79e71c3e952d51ceef83b907b45b7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-143-3/+3
|\| | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
* | Fix compiling of examples on AndroidSimon Hausmann2019-06-123-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix linking of examplesSimon Hausmann2019-06-123-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide add_qt_gui_executable() as function in our public API that takes care of automaticWinMain linkage. We can use this in the future to encapsulate similarplatform-specific behavior and adjustments, such as module generation onAndroid. In order for the examples to see the function in Qt5CoreMacros, three more additional fixes were required: * Do the build_repo_end() call _before_ attempting to build the examples, as we need the build_repo_end() to include QtPostProcess and complete the creation of all the target config files. Otherwise the find_package() calls in the examples see something incomplete. * Add more QT_NO_CREATE_TARGET guards * Always call find_dependency on the dependencies, regardless of the target creation mode. This way a find_package(Qt5 COMPONENTS Widgets) will still load Qt5CoreMacros. Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow to build examples as standalone projectKevin Funk2019-06-053-44/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create CMake config files which can be used from the very same CMake project. These CMake config files simply do not create any targets, controlled via the QT_NO_CREATE_TARGETS. This patch also allows to build qtbase.git:examples as a standalone project, against an already-built Qt. Ran this: ag -s "QT " examples -l -0 | xargs -0 -n 1 .../util/cmake/pro2cmake.py --is-example Task-number: QTBUG-74713 Change-Id: I44cce5a4048618b30f890c5b789592c227a8b47d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-1/+2
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Take device-pixel-ratio into account in openglwindow exampleTor Arne Vestbø2018-11-201-1/+2
| | | | | | | | | | | | | | | | Also affects the windowcontainer example, which includes an OpenGL window. Change-Id: Ic9f0f2aa66410b657e08c0225b085dd8df44e2a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | CMake: Add more examplesTobias Hunger2019-03-264-4/+62
| | | | | | | | | | Change-Id: I7a8a3fd0a844a518592957fe07c6e707dd452d5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Use AUTOMOC/AUTOUIC/AUTORCCTobias Hunger2018-12-141-17/+5
| | | | | | | | | | Change-Id: I0235ca4f227623e5937348b4b010637921dbf154 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Begin port of qtbase to CMakeSimon Hausmann2018-11-012-0/+19
|/ | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* Provide presets for QGradientTor Arne Vestbø2018-05-311-1/+1
| | | | | | | | | | | | | Similar to Qt::GlobalColor, the presets allow the user to create brushes based on predefined gradients, quickly getting pretty pixels on screen. The presets are based on the linear gradients from WebGradients, a free collection of gradients, hosted at https://webgradients.com/. The few radial and blended gradient presets have been excluded. Change-Id: I1ce8f2210a6045c9edb8829ab3eddcc313549127 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update rasterwindow example to not render in resizeEventTor Arne Vestbø2018-03-202-5/+2
| | | | | | | | | | | | | | | | The resize event should not be used to draw, as there will be a follow-up exposeEvent delivered just after, and we don't want to draw twice. This is how QRasterWindow operates too, except it defers the backingstore resize to beginPaint() instead of resizing in the reizeEvent. It's also how QOpenGLWindow operates, which also has a note for the virtual resizeGL method saying: "Scheduling updates from here is not necessary. The windowing systems will send expose events that trigger an update automatically." Change-Id: I2a9740018508c2eb129149f53237ee8e378c03b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* rasterwindow: End painting on device before ending on backingstoreTor Arne Vestbø2018-01-291-0/+1
| | | | | Change-Id: Ib42de1d7ad0d14e2e2d2ff75606e6cfd7e584c2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* doc: cleanup raster window exampleGatis Paeglis2017-07-031-8/+3
| | | | | | | | | | | | | Documentation does not match the sample code. There is no explicit call to QWindow::create(). It is called implicitly by QWindow::show(). Furthermore, QWindow::create() documentation states: "Note that it is not usually necessary to call this function directly, as it will be implicitly called by show(), setVisible(), and other functions that require access to the platform resources.". Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* examples: fix compile without gui modulePeter Seiderer2017-05-051-1/+1
| | | | | | | | | | | | | | 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>
* Modernize rasterwindow/openglwindow examples to use requestUpdate()Tor Arne Vestbø2016-09-226-30/+16
| | | | | Change-Id: Ib8d0c42db7343247d0431ea008eb17da9ee98f4d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Modularize configure.json/.priLars Knoll2016-09-151-2/+2
| | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-091-1/+1
|\ | | | | | | Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-051-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
| | * Fix rasterwindow exampleJake Petroules2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | At least with the eglfs platform plugin, the QBackingStore constructor results in a null pointer access if done before creation. Change-Id: I2e78e70700fa48499a35c55797e1b962b6e6285a Reviewed-by: Rebecca Worledge <rebecca.worledge@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-154-9/+9
|/ / | | | | | | | | | | | | | | 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-2910-36/+106
|/ | | | | | | | | 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: remove unused code from OpenGL Window exampleSamuel Gaist2015-10-071-10/+0
| | | | | Change-Id: Ifb2c7206dee55102eba91b4c30543f3ac4838259 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-157-21/+21
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1110-53/+53
| | | | | | | | | | | | | | | | | | 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>
* Doc: Updated thumbnail images for some examples.Jerome Pasion2014-10-281-0/+0
| | | | | | | | | | | | | | | | | | | -Application Example -Analog Clock -Analog Clock Window -Scribble -Digital Clock -Thumbnail images were created with an obscure window manager and they look out of place in the Welcome Mode in Qt Creator. -Used Windows 7 as the platform. -Images within the documentation not updated because they are still relevant. Task-number: QTBUG-33597 Change-Id: I255fc4960e9adcec273f21287ef2182656c6b007 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Use title case in section1 titlesNico Vertriest2014-09-301-2/+2
| | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-154-9/+9
| | | | | | | | | | | | | | | | | | 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>
* purge vestiges of opengl es 1 supportOswald Buddenhagen2014-04-041-1/+1
| | | | | | | | amends 0d5170256c1. Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix compiler warning in exampleKai Koehne2014-03-201-1/+1
| | | | | | | | | | | | | Fix warning main.cpp:160: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Change-Id: I4b74e8f56136077ef9a71b803d2756394fcd7658 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Avoid truncation warning in openglwindow exampleLaszlo Agocs2014-02-211-1/+1
| | | | | | | | msvc shows a warning about double -> float truncation. Avoid this. Change-Id: I1b74cf407c81c881df5e95cc7d64a210888595e3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* skip gui-needing examples with -no-guiOswald Buddenhagen2013-10-111-0/+2
| | | | | Change-Id: I2413f14f0c2d9179868877615d6131bf4ca7ea16 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* improve openglwindow example a bitGunnar Sletta2013-03-213-13/+4
| | | | | Change-Id: I50e00c33c100beab975d0fcbfc4ccdd496cccbaf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fixed qtbase examples build when configured with -no-openglSamuel Rødal2013-02-201-1/+3
| | | | | | Change-Id: Idafdc3264f760d6400ce04bb9da36289b1f96438 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix unopened commentSze Howe Koh2013-01-281-1/+1
| | | | | Change-Id: I68d131bb29ed4c150ef2630654d2b8ff59ea47cf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1810-10/+10
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: corrected typo "the the"Nico Vertriest2013-01-111-1/+1
| | | | | | | | | | | Task-number: QTBUG-28756 Spurious repetition of the definite article Trailing space issue corrected. Change-Id: I3a051f5dc291e546d8d67d6775e84b388bdc0363 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* fix examples/gui/analogclock for MSVCJoerg Bornemann2012-12-191-0/+3
| | | | | | | | | | This example is hit by the infamous QTBUG-13496 issue. Task-number: QTBUG-28665 Change-Id: I9bcffe72d34b1eaa9f5beafc69a16913a597d17f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Qt Gui Examples: Fixed QDoc filesChristiaan Janssen2012-12-183-0/+0
| | | | | Change-Id: I160d8d186a1078f20f2b779bfbdae90459c27641 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Entered hardcoded url workaround QTBUG-28500Nico Vertriest2012-12-141-2/+2
| | | | | | | | Url for OpenGL Registry Url for Khronos OpenGL ES API Registry Change-Id: I682ddcedf1e06d589e5c44e364936c78fd9219a5 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Some fixes to the OpenGL docs in GUIGunnar Sletta2012-12-121-0/+0
| | | | | Change-Id: I6415ff16b1765a5814d50a4cd39db00495d43073 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fixed installation of gui examples' targetsOliver Wolff2012-12-103-0/+9
| | | | | Change-Id: Ie945ffac56ed83d2dc4605a073bcab4ef6f290ac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix reference to example pathshjk2012-12-063-3/+3
| | | | | | | | This eliminates seven EXAMPLE PATH DOES NOT EXIST warnings. Change-Id: Iaa6267138a1799fb775f0034805d5691bfa40d7c Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add \brief to the examples.Eike Ziller2012-11-293-3/+3
| | | | | | | | | That is used by qdoc to generate brief descriptions for the example manifests. Change-Id: I142a6d3259f90d0c9990033b3c36e139062ac343 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <qthjk@ovi.com>
* remove meaningless OTHER_FILES assignmentsOswald Buddenhagen2012-11-282-6/+0
| | | | | | Change-Id: Id3d5690d5b174e5374332158709365ab431f660b Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>