[Qt-qml] Activate state onload

Gurmukh Panesar Gurmukh.Panesar at teleca.com
Fri Jul 23 13:16:59 CEST 2010


Thanks Aaron, this seemed to do the trick!!

 

 

From: aaron.kennedy at nokia.com [mailto:aaron.kennedy at nokia.com] 
Sent: 23 July 2010 14:15
To: Gurmukh Panesar
Cc: qt-qml at trolltech.com
Subject: Re: [Qt-qml] Activate state onload

 

Hi,

 

Try adding

 

    Component.onCompleted: rootItem.state = "enter"

 

Obviously replacing rootItem appropriately.

 

Cheers,

 

Aaron 


On 23/07/2010, at 8:40 PM, "ext Gurmukh Panesar" <Gurmukh.Panesar at teleca.com> wrote:

	Hi there

	 

	I have been using QML for the past few weeks and find it very useful!

	 

	Currently, I am trying to fix a certain problem I’m having but not getting anywhere. Hopefully somebody on this mailing list would be able to help?

	 

	 

	The problem is getting a transition to execute in QML once the page has been loaded.

	 

	It’s very simple, just a bit of text that comes from the right and to the left when the app is launched. 

	 

	I am able to do this by a mouseEvent trigger but not something like an "onload()".

	 

	Does anyone know of a way in which I can change the state of a component on load?

	 

	Code:

	                states : State {

	                    name: "enter"

	                    //when: mouse.pressed == true // Works fine

	                    when: window.onload() // Doesn't seem to work

	                    PropertyChanges { target: allText; x: 100 }

	                }

	 

	Thanks!

	 

	 

	Gurmukh Panesar

	Team Lead Espoo, Senior Mobile Web Developer

	 

	Teleca

	Tekniikantie 12, 02150 Espoo, Finland

	Phone: +358401819406, Fax: +358934872768

	Gurmukh.Panesar at teleca.com

	www.teleca.com

	 

	Follow what's going on at Teleca's blog on www.whatsyourideaoftomorrow.blogspot.com.

	 

	The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.

	 

	<ATT00001..txt>


 
Gurmukh Panesar
Team Lead Espoo, Senior Mobile Web Developer
 
Teleca
Tekniikantie 12, 02150 Espoo, Finland
Phone: +358401819406, Fax: +358934872768
Gurmukh.Panesar at teleca.com
http://www.teleca.com/
 
Follow what's going on at Teleca's blog on http://www.whatsyourideaoftomorrow.blogspot.com/.
 
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100723/5b1040af/attachment.html 


More information about the Qt-qml mailing list