aboutsummaryrefslogtreecommitdiffstats
path: root/examples/controls
Commit message (Collapse)AuthorAgeFilesLines
* Doc: add 2-suffix to the image assets and snippetsJ-P Nurmi2016-04-1324-22/+22
| | | | | Change-Id: Ib8050cb3baefe07d28c7e2dcec64af155d2d7c9b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: rename the C++ module to qtquickcontrols2J-P Nurmi2016-04-131-1/+1
| | | | | Change-Id: I087a39baebc296a340739161874636926adaa56c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add SwitchDelegateMitch Curtis2016-04-131-1/+13
| | | | | | | | | | | SwitchDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to Switch) to reflect what is most commonly seen on mobile. Change-Id: I6f8fca8d1a8c91f2cb9d8bbbb685ad163712dfa1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove mentions of tech previewMitch Curtis2016-04-131-4/+4
| | | | | Change-Id: Ic1fe26207488fb15423c44ddbbb5447cb1edd662 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add RadioDelegateMitch Curtis2016-04-111-1/+18
| | | | | | | | | | | RadioDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to RadioButton) to reflect what is most commonly seen on mobile. Change-Id: I143ee9a30cd8ce1d624354f4cb981c41dfddc2d2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add CheckDelegateMitch Curtis2016-04-111-1/+14
| | | | | | | | | | | | CheckDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to CheckBox) to reflect what is most commonly seen on mobile. Change-Id: I6fdac226fe87247052389b2e49f6cf20d7be44fb Task-number: QTBUG-52208 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: Add vertical slider to RangeSliderPageKonstantin Ritt2016-04-101-0/+8
| | | | | Change-Id: I42a68accfbc493b1047a473ab786fe5d417b2265 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: Add vertical slider to SliderPageKonstantin Ritt2016-04-071-0/+7
| | | | | Change-Id: I1e175917b12c5f41c2e43a5317da1220b24f296e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: Rename Qt Labs Controls to Qt Quick Controls 2Nico Vertriest2016-04-073-20/+20
| | | | | | | | Replaced all remaining instances of "Qt Labs Controls" Change-Id: Iab8ca27d98a16a7c99bd364c66efc8b98d93eacc Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Inherit QQuickDrawer from QQuickPopupJ-P Nurmi2016-03-231-52/+47
| | | | | | Change-Id: Icf71270e63aedd93ba975ab9743de68c3a54e849 Task-number: QTBUG-51007 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introduce ToolTipJ-P Nurmi2016-03-223-0/+70
| | | | | | Change-Id: I917f7e83219788fc63389773eb07ee39757bed7f Task-number: QTBUG-51003 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: moved Gallery files to examples/controls/galleryNico Vertriest2016-03-224-0/+61
| | | | | Change-Id: I5e15631a51fe01e2ff7ecc6ea4b464b3522b7882 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Doc: moved chat tutorial to examples folderNico Vertriest2016-03-2220-0/+855
| | | | | | Change-Id: I152f29bfe9a202e9c0723e7aa2ebc8fa3c18e2d6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Change the default value of QQuickPopup::closePolicyJ-P Nurmi2016-03-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Popup::ClosePolicy was introduced, I thought that it would be better to not set OnPressOutside by default, because not all popups necessarily want to close on press outside. However, I've realized that every time I do Button { onClicked: popup.open() Popup { } } ...there's literally no interactive way to close the popup (popups don't take focus by default, so Esc doesn't work). Provided that a top-level QWidget with the Qt::Popup flag set also closes automatically on press outside, it probably makes more sense for us to follow the same pattern so that poor new users don't have to lookup the docs just to figure out how to make a popup close. :) In this case it's less troublesome to specify a different default value in those special scenarios/subclasses where closing on press outside is not desired (eg. the upcoming Popup-based Drawer). Change-Id: Iaeab4c548d63728df12232d8b65d469f0a2d80f5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* gallery.pro: add pages/*.qml to OTHER_FILESJ-P Nurmi2016-03-211-1/+2
| | | | | | | So they show up in the QML tree in Qt Creator. Change-Id: I58d7e3c37a3d20451b48bcee7aaced3fb3461d9a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Rename Qt Labs Controls to Qt Quick Controls 2 - config fileJ-P Nurmi2016-03-194-2/+2
| | | | | Change-Id: I39bf55cc4e07788722fa2a3962a3476495b83dc9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Gallery: remove hard-coded Universal style from qtlabscontrols.confMitch Curtis2016-03-181-3/+0
| | | | | | | This conflicts with the runtime settings menu in the app. Change-Id: If48205cada7eb9bedce3021160f4e6fb189138df Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename Qt Labs Controls to Qt Quick Controls 2 - build systemMitch Curtis2016-03-181-1/+1
| | | | | | | | | The imports will be done later, as we don't want to change them until the module is releasable (which requires things like selection handles, etc.). Change-Id: I2140cff7058fc3b696e92ca8c0e5e06dca9a7c9c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Chat Tutorial: fix install targetsMitch Curtis2016-03-1810-79/+10
| | | | | | Change-Id: I6651ecffcc76953c06bc70e81b38c72aa1da9b02 Task-number: QTBUG-51918 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-181-0/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/controls/qquickstyle.cpp src/controls/qquickstyleattached_p.h src/imports/controls/material/qquickmaterialstyle.cpp src/templates/qquickcontrol.cpp src/templates/qquickpopup.cpp Change-Id: I17c3c4d1040b89838f0903e0a17069b835895199
| * Material: use proper shades for dark theme colorsNikita Krupenko2016-03-171-0/+1
| | | | | | | | | | | | | | | | This fixes colors for checked switch dark theme and raised highlighted button in both themes. Change-Id: I3c485fb1b779104d6d7f682921b34cb535312f7c Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Gallery: use QQuickStyle to set the style in C++J-P Nurmi2016-03-173-3/+8
| | | | | | | | | | | | | | | | | | This consequently fixes Gallery to respect the -style command line argument and the QT_LABS_CONTROLS_STYLE environment variable. Change-Id: I0e92d1a51e539026a66b821ac425348c87a922c3 Task-number: QTBUG-50787 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Add SwipeDelegateMitch Curtis2016-03-153-0/+166
| | | | | | | | | | | | | | | | | | | | SwipeDelegate presents a view item that can be swiped left or right to expose more options or information. It is used as a delegate in views such as ListView. Change-Id: I7533a2b223f652993b6cee730930ea6dc125c869 Task-number: QTBUG-51610 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add Chat TutorialMitch Curtis2016-02-2957-1/+2327
| | | | | | | | | | | | | | | | | | | | This is useful for beginners who may have not even used Qt Quick Controls before. It goes step-by-step (and in detail) to show how and why things are done the way they are. Change-Id: I527ff2ce429279e37b7cebb765588cb89b5c5e89 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Material TabBar: highlight at the top when the bar is at the bottomJ-P Nurmi2016-02-221-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Even though the Material Design Guidelines recommend against placing tabs at the bottom, we cannot prevent our users from doing that. It is the standard convention on iOS, for instance. Coincidentally, the official Google Translate app for iOS uses Material design, has tabs at the bottom, and has tab highlight at the top of the bar. A screen- shot is attached to QTBUG-50043. Change-Id: Id7c9398b8b4bc9d270f0d908b1a68d68f49d32f0 Task-number: QTBUG-50043 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-02-201-1/+0
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/templates/qquickapplicationwindow.cpp src/templates/qquickcontrol_p.h src/templates/qquickpage.cpp src/templates/qquickpopup.cpp src/templates/qquickpopup_p_p.h Change-Id: I265e0267afb22e3d3f80801191f1a810cd2be312
| * Gallery: remove conflicting anchorsJ-P Nurmi2016-02-191-1/+0
| | | | | | | | | | | | | | Exposed thanks to e19a9044. Change-Id: I9dea1af8e9a9d47391ddaf1fd9c8f7e0c210e9d5 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Doc: Review text captions in Gallery exampleNico Vertriest2016-02-096-7/+11
| | | | | | | | | | | | Change-Id: Ife516e363938a50ce84cd6e3ce6aefcb37cd6e7d Task-number: QTBUG-50933 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Remove remaining references to AbstractButton::labelJ-P Nurmi2016-02-061-4/+8
|/ | | | | Change-Id: Ib9fb690dbaa27bb5d0ba2345ed7ba9b47c167a8e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Gallery: make the "restart required" label more visibleJ-P Nurmi2016-01-281-0/+1
| | | | | | | The red color is one of the secondary colors listed at brand.qt.io. Change-Id: Iea8afe0afe06ea033cb0ece864b6049d74765dfa Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Popup::closePolicyJ-P Nurmi2016-01-281-4/+2
| | | | | Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Popup::transformOriginJ-P Nurmi2016-01-251-0/+1
| | | | | Change-Id: I4a52468234f0479c1b8feb102e07686e3235ba3f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Popup: add implicit & content sizesJ-P Nurmi2016-01-231-5/+5
| | | | | | | Behaves the same way than the Pane/Frame/GroupBox container controls. Change-Id: I370f3961b77a363a63a0a64fc629cc5da6dfd53f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Popup::parentJ-P Nurmi2016-01-231-14/+14
| | | | | | | | | | | | | | | The parent defaults to the QML parent object where Popup is declared. Popup::x/y are relative to the parent, and the popup also automatically follows the parent as appropriate. QQuickPopupPositioner has been adapted from Qt Quick Controls 1. It was called QQuickScenePosListener, and it was implemented for the text selection handle popups. ComboBox's popup now follows the control eg. when scrolling, but the below/above positioning feature is temporarily gone missing. It will be restored in a follow up commit. Change-Id: I8a6b58cd74e07f33930abc35d0ab9da056685128 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Refactor PopupJ-P Nurmi2016-01-221-91/+78
| | | | | | | | | | | Added relevant properties to make it almost like a Control: x, y, width, height, padding, background... This change makes popup use an internal item where the style/user-supplied contentItem and background are re-parented. This way we can provide a default style (background) for Popup. Change-Id: I3e7933562464c5c852e4ba4bc37d9ac25691c714 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material: make ToolBar to use the primary colorJ-P Nurmi2016-01-201-0/+1
| | | | | | | Change-Id: Ie9035ea4d5e1cdf5807b73b92115d886691e8fa7 Task-number: QTBUG-50330 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Gallery: fix qtlabscontrols.confJ-P Nurmi2016-01-191-4/+4
| | | | | | | The foo/bar values slipped in in commit 70a31cd... Change-Id: I130104b5682d7fd0fb06f7608ef4ba8518d3fb60 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Improve Material & Universal warningsJ-P Nurmi2016-01-141-4/+4
| | | | | | | | | | | | | | | | | | Before: QQuickMaterialStyle: unknown accent "foo" After: qrc:/main.qml:28:9: QML CheckBox: unknown Material.accent value: foo Furthermore, before invalid values in :/qtlabscontrols.conf were silently ignored. Now it gives a clear warning: :/qtlabscontrols.conf: unknown Material theme value: foo Change-Id: I0be4eb26ffe23643e282197dc76a091801ab2f4d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Gallery: remove the problematic restart functionalityJ-P Nurmi2015-12-182-30/+10
| | | | | | | | It doesn't work nicely on Android (the new app instance goes to the background) and QProcess is not available at all on iOS. Change-Id: I3aeec773927825fdd5fc499a2ac0acbe59634114 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Gallery: improve the behavior in landscapeJ-P Nurmi2015-12-1826-41/+64
| | | | | Change-Id: Ia5acec45da1c94673641004eca73491b587db054 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Gallery: remove some useless pagesJ-P Nurmi2015-12-186-269/+0
| | | | | Change-Id: I32958e4d5d69b63df81ce23c32a1fed8904c9a69 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Run optipng -o7 -strip "all" over gallery imagesJ-P Nurmi2015-12-1820-0/+0
| | | | | | | | | | Strip contained color profiles causing the warning: libpng warning: iCCP: known incorrect sRGB profile Same was done to the default style in a5e137a. Change-Id: I3eabda96cbabf51d38082967e7f799d5b02ee84b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Gallery exampleJ-P Nurmi2015-12-1755-0/+2625
Task-number: QTBUG-49941 Change-Id: I7bd6b25e12a6e90ba637231790b9a2c7a92bb821 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>