Fix QML component versioning error on Qt 5

This commit is contained in:
Cameron Gutman 2024-10-03 00:15:53 -05:00
parent 3531fe0a4f
commit 3279d9c3f6

View File

@ -23,6 +23,7 @@ ApplicationWindow {
width: 1280 width: 1280
height: 600 height: 600
// This function runs prior to creation of the initial StackView item
function doEarlyInit() { function doEarlyInit() {
// Override the background color to Material 2 colors for Qt 6.5+ // Override the background color to Material 2 colors for Qt 6.5+
// in order to improve contrast between GFE's placeholder box art // in order to improve contrast between GFE's placeholder box art
@ -87,16 +88,14 @@ ApplicationWindow {
StackView { StackView {
id: stackView id: stackView
initialItem: initialView
anchors.fill: parent anchors.fill: parent
focus: true focus: true
onEmptyChanged: { Component.onCompleted: {
// Hijack this callback to perform our very early init // Perform our early initialization before constructing
// that runs before the first StackView item is pushed // the initial view and pushing it to the StackView
if (!empty) { doEarlyInit()
doEarlyInit(); push(initialView)
}
} }
onCurrentItemChanged: { onCurrentItemChanged: {