summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Revise the Table View exampleJ-P Nurmi2014-11-0612-385/+446
| | | | | | | | | | | A simple sortable and searchable table view example that also fits a mobile screen. The old "example" is demoted as a manual test app. Task-number: QTBUG-41253 Change-Id: I746c8e5871c35a184748abbb4427ca3d160ffc8e Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Remove the SplitView exampleJ-P Nurmi2014-11-057-167/+0
| | | | | | | | This example served no purpose. A similar snippet can be found in SplitView docs, in the detailed description. Change-Id: Ic53e5bbe8c0c46c7cf9a0002f12ad6c229028388 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Rewrite the gallery exampleJ-P Nurmi2014-10-3038-840/+459
| | | | | | | | | | | | | | | | A much simpler, scalable and mobile friendly UI. Some of the more complex controls, such as TextArea and TableView, are intentionally left out. They are scrollable on their own, so they wouldn't play nice inside scrollable pages. Furthermore, adding them as standlone pages would increase the amount of tabs too much. Those controls are demonstrated in the Text Editor and Table View examples, respectively. Task-number: QTBUG-41307 Change-Id: Ib3efb346e621e388087f3f14c73b3b54279db280 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* QtQuick.Dialogs examples: use controls and layouts; visual tweaksShawn Rutledge2014-10-236-284/+301
| | | | | | | | | | | | | | | Make tab and button labels shorter so that they fit even on very-small- screen devices (like iOS). Make the content of some tabs scrollable. Background color of the Font tab matches the others. Use RowLayout to make baseline alignment of checkboxes and associated text fields possible. Use ColumnLayout because it works better inside a ScrollView. Use Label instead of Text so that the renderType is consistent. Change-Id: Ie2d07153532f35d108a0b6ad0bb4f10326f79d24 Task-number: QTBUG-41999 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* CustomDialogs example: add Apply, Reset and Restore Defaults buttonsShawn Rutledge2014-10-221-0/+18
| | | | | | | A custom dialog might have a use for these. Change-Id: Ibef05dd63d65476e1225477d2e7ed9d24fbba9ed Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Dialog examples: handle keys for accept, and more feedbackShawn Rutledge2014-10-201-0/+6
| | | | | | | | All dialogs populate the label showing how they were accepted or rejected. Change-Id: I0bad4af0864bdf24e56c18aeecd8ca8f6536b6b0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Custom filled dialog example: handle back button to closeShawn Rutledge2014-10-131-2/+3
| | | | | | | | | | On Android, it should prefer to close the dialog rather than get stuck or exit the application. (It was already possible to close the dialog by tapping outside, though.) The back button can also be used on other platforms which have them (e.g. multimedia keyboards on desktop). Change-Id: I19d2ad62ff370fa467d80d51d73cb95fd5830bed Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: cleanup old code commented outJ-P Nurmi2014-10-061-11/+0
| | | | | Change-Id: I314be395ba82b89f89d6b84702e17f3adcabf1b1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: cleanup whitespaceJ-P Nurmi2014-10-066-18/+2
| | | | | Change-Id: I82be07e215b1784039b1b3a2c5398d4fc0f19b84 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: fix titleJ-P Nurmi2014-10-061-1/+1
| | | | | Change-Id: Ib637f850ed2002de10d7cb18e242f0b44482247c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* gallery: get rid of the dummy child windowJ-P Nurmi2014-10-065-132/+0
| | | | | | | | This is material for a manual _desktop_ test application. Change-Id: I9fe10ca05184410b53331bdd7b3157daaceb7640 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* gallery: cleanup the menubarJ-P Nurmi2014-10-061-23/+5
| | | | | | | | | | | Remove the non-functional submenu items that belong to a manual test application. The edit/context menu presents submenu items well enough. Furthermore, reduce the amount of cruft in main.qml by declaring the non-shared about action inline as a menu item instead. Change-Id: I1060a3ed63aa1a388e220fedddda4b7d5b412ba7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add "Styles" exampleJ-P Nurmi2014-10-0614-1/+456
| | | | | | | | | | | Based on the "Styles" tab of the Gallery. The motivation for this change is to cleanup the Gallery example so that it eventually runs nicely on various desktop and mobile platforms without major modifications. Task-number: QTBUG-41307 Change-Id: Iffcd3557bf7c77f5a10bda8bfda5ddb636dd5ac1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Gallery example: remove the "Layouts" tabJ-P Nurmi2014-10-063-112/+0
| | | | | | | | The content is identical to the Basic Layouts example. Task-number: QTBUG-41307 Change-Id: I781d741ccfb9cc1443eae7410990d968ff6a209d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Table View Example: Sort indicator for the custom header delegateTopi Reinio2014-10-013-1/+20
| | | | | | | | | | | | The Delegates tab in the example shows how to use custom types as TableView header, row, and item. The UI has a checkbox to toggle a sort indicator for the header - this change implements the indicator for the custom header delegate, and adjusts the header text accordingly. Task-number: QTBUG-41396 Change-Id: Iab917b87b9b91c3dcc468f87aa14ec9293afd5f6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* gallery: cleanup the mainJ-P Nurmi2014-10-012-61/+61
| | | | | | | | | It's not a good example to rely on instances "somewhere in the outer context" => move things where they are used so they can be referenced via IDs that are in the scope. Change-Id: I352dca270de92590b5d620e529e84b9d18105082 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* gallery: cleanup system palette usageJ-P Nurmi2014-10-012-62/+57
| | | | | | | | | ApplicationWindow sets the background color as appropriate => no need to use SystemPalette there. The child window was unnecessarily creating an extra Rectangle just for the background color => use Window::color. Change-Id: Id109c9e5f4d633baf1133afd3a1e9af277310e98 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* EditMenu: let menu property be a component to lazy load itRichard Moe Gustavsen2014-09-241-17/+19
| | | | | | | | | Since all input fields have a menu assigned to it by default (which in most cases never will be shown), it should be an optimization to await creating it until needed. Change-Id: I5777bbdae42103981e9b2f5ddfdfd763acea07ae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Gallery: use new menu API for TextAreaRichard Moe Gustavsen2014-09-231-7/+1
| | | | | Change-Id: I5caf76c8fb225760bc742b20e699c2cc40403e3c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix undefined __syspal referenceAlex Blasche2014-09-181-1/+5
| | | | | | | | There is no such reference AFAICT. Use SystemPalette instead. Task-number: QTBUG-41390 Change-Id: I09becb9a39e20137a5092942c4d9cb09ef133abb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* FileDialog: add sidebarVisible property and buttonShawn Rutledge2014-09-041-0/+7
| | | | | | | | | | | | | | | The sidebar takes up too much space on some devices, so now it is possible for the application author to hide it by default. The user can also toggle it with a button similar to that used for the Qt Creator sidebar, and this state is stored as a setting; however if the application sets sidebarVisible: false, that overrides the setting. [ChangeLog][QtQuick.Dialogs] FileDialog: added sidebarVisible property and button Task-number: QTBUG-39231 Change-Id: Ie8b379da02f4b12764732b2c01b79039722778ab Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-281-1/+23
|\ | | | | | | Change-Id: I4aa5c960a03616d95f9e1d10b4c8ba222997a24d
| * Dialogs: buttonless fully-filled dialog exampleShawn Rutledge2014-08-241-1/+23
| | | | | | | | | | | | | | | | | | | | The default property "contentItem" is normally the parent of the added content, but you can set the content directly into the property to avoid having any buttons or margins. Task-number: QTBUG-38056 Change-Id: Ie0e96969b3e35f079b29a9f3f57eaaf16236d4c1 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Migrate to QSurfaceFormat::setDefaultFormat()Laszlo Agocs2014-08-082-4/+4
| | | | | | | | | | | | | | | | setDefaultFormat() is being moved form QQuickWindow to QSurfaceFormat. Change-Id: Id76c2c332c837e2e988a2e8f4da2975065938e32 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-99/+97
|\ \ | |/ | | | | Change-Id: Iac8c62211c34b36394812d9afedd362a62ba6cef
| * Updated the example so that it adapts to the orientation changeVenu2014-07-251-99/+97
| | | | | | | | | | | | | | | | | | | | The example was using a Row type to present the visual items, which is changed to Flow type now, so that the items are rearranged based on the orientation change on a Mobile device. Task-number: QTBUG-37203 Change-Id: I990f77a87c409b623a7fe4495d74206a1ca2e1c7 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-198-8/+13
|\ \ | |/ | | | | Change-Id: Icc15fe685e94dd043979b6b9c6a624f18f2d1e4c
| * Centralize determination of "no desktop" configurationsJ-P Nurmi2014-07-187-7/+7
| | | | | | | | | | | | Change-Id: I030012f48668db4f01737ef92fdb7e6e0426e025 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| * Improve implicit size of Calendar on high DPI devices.Mitch Curtis2014-07-171-1/+6
| | | | | | | | | | | | Task-number: QTBUG-39473 Change-Id: Ibfb1c040efd9744ba6c8bc56affcdf90a807b046 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-171-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: src/controls/Styles/Base/MenuStyle.qml Change-Id: I95c8b4f348260b958f158ae28c0984d54af973a8
| * Dialog: Add missing docsShawn Rutledge2014-07-091-1/+1
| | | | | | | | | | | | | | Also fixed a qWarning and updated example import statement. Change-Id: I873b52e297bbefe66c6c131573804eee98c40a2f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-257-7/+7
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
| * Cleanup whitespaceJ-P Nurmi2014-06-247-7/+7
| | | | | | | | | | Change-Id: I9e84ce56e853a18205aa180cef1ee8ff4f2f678c Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * Remove QtWidgets dependency for WinRTJ-P Nurmi2014-06-247-7/+7
| | | | | | | | | | Change-Id: Ifacceae8690d2ab4dfaed0d5439b9e29804c1943 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * Remove Widgets dependency for QNXAndreas Holzammer2014-06-247-7/+7
| | | | | | | | | | | | | | | | | | Changes.txt says that with Qt 5.2.0 dependency for Widgets have been removed for touch based platforms. But QNX is also a touch based platform and its missing. Change-Id: I140842d4501422537175ac5acb07beebe994f0eb Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Revise and align ToolBar & StatusBar size calculationJ-P Nurmi2014-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | Instead of preferring the layout size, and only using the panel size as a fallback, take the maximum of the two. This way styles can provide a default size that will be respected. Furthermore, replace unnecessary function calls with declarative property bindings. Change-Id: Iabc59c694ac8c8302cea72f53c9177462d7f146c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Example: Remove Panel.qml from gallery.pro as the file does not existCaroline Chao2014-05-191-1/+0
| | | | | | | | | | Change-Id: Ife2b4de2cbc5cd08a97b87e014bb2e288326e08c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-05-141-5/+12
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Private/TabBar.qml Change-Id: Id176e44fe8e402c1c2c021ecb63c8c5c75736d47
| * Fix selection handling in texteditor exampleBerthold Krevert2014-05-131-5/+12
| | | | | | | | | | | | | | Task-number: QTBUG-31784 Change-Id: I7122abbfd346edd85f17c54dfde37db93a1ba0fc Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-1126-46/+46
|\ \ | |/ | | | | | | | | | | Conflicts: src/controls/ApplicationWindow.qml Change-Id: I2ab8efb4e04006724410da0f6ed03bd2672c5eb6
| * Fix the editable delegate in tableview exampleJens Bache-Wiig2014-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | We re-interpreted what "model" means in TableView to align it with what it means for ListView. Unfortunately the example still assume that "model" refers to the views acual model object and not to the current item data as it did for listview. Change-Id: I3457954a622be38500672edb1c0a910d18760947 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-0722-22/+22
| | | | | | | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Import QtQuick 2.2J-P Nurmi2014-04-0722-22/+22
| | | | | | | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Shawn Rutledge2014-03-255-23/+69
|\ \ | |/ | | | | refs/staging/dev
| * Styling improvements for CalendarJens Bache-Wiig2014-03-123-21/+41
| | | | | | | | | | | | | | | | | | Also - added the property Calendar::frameVisible. - moved the gridVisible property to CalendarStyle Change-Id: I57da65af130098ac5d0b858c9f964e52e3ba6922 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | | | | | Change-Id: Ic2e2060b57b0d74e96d6aad0ceff4679d986a26c Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * CustomDialogs example: add an example using CalendarShawn Rutledge2014-02-251-1/+27
| | | | | | | | | | | | | | | | Also the spinbox exmample will accept when the user presses enter. Change-Id: I47765899acfbc435e2409f7a30e54e8f041b6e73 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Fix shaders for OpenGL core profilesLaszlo Agocs2014-03-242-0/+16
|/ | | | | | | | | | | | Add also a --coreprofile command-line parameter to the gallery and systemdialogs examples to allow testing Quick Controls with an OpenGL 3.2+ core profile. This depends on the new features introduced to qtdeclarative in I75a47182 and I41b513e9. Change-Id: I408263a108a71df221943915849a4c3e18e0d3e4 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Calendar example: sql module requiredCaroline Chao2014-02-211-1/+4
| | | | | | Change-Id: I75eb50a053f429135d1d49d1769b85a247c30311 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>