Do use qmlformat to make sure that the .qml files in
the example are uniform. Just leave out some changes that
make lines like
case Qt.Key_0: digitPressed("0"); break;
unneccessarily long.
Store the restriction to 100chars in a .qmlformat.ini file
for other examples.
Pick-to: 6.10
Change-Id: I3f77efa83b2d5e01f1497687763e5c327da71ff2
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
In the calqlatr demo, you are able to use backspace to remove the last
digit. This does not consider the last minus sign left when using
backspace on a single digit negative number. In this case, set the
displayed digits to an empty string.
Fixes: QTBUG-127814
Pick-to: 6.7 6.8
Change-Id: Iec82e0650b3b50022be0b5a716976aefa78118a3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The demo's buttons were using Mathematical Alphanumeric Symbols, which
are not available in all fonts. Replace them with regular characters.
Fixes: QTBUG-122605
Pick-to: 6.7
Change-Id: I24e61eb11f8df34149d0d0fd962054ea759729c1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Implement the new design for the calqlatr example, including a
scientific/landscape mode. The animation controller has been removed for
practicality. Responsive layouts now handle changing between a portrait
and a landscape layout.
Fixes: QTBUG-118519
Change-Id: I1a33b1825a877b2b45afedc3a019a906c3f45d29
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
- Fixed code formatting.
- Clip the contents of the ListView containing the operation history to
prevent it from spilling out into other UI elements.
- Update copyright year.
- Simplify some expressions.
- Replaced root scope lookups with direct access to JS functions.
- Make calculator.js a library so that it can be imported by
other QML files without duplicating its state.
- Replace "var" with "let".
- Replace == and != with === and !==.
- Simplify key event handling.
- Removed unused ids.
- Fix unqualified accesses.
Fixes: QTBUG-54267
Pick-to: 6.2 6.5 6.6
Change-Id: I0d8e8f1d9b3cfe8123fd98b8c280dc3ff4bd86a0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The buttons were too hard to hit, with such big gaps between columns and
rows, and such a small active area. You can't see how big the active
area is, so the expectation is that it should be large, for easy
fat-fingering on a touchscreen.
Pick-to: 6.2 6.4
Task-number: QTBUG-102408
Task-number: QTBUG-108335
Change-Id: I9aab5d64a8c6c0a0218e9a91f93d072033e04e8a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
In the process of preparing this example to become highlighted
in Qt Creator, we want to update it to reflect how we think a modern
qml application should be written.
Some of the changes done here includes
* Use QQC2 buttons, rather than a custom button component.
* Update the CMake list to use qt_add_qml_module()
* Some code refactoring (e.g const/let instead of var, switch/case,
reduced binding spaghetti)
Fixes: QTBUG-96460
Pick-to: 6.2
Change-Id: I6e6789038c053dac9528ba564431cef6c9168454
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Several things are addressed:
* some unqualified accesses fixed
* parent is replaced with actual ids
Change-Id: I5ee1d1a2b1abad468ea330cd4eca0bf0b9b993ed
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Ignore .ui.qml files though for now, until they are properly handled
by Qt Design Studio.
Task-number: QTBUG-89033
Change-Id: I85ea1dc2f85928e9fa1f473535687ab8b0288e9d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
These demos use several modules and moving them allows to use for
example Qt Quick Controls 2 in them.
The shared directory should be removed and the examples made
self-contained.
Change-Id: I5dc667d22388651894d7d145b65752bc5c5cf6cf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>