1.1 的新功能

Qt Quick Ultralite maintains source compatibility between minor releases. However, some changes may require you to adapt the application code accordingly. The following sections highlight such changes:

Changes in 1.1

New boards

  • NXP i.MX RT 1064 EVK
  • STM32 H750B-DK
  • STM32 F469i-disco
  • STM32 L4R9i-disco
  • STM32 L4R9i-eval

New features

Source compatibility breaks

  • Types held by Qul::Property <T> must be equality comparable, so those that do not have built-in comparison operators must be provided with a user-defined operator==.
  • When setting up device builds with CMake, the CMAKE_TOOLCHAIN_FILE and QUL_PLATFORM variables must be set. See Windows 快速入门 and CMake 手册 .
  • Image resources must now be listed in the project's CMakeLists.txt using qul_add_resource .
  • Images must be referenced via their "qrc:/" resource URL from QML.
  • Touch event propagation in Flickable now works correctly. This resolves a known issue, but may break applications that depend on the previous behavior.
  • MouseArea API has changed to improve compatibility.
    • pressedX , pressedY ,和 propagateComposedEvents properties were removed.
    • pressed , released , pressAndHold ,和 canceled signals were added.
    • Signals now receive a mouse argument with x , y , accepted ,和 wasHeld 特性。
  • Qul.uiLanguage is renamed to Qt.uiLanguage for consistency with Qt. This requires changing your source code to use the new name. By default the property is set to an empty string, which indicates translation is done.
  • Qt.uiLanguage no longer uses the special value "source". Instead, the empty string now signifies not using a translation.
  • Qul.color is removed for consistency with Qt. The user is now able to create colors using string literals such as, "#F00" or "red".
  • The names of types in QtQuick .Controls.Templates changed.
    • AbstractButtonTemplate is now called AbstractButton
    • ButtonTemplate is now called Button
    • CheckBoxTemplate is now called CheckBox
    • ControlTemplate is now called Control
    • DialTemplate is now called Dial
    • ProgressBarTemplate is now called ProgressBar
    • RadioButtonTemplate is now called RadioButton
    • SliderTemplate is now called Slider
    • SwipeViewTemplate is now called SwipeView
    • SwitchTemplate is now called Switch
  • On STM32 F7508-DK, the printf output is sent via USART1 now, which is connected to ST-LINK Virtual COM Port, instead of USART6. USART6 will not be initialized anymore.

Additions

Fixed issues

  • Fixed touch event propagation.
  • Fixed drawing of BorderImage .
  • Changed the state property to have type string.

New APIs

新全局函数

double rand ()

新 QML 类型

新 QML 特性

新 QML 信号

canceled ()
finished ()
pressAndHold (MouseEvent mouse )
pressed (MouseEvent mouse )
released (MouseEvent mouse )
started ()
stopped ()