mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Fix QML component versioning error on Qt 5
This commit is contained in:
parent
3531fe0a4f
commit
3279d9c3f6
@ -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: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user