aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-2114-270/+241
|\ | | | | | | Change-Id: If96a7e488b7964e56c06c9e367ff9c91f1bba526
| * Whitespace fixesJ-P Nurmi2016-11-201-1/+1
| | | | | | | | | | Change-Id: I4eab43944ec03b79d713db1c6756e76cbfa38b30 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * qtquickcontrols2-contactlist.qdoc: remove stray image-tagJ-P Nurmi2016-11-201-1/+1
| | | | | | | | | | Change-Id: I7c88bfbe8e7d3738302d859e4dafc2d0b5fdfee3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Overhaul the Contact List exampleJ-P Nurmi2016-11-186-89/+90
| | | | | | | | | | | | | | | | Some renames, API tweaks, and structural changes. Glue the pieces (view/model/dialog) together in contactlist.qml. Change-Id: Id3a31248b391838c6d39f2f0f355e1c35456ccf5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Contact List: tweak the section headerJ-P Nurmi2016-11-182-21/+8
| | | | | | | | | | | | | | | | | | Replace the old-fashioned gradient with a ToolBar. It stands out more than well enough, and is fully style-agnostic. Also, give descriptive IDs for better designer integration/preview. Change-Id: Ib2d4404e3c0fa769ac661645046a25e578f62d37 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Contact List: give the contact dialog focusJ-P Nurmi2016-11-172-0/+2
| | | | | | | | | | Change-Id: Id8d48a42e283e262c44a9f2c64268459a4a11050 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: add dialog titlesJ-P Nurmi2016-11-171-0/+2
| | | | | | | | | | Change-Id: Ia842791e28380fd672d3edfe0e6acad0613a64ae Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: cleanup the list viewJ-P Nurmi2016-11-171-4/+1
| | | | | | | | | | | | | | No clipping, current index, or x-coordinates needed. Change-Id: Ibfb4a8e1159072a84ee229607b28e7f4010eb925 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: fix model insertionJ-P Nurmi2016-11-171-3/+5
| | | | | | | | | | | | | | | | New contacts must be inserted in alphabetical order so the sections stay sane. Change-Id: I39279bbeb429198b38a2b4da1d76eb50bfab723c Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: simplify the ContactModel gettersJ-P Nurmi2016-11-171-12/+4
| | | | | | | | | | | | | | QList::value() does the boundary checking for us. Change-Id: I6965e6be861da86d35e6f30f74c94ba39e4ad2ea Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: rename AddressModel to ContactModelJ-P Nurmi2016-11-178-53/+53
| | | | | | | | | | Change-Id: I2da41a5d108b5da23dc969d30c50138ef7e42cc3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Contact List: cosmetic cleanupJ-P Nurmi2016-11-177-30/+18
| | | | | | | | | | Change-Id: I5782451235269cac8c4e6aaf319a30151cb599ef Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-1725-108/+1029
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * Contact List example: replace Qt Quick primitives with ControlsJ-P Nurmi2016-11-174-32/+25
| | | | | | | | | | | | | | | | This ensures that we get the correct colors when running with different styles. Change-Id: If249f9704fbe157aab1b121cf7d09ee05ab85c14 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Contact List example: make ContactDelegate.ui.qml designableJ-P Nurmi2016-11-171-19/+5
| | | | | | | | | | | | | | | | | | Replace the MouseArea and its onClicked signal handler with a checkable AbstractButton to achieve declarative bindings and that way make it possible to open ContactDelegate.ui.qml in Qt Quick Designer. Change-Id: I764e0adc23d4a0d44dd6660ed14e224a4e0e30c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * 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>
| * Adding new example Contact ListThomas Hartmann2016-11-1715-1/+1176
| | | | | | | | | | | | | | | | | | | | This example shows how to integrate a C++ backend without disrupting the tooling. A custom list model is implemented in C++ and registered as a QML type. Change-Id: I958bc38797ef353cdb5ea23ec69ada67e132ced7 Reviewed-by: J-P Nurmi <jpnurmi@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>
* | texteditor: fix selectedNameFilter usageJ-P Nurmi2016-10-041-2/+2
| | | | | | | | | | | | | | | | texteditor.qml:165 Invalid property assignment: "selectedNameFilter" is a read-only property Change-Id: I691142ea0d3ed62a4041fb13916c251446ccea0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-0322-228/+245
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Doc: Add drop shadow for tutorial imagesTopi Reinio2016-09-271-19/+19
| | | | | | | | | | | | | | ...Using the new \borderedimage macro. Change-Id: I6a15944e898cd9b70bd8fd0999399d405dde9e59 Reviewed-by: J-P Nurmi <jpnurmi@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>
* | Doc: Update the image and example's descriptionVenugopal Shivashankar2016-09-154-12/+67
| | | | | | | | | | | | | | Replaced the png image with two jpeg images, one for desktop and touch. Change-Id: I5073244fdf82c70309e4412a51af02bbe0469c36 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: add experimental StandardPathsJ-P Nurmi2016-09-131-0/+2
| | | | | | | | | | | | | | This complements the File/FolderDialog offering. Change-Id: I44a105724321092a6efc4126c8fb25f7d31b77e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: add mnemonicsJ-P Nurmi2016-09-121-12/+12
| | | | | | | | | | Change-Id: Id11f2ab1ec9b11962e5ca3c5c5982709d9b2dac2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix sqlite detectionLars Knoll2016-09-122-2/+2
| | | | | | | | | | | | | | There is now a sql-sqlite feature in qtbase that should get used. Change-Id: I92eb47c292b13ca639fd808b397e25f8358d2e96 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | texteditor: use RoundButtonJ-P Nurmi2016-09-051-16/+1
| | | | | | | | | | Change-Id: I4cb9b2151698e30deec969868ffdb0100b7d98a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: allow passing -touch as a command line argumentJ-P Nurmi2016-09-051-2/+9
| | | | | | | | | | | | | | | | | | It was already possible to specify QT_FILE_SELECTORS=touch, but in Qt Creator, it's more convenient to specify a command line argument than an environment variable. Change-Id: I83a86aa88fb0c229d9bcedb6646351f0675db199 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor/touch: highlight the floating editor buttonJ-P Nurmi2016-08-271-2/+1
| | | | | | | | | | | | | | A style-independent way to get light foreground color. Change-Id: Idf43020d0724af993723143d74a2b1f8ab467c1e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor/touch: elide the title when it doesn't fitJ-P Nurmi2016-08-261-3/+1
| | | | | | | | | | Change-Id: Ib1e9de9d23b708e5ddfc131dce8da5570a61d17a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor/touch: simplify the toolbarJ-P Nurmi2016-08-261-72/+66
| | | | | | | | | | | | | | A single Row positioner is sufficient. Change-Id: Ib244ddf875e40df341cb99172995d1717cb6439f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: remove outdated todo-commentsJ-P Nurmi2016-08-262-4/+0
| | | | | | | | | | | | | | | | | | | | The comments refer to the original code that was setting a declarative source property in the Component.onCompleted signal handler, but this does not really apply anymore now that we have an imperative method to load document contents. Change-Id: I9054cbc6ecec2c66d65251c49a5b1de2ad0623dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: add touch UIMitch Curtis2016-08-249-18/+351
| | | | | | | | | | | | Task-number: QTBUG-54952 Change-Id: I14fe95608c4393b928edc80fc93ebaa843ce478f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | texteditor: cleanup the commented out universal importJ-P Nurmi2016-08-161-1/+0
| | | | | | | | | | Change-Id: I99c5b79d80987216be7b680de91ec6c66cf127e0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FileDialog: add missing selectedNameFilter-propertyJ-P Nurmi2016-08-141-0/+2
| | | | | | | | | | Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FileDialog: replace file(s)Selected() with declarative propertiesJ-P Nurmi2016-08-141-2/+2
| | | | | | | | | | | | | | Follow the same convention that ColorDialog, FontDialog and FolderDialog. Change-Id: I960d4fc1ba275ab997f2a079a799d2b90796eca3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FontDialog: replace fontSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | | | | | | | | This is consistent with the QML FontDialog from QtQuick Dialogs 1. Change-Id: I14a5a313be5ba9a9e0fb1645fe272cf9c2cdd389 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | ColorDialog: replace colorSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | | | | | | | | This is consistent with the QML ColorDialog from QtQuick Dialogs 1. Change-Id: I4068a98156494eb36b2d9ecf4c1af90ad173bb97 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | texteditor: enable persistent selectionJ-P Nurmi2016-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | We want to keep the selection even if the editor loses focus when a color or font dialog is opened. The selected color or font should naturally apply to the whole text selection that was there before the dialog was opened. Change-Id: I76e6b95f979a090533b028be76e7b2cf1fd53e99 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>