aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery
Commit message (Collapse)AuthorAgeFilesLines
* Remove bindings to parent in delegatesMitch Curtis2020-07-302-2/+1
| | | | | | | | | | | | | | | | Until we've decided whether to a) document that properties of parent should not be bound to in delegates or b) fix the warning that results from doing so after 8c72e634b3b0eacbfdee883bfc34994d3c19ed77, we can pre-emptively clean up a few places where it happens. Task-number: QTBUG-81976 Task-number: QTBUG-82393 Task-number: QTBUG-82989 Change-Id: I1e610613f6016ec1b9cf9ca33cdfb15d384731a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 456d26e97ec7745fdbd1afaaaa6c1dc217eca060) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Gallery: simplify the code for the help featureMitch Curtis2020-02-1228-59/+7
| | | | | | | Use existing data from the model rather than adding new properties. Change-Id: I77f9b079d4ceefd1a0b9936b4250c2470c68836e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Gallery example: Add "Help" menu and shortcutFriedemann Kleint2020-01-1028-0/+72
| | | | | | | | | | | Add a property "control" identifying the control to be demo-ed to the page and add a help shortcut and menu item displaying its help. Change-Id: Ic3c7c31f5a44fccd57ee018fd3681dc6bdffee58 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Run optipng on all imagesMitch Curtis2019-11-047-0/+0
| | | | | | | | find . -name "*.png" -exec optipng -o 7 -strip all {} \; Change-Id: I2238b2dd38813d33ed48d79817f872f922cfa28d Fixes: QTBUG-79275 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-061-17/+24
|\ | | | | | | Change-Id: I859406dc779e59ee5d8e2980e04f8be28b1a69aa
| * Modernize Gallery example by using Action where suitableKonstantin Ritt2019-09-051-17/+24
| | | | | | | | | | Change-Id: I45c693941e88074eb63f9e6a498c85c1dfa93e9a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-241-1/+1
|\| | | | | | | Change-Id: Ib3ebf5d1ec84a9db722e7634d77bf424c37c52ce
| * examples: type userto -> userAlbert Astals Cid2019-08-221-1/+1
| | | | | | | | | | Change-Id: I99d9ea22fd51aa4e9da469b630b319ba71215558 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-221-1/+1
|/ | | | | | | | | Now that Controls 1 is deprecated, it's ideal to use "Qt Quick Controls" instead of "Qt Quick Controls 2". Task-number: QTBUG-70333 Change-Id: Ie745db4b61071ddb5e06150d4e739cda74c59f41 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-0528-62/+62
|\ | | | | | | Change-Id: I7fe9e74beff3cdbfbf02ee0f129a8204ad31046e
| * Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-0228-62/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Doc: Update \titles with "Controls 2" in itVenugopal Shivashankar2018-12-041-1/+2
| | | | | | | | | | | | | | | | Alternatively, the old \title is now a \keyword, to avoid broken links to the page. Change-Id: Ib8b97efe8be13559c45c7ca430b2afc93edaa3e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Stop using wildcards with "direct" RESOURCES syntax in examplesMitch Curtis2018-10-311-3/+51
|/ | | | | | | | | | | Build tools cannot detect when new files are added with this syntax. As we don't use wildcards with SOURCES, we also shouldn't use them with RESOURCES either. Change-Id: Ic42ee9d892a4f18a1a21bd757d7398a50792a6c7 Fixes: QTBUG-71321 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Ensure all links to 'Qt Quick Controls' lead to controls 2Venugopal Shivashankar2018-10-291-0/+1
| | | | | | | | | | The name of the documentation module is also changed from 'qtquickcontrols2' to 'qtquickcontrols', and this is reflected in other modules' dependencies and licensing source files (qt_attribution.json). Task-number: QTBUG-70333 Change-Id: I2ba308b7eddae3af00dfb49a751cac8527c46bba Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* gallery: strip png metadata to avoid warningMitch Curtis2018-07-3012-0/+0
| | | | | | | | | | | | | The warning was: "libpng warning: iCCP: known incorrect sRGB profile" The metadata was removed with this command: optipng -o7 -strip all *.png Change-Id: Icc8f365becb25f8267f93383de9ec78c18f6a03e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add Overlay attached properties and signalsJ-P Nurmi2017-06-261-4/+4
| | | | | | | | | | | | | | | [ChangeLog][Controls][ApplicationWindow] Deprecated the overlay grouped property in favor of the newly introduced Overlay attached properties. [ChangeLog][Controls][Overlay] Introduced Overlay attached properties and signals that supersede the overlay grouped property in Application Window. The Overlay attached type allows providing background dimming for popups without requiring an ApplicationWindow instance. Task-number: QTBUG-61336 Change-Id: I9df11bcb167e7725014d5f058fe24d70da4a10b3 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery: remove unneeded Material-specific iconsJ-P Nurmi2017-05-2412-0/+0
| | | | | | | | | ToolButton was changed to tint the icon so that it always follows the foreground color. Thus, it's no longer necessary to ship white versions of the icons for the Material style. Change-Id: Ibe5accc1b39559c9dfc2f94fbf3c9c323b91fe63 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery: utilize the new icon-support for the tool buttonsJ-P Nurmi2017-04-2628-14/+32
| | | | | Change-Id: I275856925ebf82c0ed8822d45299fd4d5c9218ba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery: handle Menu shortcut on mobileJ-P Nurmi2017-04-061-0/+5
| | | | | Change-Id: Ie7ad814b3999791801c60776777c6a736db1c093 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery: handle Back shortcut on mobileJ-P Nurmi2017-04-061-2/+2
| | | | | | | | | Menus, dialogs, and drawers already handle it out of the box, but for page/stack navigation we need an explicit shortcut. Change-Id: Iad3e05f0fc31dbd66e3b1aa9286f8ef076fcff0d Task-number: QTBUG-58105 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-2430-62/+352
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: be consistent about the dot at the end of example descriptionsJ-P Nurmi2017-01-111-1/+1
| | | | | Change-Id: Ie20ad311623020a439ecb701b0360fd72640fcb7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-1129-29/+29
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-0929-29/+29
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DelayButtonJ-P Nurmi2017-01-022-0/+65
| | | | | | | | | | | | | | [ChangeLog][Controls][DelayButton] Added DelayButton. Change-Id: I94820dfb41ba9b90f0a29cda01ac476b54cf3de8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add Drawer::interactiveJ-P Nurmi2016-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Drawer] Added interactive property that specifies whether the drawer reacts to swipes. This can be used to make drawer a non-closable persistent side-bar. Task-number: QTBUG-53169 Change-Id: I00a794b5ce47b86fcb28e0db784ca0488cd13a7d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ComboBox::editableJ-P Nurmi2016-11-241-1/+24
| | | | | | | | | | | | | | | | [ChangeLog][Controls][ComboBox] Added editable property Task-number: QTBUG-53876 Change-Id: I1cb035b3bb4c63f7935f08298814005fad51b5eb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-1713-238/+5
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * Gallery: improve designer compatibilityJ-P Nurmi2016-11-179-27/+5
| | | | | | | | | | | | | | | | | | | | Get rid of some unnecessary Math.min/max() calculations, and let the controls just stay at their implicit size. As for the buttons, we can use ColumnLayout + Layout.fillWidth to ensure that they all have the same size. Change-Id: Iaed29b330d7edc1f5d2c05d8815a559d52d52bcc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Gallery: kill some useless pagesJ-P Nurmi2016-11-174-211/+0
| | | | | | | | | | | | | | | | | | | | | | | | The pages for drawer, menu, and popup were pretty useless, because they did not really illustrate how the respective controls are used. They were just opening the side drawer, options menu, and settings dialog from elsewhere in the app. Coincidentally, these pages also contained some imperative signal handlers, which prevents them from being opened in Qt Quick Designer. Change-Id: Iad606c05a1289d22e2f25c28a16581b979a58da6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devJ-P Nurmi2016-11-112-0/+217
|\|
| * Gallery: add a page for dialogsJ-P Nurmi2016-11-022-0/+217
| | | | | | | | | | Change-Id: Ib29a41d9d3fc4940e94ee59be109aefbb35db043 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickStyle::availableStyles()J-P Nurmi2016-11-102-1/+2
|/ | | | | | | | | | | | This allows us to introduce platform-specific styles, such as the iOS style, and make them appear correctly in the Gallery example so that we don't have to hard-code the lists separately for different platforms. [ChangeLog][Controls][QQuickStyle] Added availableStyles() method that returns the list of available built-in styles. Change-Id: Ieea88577f402cbc52a844d6777e64c6bd55c5ab9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-311-4/+13
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/CheckIndicator.qml src/imports/controls/RadioIndicator.qml src/imports/controls/RangeSlider.qml src/imports/controls/Slider.qml src/imports/controls/SwitchIndicator.qml Change-Id: I32612d2f905ffa02dbaedbb1f84c8237fbd66db3
| * Gallery: make the drawer usable with keyboardJ-P Nurmi2016-10-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Give it focus, and remove the check for the current index. It's a leftover from the days when Gallery used to replace the current page instead of doing a push. It looked silly to replace a page with the same page. This can no longer happen, because the drawer is not even accessible when navigated to a control page. And when navigating the drawer with keyboard, it is exactly the current item that must be triggered when you hit the spacebar. :) Change-Id: I00b48fbe4dd61b06041cb0c3370dfa9c12505dcf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Gallery: add Escape shortcutJ-P Nurmi2016-10-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This does not work very well, yet. The purpose is to demonstrate the lack of co-operation between of QML Shortcuts vs. QQC2 Popups. For example, the back navigation shortcut activates in the background when the modal settings dialog is open. The consequent commits are going to fix these issues step by step. Task-number: QTBUG-56562 Change-Id: Iceafc175f4da8054b65d664a3e0faf0087d0dec5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickDialog::titleJ-P Nurmi2016-10-261-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | Dialog is incomplete without built-in support for title. All dialogs in the examples, screenshots, webinars, and blog posts have had a custom title. The Material and Universal designs both have specs for dialog titles. This commit adds support for dialog titles with appropriate looks (padding & font) out of the box. Task-number: QTBUG-56711 Change-Id: I248150313f1ce629a7105fdbe1c70c8fcd69e1cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use relative paths for imagesThomas Hartmann2016-10-226-8/+8
| | | | | | | | | | | | | | This is easier to handle for tooling. Change-Id: Ib6b20f06426324bc5d1bd4b66f72d9b0e9a0da87 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Gallery: fix the height of the settings dialogJ-P Nurmi2016-10-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The settings dialog used to be a plain Popup, which does not provide buttons. There were manually created Ok and Cancel buttons in a column together with the other contents, and the height of the column was used to calculate the total height of the dialog. Now that the new Dialog type with support for standard buttons is used, the height of the column is no longer sufficient since the dialog buttons are not part of it. Just let the dialog calculate the appropriate height based on its width and content. Change-Id: Ib4edf6e525214429887ad4ec6371ac0b5624c2e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-0321-209/+226
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * Gallery: make most pages scrollableJ-P Nurmi2016-09-2922-209/+227
| | | | | | | | | | | | | | | | | | Add a ScrollablePage type, which provides the scrolling behavior. The available space can be quite limited, especially in landscape on low resolution devices. Change-Id: I4d2911aa6bfa6d8573a1385b5a06ef2cf3e2e548 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-2610-5/+13
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickstackview_p.cpp src/quicktemplates2/qquickstackview_p_p.h tests/auto/controls/data/tst_stackview.qml Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
| * Gallery: allow navigating back to the home pageJ-P Nurmi2016-09-2610-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | Instead of replacing the home page and throwing it away for good, push control specific introduction pages on top. Change the drawer button to a back button to allow navigating back. Also, disable the drawer while not on the home page to keep the navigation simple. Thanks to Wolfgang Schneider for bringing up the idea in QTBUG-54300. Change-Id: Ie0501332e27d7edab59eef32e59a27973b59ebf3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-031-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Also update expected line numbers in tst_swipedelegate. Conflicts: .qmake.conf src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h tests/auto/controls/data/tst_swipedelegate.qml Change-Id: I36323e3a633c1c750d23014e56a7c881963a1a30
| * Example: Made the SpinBox editableVenugopal Shivashankar2016-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | The text on the SpinBoxPage mentions that the control value can be changed using the keyboard, which is possible only if the control is 'editable'. Task-number: QTBUG-55033 Change-Id: I5a01321d4677a298608f7fb88960301eb8bf1518 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Gallery: use the new .pro syntax for RESOURCESJ-P Nurmi2016-07-212-66/+4
| | | | | | | | | | | | | | | | | | A .qrc file is no longer mandatory. One can list resources directly in the RESOURCES variable. This results to a flatter Resources-tree in Qt Creator's project tree. Change-Id: If272e4a7974f433552cb848ddc83827dd09669d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogJ-P Nurmi2016-07-181-14/+12
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added Dialog to provide convenience for handling dialog popups. Dialog integrates with DialogButtonBox, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I776516738b82c0e5726769c054d6f2a956fb616d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Gallery: round settings dialog's coordinates and sizeJ-P Nurmi2016-07-181-3/+3
| | | | | | | | | | | | | | | | Make sure it doesn't land between the pixels, which may look awkward with antialiased rectangles and graphical effects / shaders. Change-Id: If4919dd97670437ffe40a060fd8e1e72b5a982a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: add swipe.pressed and swipe.clicked()Mitch Curtis2016-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | These allow users to detect when non-interactive left/right/behind items are being pressed and clicked. [ChangeLog][SwipeDelegate] Added swipe.pressed and swipe.clicked() for detecting when non-interactive left/right/behind items are pressed and clicked. Change-Id: I858f0a8e4f85b3f80f93eb4f1680d8e121acdd41 Task-number: QTBUG-54651 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-092-2/+2
|\| | | | | | | Change-Id: Ifff470774347041d1638fb1da277a8cc11a00db6