mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 07:15:27 +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
|
||||
height: 600
|
||||
|
||||
// This function runs prior to creation of the initial StackView item
|
||||
function doEarlyInit() {
|
||||
// Override the background color to Material 2 colors for Qt 6.5+
|
||||
// in order to improve contrast between GFE's placeholder box art
|
||||
@ -87,16 +88,14 @@ ApplicationWindow {
|
||||
|
||||
StackView {
|
||||
id: stackView
|
||||
initialItem: initialView
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
onEmptyChanged: {
|
||||
// Hijack this callback to perform our very early init
|
||||
// that runs before the first StackView item is pushed
|
||||
if (!empty) {
|
||||
doEarlyInit();
|
||||
}
|
||||
Component.onCompleted: {
|
||||
// Perform our early initialization before constructing
|
||||
// the initial view and pushing it to the StackView
|
||||
doEarlyInit()
|
||||
push(initialView)
|
||||
}
|
||||
|
||||
onCurrentItemChanged: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user