[Qt-qml] setting focus on an input field interferes with transition animation - possible bug?

17 views
Skip to first unread message

Sivan Greenberg

unread,
Feb 3, 2012, 2:40:26 PM2/3/12
to qt-...@qt.nokia.com
Hi All,

To recoup on my previous post about this, I've isolated the issue.
The conditions are as follow:

1) Not using FocusScope
2) Setting the focus on the item in the PropertyChanges of the transition:

State {
name: "changeSettings";
PropertyChanges { target: setRssView; x: 0; clip: false; z: 1}
PropertyChanges { target: setview ; inputFocus: true }
PropertyChanges { target: list; x: +(parent.width * 1.5) }
PropertyChanges { target: toolBar; button1Label: "Save" }
},

inputFocus is a property alias defined as so:

Item {
property alias inputFocus: uri.focus
Input{
id: uri
onAccepted: {
window.currentFeed = "http://" + uri.text;
feedModel.reload();
}
text: window.currentFeed
}

}

This is the code I use to change the state through a button click:

ToolBar {
id: toolBar; height: 40;
y: parent.height - 40
width: parent.width; opacity: 0.9
button1Label: "Settings"
button2Label: "Quit"
onButton2Clicked: Qt.quit()
onButton1Clicked: {
console.log("window.state = " + window.state)
if (window.state=='feedView')
{
window.state= 'changeSettings'
}
else if (window.state == 'changeSettings')
{

window.currentFeed = setview.address
feedModel.reload();
//toolBar.button1Label = 'Settings';
window.state='feedView';

}


Now the problem (or a bug?) seems to happen on and only on the first
time I click that button to switch to settings view, the animation
jitters momentarily and only the end of the animation is "felt". when
I go back and forth between the states after the first time, the
transition is smooth as expected.

I know I've posted about this before, but before opening a bug I'd
like to be sure that what I do is correct and not some sort of mis-use
of QML.


Great weekend and cheers,

--
-Sivan
_______________________________________________
Qt-qml mailing list
Qt-...@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply all
Reply to author
Forward
0 new messages