aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | texteditor: use "brush" icon for text color and "A" for fontMitch Curtis2016-08-122-15/+15
| | | | | | | | | | | | | | | | | | | | "F" looks a bit silly. Even though most word processing applications seem to use the "A" icon with a bar underneath it for the text color, we want to use it to represent the button that opens the font dialog, since we don't use comboboxes for that. Change-Id: I3cc60ffbe388644cdcbd9e8ec0dcffbc041aa124 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | texteditor: use a wrapping Flow for the toolbarJ-P Nurmi2016-08-121-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A proper toolbar extension would be better, but this is a workaround to make the window scalable/resizable until we have a better solution available. The font button was moved together with the other formatting buttons, because it looked a bit awkward when it was wrapping alone on the second row, and in general it caused things looking somehow mis-aligned when actions were wrapped on multiple rows. Change-Id: I0c1f432e81d5fde6aa763c13ea9efbb8af68ad50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Platform: add MenuSeparator for convenience and consistencyJ-P Nurmi2016-08-121-3/+1
| | | | | | | | | | Change-Id: I0c0aae219c81b9248a5a8a0fd0e78521cbe86360 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: replace setFileUrl() with load()J-P Nurmi2016-08-123-29/+10
| | | | | | | | | | | | | | | | This allows to remove the text property to avoid storing the whole document's initial content for no real purpose. Change-Id: Iad59576b5304be9739c1dfb0a7d4c263323b0edb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: add fileName & fileTypeJ-P Nurmi2016-08-123-22/+22
| | | | | | | | | | | | | | | | | | 'document.fileName' reads better than 'document.documentTitle', and 'document.fileType' can be set as the default suffix for the file save dialog. Change-Id: I935586296c91d3efdd5edea03d81c685e7edcab2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: cosmetic cleanupJ-P Nurmi2016-08-123-6/+5
| | | | | | | | | | Change-Id: Id1d5f0f8c1e7851ea33241fa09af5c0029b74db3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: fix, unify and cleanup the settersJ-P Nurmi2016-08-121-9/+1
| | | | | | | | | | | | | | | | | | - setCursorPosition() was missing cursorPositionChanged() - setAlignment() does not need to check for doc, it's done in textCursor() - remove the unnecessary cursor.isNull() checks to gain shorter code Change-Id: I4448224ab02fc22f43ef10749200aca80eed537c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: remove uninitialized/duplicate pointer memberJ-P Nurmi2016-08-122-20/+25
| | | | | | | | | | | | | | | | Use textDocument() similarly than textCursor() is already used, to access the underlying document and cursors. Change-Id: I1f90f95420132251792f4f9dda302c0509fbad0c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: re-order the property accessorsJ-P Nurmi2016-08-122-172/+189
| | | | | | | | | | | | | | | | | | | | There's no reason to register all setters as slots. Properties are fine for QML usage. Re-order them also in the .cpp file in the same order than they are in the header. It's a bit easier to follow when logical pairs are next to each other. Change-Id: Ib8097ecafe10f2c785b05b045694c338977860ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: simplify saveAs() - let FileDialog handle the suffixJ-P Nurmi2016-08-123-26/+12
| | | | | | | | | | Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | texteditor: fix the file dialog name filtersJ-P Nurmi2016-08-121-1/+1
| | | | | | | | | | | | | | OS X interpreted the suffix literally ".html," Change-Id: Icdf889592e4457db5dd4ffd420501b890cbcfd27 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add Text Editor exampleMitch Curtis2016-08-1113-1/+1213
| | | | | | | | | | | | | | | | A follow up commit will contain the touch UI. Change-Id: I26275fdd31294506821fa3e3e4a4bb63329665b9 Task-number: QTBUG-54952 Reviewed-by: J-P Nurmi <jpnurmi@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
| * Improve gallery example for Qt Quick DesignerThomas Hartmann2016-07-012-2/+2
| | | | | | | | | | | | | | | | | | The Qt Quick Designer does not support the usage of unqualified properties of the root item. I guess there is no reason to not fully qualify them in examples. Change-Id: I962833bbc051551f2f0518975713c906f343337d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-0842-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Gallery: fix PopupPageJ-P Nurmi2016-06-291-1/+1
| | | | | | | | | | | | | | The id was changed from settingsPopup to settingsDialog in bfb0a9e. Change-Id: I1bb61832883a0b85721cd732522d4b3a46754f43 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: change default visibleItemCount to 5Mitch Curtis2016-06-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks much better than 3; it looks more like an actual Tumbler, partly because the displacement shading is made more visible. This should make it less confusing to interact with for first-time users. In addition, we were previously setting it to 5 in several places. [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of visibleItemCount to 5 to make it visually clearer that it's a Tumbler. Change-Id: I7c16e05aa73f58e3405caa1826453cb824efae11 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-201-1/+1
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontainer.cpp Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865