summaryrefslogtreecommitdiffstats
path: root/src/controls/ApplicationWindow.qml
Commit message (Collapse)AuthorAgeFilesLines
* Make restoreMode on all Binding elements explicitUlf Hermann2019-10-041-6/+25
| | | | | | | The default is going to change in 5.15. Change-Id: Ib17500791476bd45ed2c7c3736186897fb63d7a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Document Qt Quick Controls explicitly as 'version 1'Venugopal Shivashankar2018-10-261-2/+2
| | | | | | | | | This is to explicitly identify Qt Quick Controls as Controls 1, so that Controls 2 can be referred generally as Qt Quick Controls. Task-number: QTBUG-70333 Change-Id: I798c0354ad47ab96978575829322a254876529fb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Revert "Fix Controls 1 types linking to Controls 2"Topi Reinio2016-06-221-1/+0
| | | | | | | | | | | This reverts commit b5a8306bf6d4949066872ac2afc8d0a01f716bd7. The incorrect \inherits commands caused property documentation from base types go missing. Task-number: QTBUG-54150 Change-Id: I0bbe604a6fe904d8e6a4596777262255a794ec62 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix Controls 1 types linking to Controls 2v5.7.0-rc1v5.7.0Mitch Curtis2016-05-261-0/+1
| | | | | | Task-number: QTBUG-53529 Change-Id: I4933a03c49dee4e3edc56dd406f67073da341ac1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Unify license header usageAntti Kokko2016-02-041-12/+15
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-281-1/+1
|\ | | | | | | Change-Id: Ie81aa6abe8a4acbd201e4938f0cb693a8b3aa567
| * Android: fix hw menu button to open the options menuJ-P Nurmi2015-08-191-1/+1
| | | | | | | | | | | | Change-Id: I9cc08b64521f414b50598aead3957347ff30528a Task-number: QTBUG-45131 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Doc: Create proper QHP TOC entries for QML types, examples and tutorialsTopi Reinio2015-08-051-0/+1
|/ | | | | | | | | | QDoc now supports using a \group name as a selector for QHP subprojects. Use this to have the correct division of Qt Quick Controls and Controls Styles QML types, as well as a TOC entry for examples and tutorials. Change-Id: I8e4b44c8876fd6bb3b2baebd956d6dc5d5223715 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Revert "iOS: Make ApplicationWindow fill entire screen, including under ↵J-P Nurmi2015-05-261-18/+6
| | | | | | | | | | | | | | | | statusbar" This is a nice to have iOS feature, but it breaks all the other platforms. This reverts commit 10a57f37d0f03e8642a7c92dcacf287c95777342. Change-Id: Iec7cfa8be1bb214d0f86047826a5c0cdcf447c1e Task-number: QTBUG-45973 Task-number: QTBUG-46119 Task-number: QTBUG-46134 Task-number: QTBUG-46180 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Make ApplicationWindow fill entire screen, including under statusbarTor Arne Vestbø2015-03-271-6/+18
| | | | | | | | | | | | | | We take advantage of the new Qt::WindowFlag that asks the OS to maximize the window using as much as possible of the available screen geometry, and then make sure that the contentItem is shifted accordingly so that it doesn't end up under the statusbar. This allow setting a custom background image/color on the application window, or adding toolbars or menu bars that underlay the iOS system status bar. Change-Id: I6efab2aced7efd274a65f2524ae8c270d20de187 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Merge Extras' styling system into Controls'.Mitch Curtis2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes the duplicated style settings functionality in Extras and simplifies the installed styles directory structure. - Extras' Base style is now part of Controls' Base style, eliminating the need for a separate QtQuick.Extras.Styles import. The cost of doing this should be negligible: a few QML files and two images. If we didn't merge Extras' Baste style into Controls', we'd need extras-specific code in qquickcontrolssettings, as the default style search path is: qml/QtQuick/Controls/Styles/ Whereas the Extras Base style would be in: qml/QtQuick/Extras/Styles/ The Extras Base style can't go into Controls' Base style directory, either, because otherwise we'd have two qmldir files there. The Flat style doesn't have this problem because it is all contained in one plugin and gets installed into its own Flat/ folder. - Documentation now lists the Extras controls as \since QtQuick.Extras 1.4. - Adds the customcontrolsstyle auto test to ensure that custom styling is tested. Change-Id: I19ca7a8b7e1c1daa85b272f4ccf9a2f05c76e0d9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: update license headersJ-P Nurmi2015-02-111-28/+24
| | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-01-161-1/+1
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_stackview.qml Change-Id: I54b55d51452e812315f97bcdfd1a8e361a427f56
| * Remove explicit bug tracker URLAlex Blasche2014-12-151-1/+1
| | | | | | | | | | | | | | | | The context makes it obvious what is meant and the bug tracker URL is about to change as well. Change-Id: Ic28ede609db0598afa785177032c55b80e01d4db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-0/+1
|\| | | | | | | Change-Id: Icc27c3f8638601b43daac37ce4a6d9678476996a
| * ApplicationWindow: top level items must get focus when they ask for it.Mitch Curtis2014-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the following Item will not receive any key events: import QtQuick 2.2 import QtQuick.Controls 1.2 ApplicationWindow { visible: true width: 200 height: 200 Item { focus: true anchors.fill: parent Keys.onLeftPressed: textItem.text = "Left" Keys.onRightPressed: textItem.text = "Right" Keys.onPressed: { if (event.key === Qt.Key_Home) { textItem.text = "Home"; } else if (event.key === Qt.Key_End) { textItem.text = "End"; } } Text { id: textItem anchors.centerIn: parent } } } Using Window instead of ApplicationWindow does, however. ApplicationWindow can behave the same if we ensure that the panel has focus set to true. When the panel has focus, the contentItem can receive focus. [ChangeLog][ApplicationWindow] Top level items now receive focus when their focus property is set to true, in the same way that top level items of Window do. Change-Id: I16ef1632fc6df1989015e62e8683b6cd7c5be8a6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-191-67/+27
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/controls/Styles/iOS/ComboBoxStyle.qml src/controls/Styles/iOS/SpinBoxStyle.qml src/controls/Styles/iOS/TextAreaStyle.qml src/controls/Styles/iOS/TextFieldStyle.qml src/controls/Styles/iOS/iOS.pro Change-Id: Ib31ead16807a952a39aaa611b27ad89d4f86c60c
| * ApplicationWindow: fix top/bottom marginsJ-P Nurmi2014-09-171-1/+1
| | | | | | | | | | | | | | | | | | 533b677 broke __topBottomMargins. The y-coordinate of contentArea is now always 0. It must use the y-coordinate of the corresponding style layout item instead. Change-Id: I5316d319f0f12553ecc12a04561c0235100f4dd5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Let ApplicationWindowStyle provide the layoutJ-P Nurmi2014-09-101-67/+27
| | | | | | | | | | | | | | Change-Id: Ic14c153d57857efb5ad26e01f58ff3363b189b85 Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Do not shrink application window height to 0Jan Arve Saether2014-08-281-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | The binding was always evaluated to 0 if __noImplicitHeightGiven was true. The solution is to move the condition to the Binding element, which will then cause it to not be triggered when it was previously be evaluated to 0. Task-number: QTBUG-38469 Change-Id: I6ff80e44069978ee9685ea2fbe52afc52425cbdc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Include potential toolBar+menuBar+statusBar when calculating heightJan Arve Saether2014-08-281-1/+1
|/ | | | | | Change-Id: Id005e81656f1fc2085360240bfd30342c0e7954b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix ApplicationWindow state / content sizeJ-P Nurmi2014-08-061-2/+2
| | | | | | | | | | | | | | | | QML Window is not a plain QQuickWindow, but QQuickWindowQmlImpl that does delayed visibility handling and shows the window in appropriate state. Thus, ApplicationWindow cannot inherit QQuickWindow or it would lose all that magic. QQuickApplicationWindow was added in order for ApplicationWindowStyle to be able to know whether a custom window color had been set. This change gets rid of the QQuickWindow subclass and simply compares the window color to white, which is the default fill color of QQuickWindow. Change-Id: Ibd95ef0717c2db51246c6a71585e9286e61cef0b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Introduce ApplicationWindowStyleJ-P Nurmi2014-08-051-3/+25
| | | | | Change-Id: If96bfc8185883ff523ca4242f8ab04b5fccb8999 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-091-0/+9
|\ | | | | | | | | | | | | Conflicts: src/controls/ToolBar.qml Change-Id: I5510496219a4ebe8bfced4192307219238ca9bb6
| * Mention that ApplicationWindow is not visible by default.Mitch Curtis2014-07-071-0/+4
| | | | | | | | | | Change-Id: I8291df95b1aade62b91f000c64d5cd810de252ac Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Doc: Added images and missing snippetsVenu2014-06-271-0/+5
| | | | | | | | | | | | Task-number: QTBUG-33799 Change-Id: I582518a73276d47cf63cf31411b5176a90acab6f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-251-3/+1
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
| * Singleton SystemPaletteJ-P Nurmi2014-06-231-3/+1
| | | | | | | | | | | | | | | | | | | | Each SystemPalette instance installs an event filter on the application object. Avoid this by sharing a single SystemPalette instance. Change-Id: Ica9f8979b33e511c1238add3d689f380d0daa93c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-111-2/+2
|\| | | | | | | | | | | | | Conflicts: src/controls/ApplicationWindow.qml Change-Id: I2ab8efb4e04006724410da0f6ed03bd2672c5eb6
| * Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-1/+1
| | | | | | | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Import QtQuick 2.2J-P Nurmi2014-04-071-1/+1
| | | | | | | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devIikka Eklund2014-04-011-1/+1
|\| | | | | | | Change-Id: Ide92e6a626be1a56b99c997b1bb4a28451eddedf
| * Doc: Fix some issuesSze Howe Koh2014-03-311-1/+1
| | | | | | | | | | Change-Id: I2f209fc33fdeecf0a3a3067486f9f4abfe18a2ec Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-241-2/+18
|\| | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_applicationwindow.qml Change-Id: I2ba1f1ba9604f9417102ff076e4ab9ab4d37ab7a
| * Avoid warning when maximum size < minimum sizeJan Arve Saether2014-03-031-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only happens in intermediate states, where both *minimumHeight* and *maximumHeight* is supposed to be updated. However, since the order of the bindings is not know, we might have intermediate states where minimumHeight > maximumHeight. In our case minimumHeight was set first to a smaller size than maximumHeight, this would trigger the height binding, causing it to try to set its geometry while its minimumHeight and maximumHeight properties were not in sync. This also happened when maximumWidth < minimumWidth. The output was something like this: qwindowswindow.cpp(1306):QWindowsWindow::setGeometry: Attempt to set a size (116x190) violating the constraints(0x200 - 16777215x190) on window ApplicationWindow_QMLTYPE_12_QML_51/'' Change-Id: Ia4f6e340b608bb4cff5a35bc887adc4eea7efbad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Bump QtQuick.Window import versionLaszlo Agocs2014-03-241-1/+1
|/ | | | | | | | | | | | Use 2.2 to get access to revision 2 signals. Particularly interesting is sceneGraphError() which allows graceful handling of OpenGL context creation failures even from QML, inside the ApplicationWindow items. Change-Id: Ie2ec98a438a05d35e4c9f9459a6ac49887147149 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Expose contentArea as contentItem in ApplicationWindowJan Arve Saether2014-01-141-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | This will intentionally shadow the QQuickWindow::contentItem This enables users of ApplicationWindow to correctly set the {min,max}imumHeight for the contents of the ApplicationWindow (excluding menubar, toolbar and statusbar). With this information at hand, the ApplicationWindow can easily deduct the correct total size of its {min,max}imumHeight *including* the menubar, toolbar and statusbar. Previously, it was for instance not possible to set an exact minimumHeight because it didn't take the toolbar, statusbar or menubar into consideration One small disadvantage is that the contentItem.minimumWidth cannot be autocompleted. qmlplugindump does not inspect the members of ContentItem. Task-number: QTBUG-32443 Change-Id: I9903e7d4b5e6db7bd7c3c46351a2bb5578f67a57 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Set more window flags to keep Windows from omitting titlebar & buttonsv5.2.0-rc1Shawn Rutledge2013-11-231-0/+6
| | | | | | | | | This should not be necessary, but Windows does not treat the missing Qt::CustomizeWindowHint the same as the other platforms do. Task-number: QTBUG-35049 Change-Id: I81dc645dc1acf29b6ff4d5fc04f5dd3db94b0133 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Revert "ApplicationWindow has the WindowFullscreenButtonHint flag by default"Jens Bache-Wiig2013-11-221-1/+0
| | | | | | | | | | This reverts commit 29d1b0d209ebb267c5a6ac8402c33892c09b8de6. This patch caused a regression resulting in QTBUG-35049 and should be reverted until we have a better fix. Change-Id: I76f9fa9859742a63f33757456c64f70183c76178 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make sure menu bar has a parent windowEskil Abrahamsen Blomfeldt2013-11-151-0/+2
| | | | | | | | | | | | On Android we depend on the parent window of the menu bar to know when to show which menu bar. The menu bar parent was set in the onVisibleChanged signal of the background item, but this visible property is never changed. Adding a signal handler for the visible property of the window as well fixes the issue. Task-number: QTBUG-34681 Change-Id: I2cbafabe165420fd1697fbe51a8f393eb5158ffd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* ApplicationWindow has the WindowFullscreenButtonHint flag by defaultShawn Rutledge2013-11-151-0/+1
| | | | | | | | | | | | | | It should be possible to go fullscreen by default in most applications, unless there is a reason not to, in which case the developer can turn this flag back off. It's also not so intuitive to turn it on, because one needs to remember to specify Qt.Window as well, to avoid losing the toolbar. So making it the default avoids some mistakes/surprises. Furthermore QWidget has this flag by default. Task-number: QTBUG-33607 Change-Id: I350ffb38459d2a305353efe0db29335fe354a441 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Adjust height if the ToolBar or StatusBar is dynamically hiddenJan Arve Saether2013-10-251-2/+4
| | | | | | | Triggered by a manual test I'm working on Change-Id: I8d49a7d19ac7daebda388df8e2d8595607fdd52c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* ApplicationWindow has no default sizeShawn Rutledge2013-10-021-3/+0
| | | | | | | | | ApplicationWindow should not set a default window size because every platform already does that, and normally an application would set its initial width and height to the layout's minimums anyway. Change-Id: I42ab1b6ecc71a38961f44a67f1c819a6a2037171 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Doc: Changed the \since argument to the Qt version.Jerome Pasion2013-09-261-1/+1
| | | | | | | | | | | | | | -1.0 types were introduced in Qt 5.1 -1.1 types were introduced in Qt 5.2 -The module versions are now taken from the \qmlmodule This change was only applied to \qmltype. For methods, signals, and properties, we keep the \since QtQuick.Controls <version> Task-number: QTBUG-32172 Change-Id: Iefa73d4a489aa285bae873f68ae9a228030f0115 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix MenuBar related runtime warnings in ApplicationWindowJ-P Nurmi2013-09-251-1/+1
| | | | | | | TypeError: Cannot read property '__contentItem' of null Change-Id: I0eaf8b9779357e4314ed94335e017e32377195de Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge branch 'stable' into devGabriel de Dietrich2013-09-181-0/+2
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickaction.cpp Change-Id: I85255ba5c27c0d8ea023d0867e5963d43f8f1ddb
| * Menu: Enable mnemonic menu navigationGabriel de Dietrich2013-09-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | We also added a new mnemonic specific shortcut context matcher. This prevents two menu items with the same mnemonic but within different menus to be reported as ambiguous. Task-number: QTBUG-33030 ChangeLog: Added mnemonic navigation for menus Change-Id: I192c9aacba4d15851fe65bf9201251962fe976d5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-2/+2
|/ | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix draw order of contents vs. toolbar in ApplicationWindowJosh Faust2013-06-081-6/+6
| | | | | | | Task-number: QTBUG-31207 Change-Id: I8843988d0e2dfe505aae374325c23caf0736d05b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* The function was moved to QtDeclarativeLiang Qi2013-05-271-8/+0
| | | | | | | | | It is about default behavior for QQuickWindow, when there is no any activeFocusItem in the whole window, Tab/BackTab key could help you to focus the item in the tab focus chain. Change-Id: Iccd770794e2f99a9a74c3a11f0ed278264a02d9e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>