Commit Graph

14 Commits

Author SHA1 Message Date
Shawn Rutledge e0947fa3e7 Make a few improvements to the Window example
- Splash assumes less, for better reuse: set visible where used,
  start Timer only when visible
- no need for SystemPalette: Window and Item have palette properties
- get rid of MouseAreas
- click to set a random color
- make buttons square with Unicode "icons"
- fullscreen button has Binding on checked, to be checked regardless how
  visibility is changed; onClicked is smaller
- tooltips

Pick-to: 6.5
Change-Id: Ibbc1be2a3b113e68f61c69ef695ceea8c300fd1e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-05-18 15:59:42 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Ulf Hermann 7b6eea37ae Fix the qtquick/window example to use QML modules
The shared code becomes its own module. Due to the ${PROJECT_NAME} trick
it should be possible to include it multiple times, in different
examples.

Pick-to: 6.2
Change-Id: I78cc3211f67fae9a713320fae4041898e6a397ed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2021-08-30 20:34:43 +02:00
Oliver Eftevaag 454da9f721 Update window example to use QtQuickControls2
Replaces the use of custom made components from the shared directory, with QtQuickControls2 components.

Fixes: QTBUG-90883
Change-Id: I6e659188aa75bfacf8181689f30580783bf280a2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-02-23 13:49:51 +01:00
Ulf Hermann 828cdcabf8 Remove QtQuick.Window plugin
We move all the types into QtQuick itself and retain QtQuick.Window only
as alias to QtQuick. This requires support for qmldirs that consist of
only an import statement.

[ChangeLog][QtQuick][Important Behavior Changes] The contents of the
QtQuick.Window QML module have been moved into the QtQuick module.
QtQuick.Window is merely and alias for QtQuick now. An explicit import
of QtQuick will override this alias. Therefore, if you import QtQuick
with a different version than QtQuick.Window, you will get the
QtQuick.Window types of the version given in the QtQuick import now.

Task-number: QTBUG-84639
Change-Id: Ia82afab0ac2faba70cfdaf53dc8dfe4261e1113f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-06-15 16:56:10 +02:00
Ulf Hermann 90b4528b84 Avoid discouraged patterns in examples
In particular, use required properties where applicable, explicitly
import QtQml where we use it, avoid unqualified access into the root
scope of a component, use JavaScript functions with explicit parameters
as signal handlers.

Change-Id: I3eaaba47cc3c7a2a12d488e36f9eec145cedbb0e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-11 19:26:05 +01:00
Kai Koehne ea6cd0de3c Fix outdated BSD license header
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:11 +00:00
Shawn Rutledge cca4531ecf add shared Label for examples, and use in the Window example
It just saves the trouble of setting the Text color to the correct
palette text color repeatedly, and avoids having black text on
a dark background in case a dark theme is in use.

Change-Id: If5c38fabe7f047fa5f6956a9d8b235886ab7ab5c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-10 08:05:52 +00:00
Jani Heikkinen 20c207815a Fixed license headers
Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-17 13:33:18 +00:00
Jani Heikkinen c5796292ad Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-12 10:28:11 +00:00
Alan Alpert e90df6600e Fix image URL
Change-Id: I4abac2a842453dbf6838f55703956b2fd53b8f37
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-30 13:08:52 +02:00
Shawn Rutledge c3741b6e04 Window example: delay showing the splash until Component.onCompleted
Otherwise it will have the wrong size on KDE.

Task-number: QTBUG-32223
Change-Id: I3ed92ff8aead5c6e5a37a5189c7103a5383087ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-11 16:55:42 +02:00
Shawn Rutledge 251a267fb5 window example: show only the splash screen until the timeout
The window takes time to resize itself; we can avoid letting the user
see that by delaying visibility of the main window.

Change-Id: I81d656102b384a66b5539cbd879aadb85261ba33
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-30 12:07:21 +02:00
Shawn Rutledge 1ef4e4b156 window and Screen example: new properties; splash screen
Demonstrates the new properties, how to make a splash screen, and
how to make a standalone app with an icon.  Combined the Screen info
into this example too.

Change-Id: I5b731539b39c55327f4e5b93860a880a35835896
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-05-28 10:08:41 +02:00