Forums

OverviewV-Play 2 Support (Qt 5)Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid! › Reply To: Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid!

OverviewV-Play 2 Support (Qt 5)Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid! › Reply To: Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid!
#8415

Jan

Here is a boiled down snipped; basically its the mechanism from the flappybird demo(which does not throw that message). if I take out the assignment of visible and enabled, it works, but then I get other clashes with conflicting scenes in my project.

import VPlay 2.0
import QtQuick 2.0

GameWindow {
	id: window
	width: 1024
	height: 768

	property alias window: window

	Scene {
		id:splash
		width: 480
		height: 320
		opacity: 0
	//////	// NOTE: in qt5, an opaque element is not invisible by default and would handle the mouse and keyboard input!
	//////	// thus to disable also keyboard focus and mouse handling and make an item invisible, set visible and enabled property depending on opacity
		visible: opacity === 0 ? false : true
		enabled: visible
	}

	activeScene: splash;

	// show the splash and start the loading process as soon as the GameWindow is ready
	Component.onCompleted: {
		splash.opacity=1;
	}
}

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support