Re: [Qt-qml] QML Action element

2010-12-07 Thread Pekka.E.Jokela
Thanks Joona,
the initial push came from qt-components/Meego:
http://qt.gitorious.org/qt-components/qt-components/trees/master/src/MeeGo
which has own Action.qml implementation for the UI. Just wondering, does the 
Symbian side need one as well?

The action could live in the declaration pretty nicely:
Item {
id: parent

Action {
id: actionOwnedByParent
text: "jeah!"
icon: "icon1.jpg"

onTriggered: {
...
}
}

Menu ...
Button ...
Toolbar...
}

Although, I don't know if we want to promote action based menus/toolbars 
anymore.

 -P

From: Petrell Joona.T (Nokia-MS/Brisbane)
Sent: 06.12.2010 09:58
To: Jokela Pekka.E (Nokia-MS/Tampere); qt-qml@trolltech.com
Subject: RE: QML Action element

Hi,

QtDeclarative library registers QAction so that you can access QAction-based 
properties from QML. For example WebView element has back, forward, stop, 
reload actions for controlling the web page being shown. There is no Action 
element though for creating new actions from QML and I am not aware of any 
plans of chaning this, i.e. you cannot really write "property variant myAction: 
Action {}". What is the use case you want to solve with the Action element? 
QAction has roots in QWidget/QGraphicsWidget world, there may be another 
solution to your problem that fits better with the QML principles and 
declarative way of building user interfaces.

QML Basic Type action
http://doc.qt.nokia.com/latest/qml-action.html

Cheers,

Joona

From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On 
Behalf Of Jokela Pekka.E (Nokia-MS/Tampere)
Sent: Thursday, December 02, 2010 7:21 PM
To: qt-qml@trolltech.com
Subject: [Qt-qml] QML Action element

Hi,
I remember some rumors that QtQuick would implement QML Action element (equals 
QAction) as built in type. What is the current status?

Thanks,
-Pekka


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] QML Action element

2010-12-07 Thread Ville M. Vainio
On Mon, Dec 6, 2010 at 9:57 AM,   wrote:

> reload actions for controlling the web page being shown. There is no Action
> element though for creating new actions from QML and I am not aware of any
> plans of chaning this, i.e. you cannot really write “property variant
> myAction: Action {}”. What is the use case you want to solve with the Action
> element? QAction has roots in QWidget/QGraphicsWidget world, there may be
> another solution to your problem that fits better with the QML principles
> and declarative way of building user interfaces.

I hope "declarative" doesn't end up meaning "screw abstraction, we'll
make everything as painfully concrete as possible" ;-).

Actions are a nice way to declare a bunch of things that the user can
do, which can later be moved around by the view developer to different
presentation (toolbar / app menu / context menu / shortcut / tv remote
control / whatever). Compared to just exposing a method, Action can
have icon, (translated) text, status tip, etc...


-- 
Ville M. Vainio @@ Forum Nokia

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] QML Action element

2010-12-07 Thread Tomas Junnonen
This is an artifact of the Qt Components MeeGo style still calling into 
libmeegotouch which has an action based API, the Action might be removed 
in the future. If you go for a straight QML approach I think Item based 
toolbars and menus are nicer to work with.

Regards,
Tomas

On 12/07/2010 11:03 AM, ext pekka.e.jok...@nokia.com wrote:
> Thanks Joona,
>
> the initial push came from qt-components/Meego:
>
> http://qt.gitorious.org/qt-components/qt-components/trees/master/src/MeeGo
>
> which has own Action.qml implementation for the UI. Just wondering, does
> the Symbian side need one as well?
>
> The action could live in the declaration pretty nicely:
>
> Item {
>
> id: parent
>
> Action {
>
> id: actionOwnedByParent
>
> text: “jeah!”
>
> icon: “icon1.jpg”
>
> onTriggered: {
>
> …
>
> }
>
> }
>
> Menu …
>
> Button …
>
> Toolbar…
>
> }
>
> Although, I don’t know if we want to promote action based menus/toolbars
> anymore.
>
> -P
>
> *From:*Petrell Joona.T (Nokia-MS/Brisbane)
> *Sent:* 06.12.2010 09:58
> *To:* Jokela Pekka.E (Nokia-MS/Tampere); qt-qml@trolltech.com
> *Subject:* RE: QML Action element
>
> Hi,
>
> QtDeclarative library registers QAction so that you can access
> QAction-based properties from QML. For example WebView element has back,
> forward, stop, reload actions for controlling the web page being shown.
> There is no Action element though for creating new actions from QML and
> I am not aware of any plans of chaning this, i.e. you cannot really
> write “property variant myAction: Action {}”. What is the use case you
> want to solve with the Action element? QAction has roots in
> QWidget/QGraphicsWidget world, there may be another solution to your
> problem that fits better with the QML principles and declarative way of
> building user interfaces.
>
> QML Basic Type action
>
> http://doc.qt.nokia.com/latest/qml-action.html
>
> Cheers,
>
> Joona
>
> *From:*qt-qml-boun...@trolltech.com
> [mailto:qt-qml-boun...@trolltech.com] *On Behalf Of *Jokela Pekka.E
> (Nokia-MS/Tampere)
> *Sent:* Thursday, December 02, 2010 7:21 PM
> *To:* qt-qml@trolltech.com
> *Subject:* [Qt-qml] QML Action element
>
> Hi,
>
> I remember some rumors that QtQuick would implement QML Action element
> (equals QAction) as built in type. What is the current status?
>
> Thanks,
>
> -Pekka
>
>
>
> ___
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


[Qt-qml] Error with PropertyAction/SequentialAnimation/Timer

2010-12-07 Thread Mark Tucker
Hello,

I am trying to animate changing a string, by fading it out, changing it,
then fading it back in, but I'm having an issue with the way I am
populating the string, and I have no idea why. The following is an
example as simplified as I can get it that exhibits this error:

//ListIndexError.qml
import Qt 4.7
Rectangle {
width: 200
height: 200
property int listIndex: 0
ListModel {
id: model
ListElement{ dataString: "String 1" }
ListElement{ dataString: "String 2" }
ListElement{ dataString: "String 3" }
}
Text {
id: textArea
anchors.centerIn: parent
}
SequentialAnimation {
id: textAnimation
//alwaysRunToEnd: true
NumberAnimation { target: textArea; property: "opacity";
to: 0; duration: 250 }
PropertyAction { target: textArea; property: "text";
value: { /*console.log("In PropertyAction " + "listIndex: " + listIndex
+ " count: " + model.count);*/ model.get(listIndex).dataString } }
NumberAnimation { target: textArea; property: "opacity";
to: 1; duration: 250 }
}
Timer {
id: textTimer
interval: 5000
repeat: true
running: true
triggeredOnStart: true
onTriggered: {
listIndex++;
if (listIndex >= model.count) {
listIndex = 0;
}
//console.log("listIndex: " + listIndex + "
count: " + model.count)
textAnimation.start();
}
}
}

I've commented out the two console.log entries above, which I am using
to try and figure out what is going on. Note that the behaviour observed
is the same with Qt 4.7.0 or 4.7.1.

The Timer fires every 5 seconds and in doing so increments the listIndex
property. It then checks to make sure that it is still valid by checking
it against model.count, if it's equal to or greater then that then it
resets it to 0. After that, still in the onTriggered handler, it then
starts the animation.

For some reason the PropertyAction is being called when listIndex is 3
and hence causes an error due to an undefined value. I'm failing to see
how it should ever be the case that listIndex should be 3 when the
PropertyAction does its thing though.

Am I missing something blatantly obvious here or is there a but in Qt
somewhere here?

Thanks


Mark Tucker




___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] PathView Delegates Not Always Displaying

2010-12-07 Thread Michael Dippold
I am using Qt 4.7.1, I just tried compiling from the latest from Git
but could not get it to run.  I was able to create a simple example on
how to duplicate it and created a bug (QTBUG-15926).  Hopefully it is
reproducible on other systems.

Thanks,
Mike


On Mon, Dec 6, 2010 at 10:20 PM,   wrote:
> Which version of Qt are you using?  There have been some fixes in PathView 
> which your bug may be related to.  I suggest trying the latest qt/4.7 from 
> git. If you still see the problem then file a bug with an example that can be 
> used to reproduce it (an unreliable example is better than none).
>
> BR,
> Martin.
>
>> -Original Message-
>> From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On
>> Behalf Of ext Michael Dippold
>> Sent: Tuesday, 7 December 2010 10:52 AM
>> To: qt-qml@trolltech.com
>> Subject: [Qt-qml] PathView Delegates Not Always Displaying
>>
>> I currently have a PathView that is binded to a XmlListModel.  I
>> animate the entire path and move it off of the screen, change the
>> query of the XmlListModel to get new data, and then animate the entire
>> path back onto the screen once the XmlListModel status is set to
>> READY.
>>
>> I am having a problem where randomly the PathView will come back into
>> the main window with missing delegates.  If I use the mouse to barely
>> move the PathView the delegates immediately get displayed.
>>
>> I have not yet found a way to reliably reproduce the issue.
>> ___
>> Qt-qml mailing list
>> Qt-qml@trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-qml
>

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread Adriano Rezende
On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  wrote:
> So my questions how to ignore the received signals to let other items to
> continue deal with those signals?

You can set enabled property to false or ignore the event on mouse press.

MouseArea {
anchors.fill: parent
onClicked: console.log("background clicked");
}

MouseArea {
anchors.fill: parent
enabled: false
//onPressed: mouse.accepted = false;
onClicked: console.log("foreground clicked");
}

Br,
Adriano
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Error with PropertyAction/SequentialAnimation/Timer

2010-12-07 Thread Adriano Rezende
On Tue, Dec 7, 2010 at 12:59 PM, Mark Tucker  wrote:
>        Timer {
>                id: textTimer
>                interval: 5000
>                repeat: true
>                running: true
>                triggeredOnStart: true
>                onTriggered: {
>                        listIndex++;
>                        if (listIndex >= model.count) {
>                                listIndex = 0;
>                        }
>                        //console.log("listIndex: " + listIndex + "
> count: " + model.count)
>                        textAnimation.start();
>                }
>        }
> }
> For some reason the PropertyAction is being called when listIndex is 3
> and hence causes an error due to an undefined value. I'm failing to see
> how it should ever be the case that listIndex should be 3 when the
> PropertyAction does its thing though.

I believe QML will reevaluate a JS statement each time you change a
bindable property contained in that statement. So, even if the
animation is not running, "model.get(listIndex).dataString" will be
reevaluated when listIndex changes.
So, in order to solve this problem you can change the code below:

> listIndex++;
> if (listIndex >= model.count) {
> listIndex = 0;
> }

for the following:

listIndex = (listIndex + 1) % model.count;

Br,
Adriano

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] QML Error

2010-12-07 Thread Adriano Rezende
On Fri, Nov 26, 2010 at 11:13 PM, Almo Nito  wrote:
> Vertex shader for simpleShaderProg (MainVertexShader &
> PositionOnlyVertexShader) failed to compile
>
> Fragment shader for simpleShaderProg (MainFragmentShader &
> ShockingPinkSrcFragmentShader) failed to compile
>
> Errors linking simple shader: ""
>
> Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader &
> UntransformedPositionVertexShader) failed to compile
>
> Fragment shader for blitShaderProg (MainFragmentShader &
> ImageSrcFragmentShader) failed to compile
>
> Errors linking blit shader: ""
>
> Warning: "" failed to compile!
>
> Automation: lib/drivers/powervr/bufobj.c:118: BufObjIndexFromTarget:
> Assertion `0' failed.

Probably it's trying to use version specific shader code.
You need to see if Qt is being compiled with OpenGL ES 2.0 using the
right PowerVR drivers.

Br,
Adriano
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] PathView Delegates Not Always Displaying

2010-12-07 Thread martin.jones
This is not reproducible using the current Qt 4.7 branch.  The 4.7 branch from 
http://qt.gitorious.org/qt should always build and run.

BR,
Martin.

> -Original Message-
> From: ext Michael Dippold [mailto:m...@dippold.com]
> Sent: Wednesday, 8 December 2010 2:55 AM
> To: Jones Martin (Nokia-MS-Qt/Brisbane)
> Cc: qt-qml@trolltech.com
> Subject: Re: [Qt-qml] PathView Delegates Not Always Displaying
> 
> I am using Qt 4.7.1, I just tried compiling from the latest from Git
> but could not get it to run.  I was able to create a simple example on
> how to duplicate it and created a bug (QTBUG-15926).  Hopefully it is
> reproducible on other systems.
> 
> Thanks,
> Mike
> 
> 
> On Mon, Dec 6, 2010 at 10:20 PM,   wrote:
> > Which version of Qt are you using?  There have been some fixes in PathView
> which your bug may be related to.  I suggest trying the latest qt/4.7 from 
> git. If you
> still see the problem then file a bug with an example that can be used to
> reproduce it (an unreliable example is better than none).
> >
> > BR,
> > Martin.
> >
> >> -Original Message-
> >> From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com]
> On
> >> Behalf Of ext Michael Dippold
> >> Sent: Tuesday, 7 December 2010 10:52 AM
> >> To: qt-qml@trolltech.com
> >> Subject: [Qt-qml] PathView Delegates Not Always Displaying
> >>
> >> I currently have a PathView that is binded to a XmlListModel.  I
> >> animate the entire path and move it off of the screen, change the
> >> query of the XmlListModel to get new data, and then animate the entire
> >> path back onto the screen once the XmlListModel status is set to
> >> READY.
> >>
> >> I am having a problem where randomly the PathView will come back into
> >> the main window with missing delegates.  If I use the mouse to barely
> >> move the PathView the delegates immediately get displayed.
> >>
> >> I have not yet found a way to reliably reproduce the issue.
> >> ___
> >> Qt-qml mailing list
> >> Qt-qml@trolltech.com
> >> http://lists.trolltech.com/mailman/listinfo/qt-qml
> >

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] QML Action element

2010-12-07 Thread warwick.allison
Certainly a ui-style-specific module could make an "Action" element like this 
(just as qt-components has apparently), if it made sense for the types of 
interactions in that style. No extra functionality is needed in QML to enable 
such an element.

If we are to have truly revolutionary user experiences, we need to get out of 
the habit of first building a big dull traditional framework and then hoping 
that something pleasant can be shoehorned out of the constraints implied by 
that framework. This is the Big Lesson of QML over Qt.

--
Warwick

Thanks Joona,
the initial push came from qt-components/Meego:
http://qt.gitorious.org/qt-components/qt-components/trees/master/src/MeeGo
which has own Action.qml implementation for the UI. Just wondering, does the 
Symbian side need one as well?

The action could live in the declaration pretty nicely:
Item {
id: parent

Action {
id: actionOwnedByParent
text: "jeah!"
icon: "icon1.jpg"

onTriggered: {
...
}
}

Menu ...
Button ...
Toolbar...
}

Although, I don't know if we want to promote action based menus/toolbars 
anymore.

 -P

From: Petrell Joona.T (Nokia-MS/Brisbane)
Sent: 06.12.2010 09:58
To: Jokela Pekka.E (Nokia-MS/Tampere); qt-qml@trolltech.com
Subject: RE: QML Action element

Hi,

QtDeclarative library registers QAction so that you can access QAction-based 
properties from QML. For example WebView element has back, forward, stop, 
reload actions for controlling the web page being shown. There is no Action 
element though for creating new actions from QML and I am not aware of any 
plans of chaning this, i.e. you cannot really write "property variant myAction: 
Action {}". What is the use case you want to solve with the Action element? 
QAction has roots in QWidget/QGraphicsWidget world, there may be another 
solution to your problem that fits better with the QML principles and 
declarative way of building user interfaces.

QML Basic Type action
http://doc.qt.nokia.com/latest/qml-action.html

Cheers,

Joona

From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On 
Behalf Of Jokela Pekka.E (Nokia-MS/Tampere)
Sent: Thursday, December 02, 2010 7:21 PM
To: qt-qml@trolltech.com
Subject: [Qt-qml] QML Action element

Hi,
I remember some rumors that QtQuick would implement QML Action element (equals 
QAction) as built in type. What is the current status?

Thanks,
-Pekka


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] QML Action element

2010-12-07 Thread warwick.allison
> I hope "declarative" doesn't end up meaning "screw abstraction, we'll
> make everything as painfully concrete as possible" ;-).
>
> Actions are a nice way to declare a bunch of things that the user can
> do, which can later be moved around by the view developer to different
> presentation (toolbar / app menu / context menu / shortcut / tv remote
> control / whatever). Compared to just exposing a method, Action can
> have icon, (translated) text, status tip, etc...

And yet they bind the notions of "UIs are a bunch of commands" and "commands 
have static icons and test labels" into the design language of the user 
experience, while "abstracting" something that is trivial.

Anyone trying to write applications by devising a traditional 
toolbar-menu-buttons UI and then expecting some magic "style" to be applied to 
their abstraction in order to make a pleasant UI is riding on the wrong bus.

Start with the interaction design and the abstract logic engine, then bring the 
two together. Do not just add UI abstractions on the engine and expect success 
- that only "works" for SAP and Lotus Notes, and well, it doesn't actually 
work at all, does it?

--
Warwick

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread Halton Huo
"enabled" does not match my case.

I need receive the MouseArea signals but as well as those below the top
item can receive the signals also.

Refer to MouseEvent element document, seems accepted can do that.
-
accepted : bool

Setting accepted to true prevents the mouse event from being propagated
to items below this item.

Generally, if the item acts on the mouse event then it should be
accepted so that items lower in the stacking order do not also respond
to the same event.


But following code does not work as I wish
MouseArea {
anchors.fill: parent
onClicked: {
console.log("mouse.accepted="+mouse.accepted)
mouse.accepted = false
console.log("mouse.accepted="+mouse.accepted)
}
}

Thanks,
Halton.

On Wed, 2010-12-08 at 02:55 +0800, Adriano Rezende wrote:
> On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  wrote:
> > So my questions how to ignore the received signals to let other items to
> > continue deal with those signals?
> 
> You can set enabled property to false or ignore the event on mouse press.
> 
> MouseArea {
> anchors.fill: parent
> onClicked: console.log("background clicked");
> }
> 
> MouseArea {
> anchors.fill: parent
> enabled: false
> //onPressed: mouse.accepted = false;
> onClicked: console.log("foreground clicked");
> }
> 
> Br,
> Adriano


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread martin.jones
You need to accept in onPressed.  accepted is ignored for any other event.

BR, 
Martin.


> -Original Message-
> From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On
> Behalf Of ext Halton Huo
> Sent: Wednesday, 8 December 2010 11:42 AM
> To: Adriano Rezende
> Cc: qt-qml@trolltech.com
> Subject: Re: [Qt-qml] How to ignore MouseArea signals
> 
> "enabled" does not match my case.
> 
> I need receive the MouseArea signals but as well as those below the top
> item can receive the signals also.
> 
> Refer to MouseEvent element document, seems accepted can do that.
> -
> accepted : bool
> 
> Setting accepted to true prevents the mouse event from being propagated
> to items below this item.
> 
> Generally, if the item acts on the mouse event then it should be
> accepted so that items lower in the stacking order do not also respond
> to the same event.
> 
> 
> But following code does not work as I wish
> MouseArea {
> anchors.fill: parent
> onClicked: {
> console.log("mouse.accepted="+mouse.accepted)
> mouse.accepted = false
> console.log("mouse.accepted="+mouse.accepted)
> }
> }
> 
> Thanks,
> Halton.
> 
> On Wed, 2010-12-08 at 02:55 +0800, Adriano Rezende wrote:
> > On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  wrote:
> > > So my questions how to ignore the received signals to let other items to
> > > continue deal with those signals?
> >
> > You can set enabled property to false or ignore the event on mouse press.
> >
> > MouseArea {
> > anchors.fill: parent
> > onClicked: console.log("background clicked");
> > }
> >
> > MouseArea {
> > anchors.fill: parent
> > enabled: false
> > //onPressed: mouse.accepted = false;
> > onClicked: console.log("foreground clicked");
> > }
> >
> > Br,
> > Adriano
> 
> 
> ___
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread Halton Huo
Woo, OnPressed works, thanks very much.

The document need to be improved. Any process to do that?

Cheers,
Halton.
On Wed, 2010-12-08 at 09:46 +0800, martin.jo...@nokia.com wrote:
> You need to accept in onPressed.  accepted is ignored for any other event.
> 
> BR, 
> Martin.
> 
> 
> > -Original Message-
> > From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On
> > Behalf Of ext Halton Huo
> > Sent: Wednesday, 8 December 2010 11:42 AM
> > To: Adriano Rezende
> > Cc: qt-qml@trolltech.com
> > Subject: Re: [Qt-qml] How to ignore MouseArea signals
> > 
> > "enabled" does not match my case.
> > 
> > I need receive the MouseArea signals but as well as those below the top
> > item can receive the signals also.
> > 
> > Refer to MouseEvent element document, seems accepted can do that.
> > -
> > accepted : bool
> > 
> > Setting accepted to true prevents the mouse event from being propagated
> > to items below this item.
> > 
> > Generally, if the item acts on the mouse event then it should be
> > accepted so that items lower in the stacking order do not also respond
> > to the same event.
> > 
> > 
> > But following code does not work as I wish
> > MouseArea {
> > anchors.fill: parent
> > onClicked: {
> > console.log("mouse.accepted="+mouse.accepted)
> > mouse.accepted = false
> > console.log("mouse.accepted="+mouse.accepted)
> > }
> > }
> > 
> > Thanks,
> > Halton.
> > 
> > On Wed, 2010-12-08 at 02:55 +0800, Adriano Rezende wrote:
> > > On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  wrote:
> > > > So my questions how to ignore the received signals to let other items to
> > > > continue deal with those signals?
> > >
> > > You can set enabled property to false or ignore the event on mouse press.
> > >
> > > MouseArea {
> > > anchors.fill: parent
> > > onClicked: console.log("background clicked");
> > > }
> > >
> > > MouseArea {
> > > anchors.fill: parent
> > > enabled: false
> > > //onPressed: mouse.accepted = false;
> > > onClicked: console.log("foreground clicked");
> > > }
> > >
> > > Br,
> > > Adriano
> > 
> > 
> > ___
> > Qt-qml mailing list
> > Qt-qml@trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-qml


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread martin.jones
Log a bug.  It would be good if you could suggest where the docs are lacking - 
i.e. where you started looking when this didn't work as expected.  The 
"accepted" behavior is documented in the MouseArea signal documentation.

BR,
Martin.

> -Original Message-
> From: ext Halton Huo [mailto:halton@intel.com]
> Sent: Wednesday, 8 December 2010 11:56 AM
> To: Jones Martin (Nokia-MS-Qt/Brisbane)
> Cc: adriano.reze...@openbossa.org; qt-qml@trolltech.com
> Subject: RE: [Qt-qml] How to ignore MouseArea signals
> 
> Woo, OnPressed works, thanks very much.
> 
> The document need to be improved. Any process to do that?
> 
> Cheers,
> Halton.
> On Wed, 2010-12-08 at 09:46 +0800, martin.jo...@nokia.com wrote:
> > You need to accept in onPressed.  accepted is ignored for any other event.
> >
> > BR,
> > Martin.
> >
> >
> > > -Original Message-
> > > From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com]
> On
> > > Behalf Of ext Halton Huo
> > > Sent: Wednesday, 8 December 2010 11:42 AM
> > > To: Adriano Rezende
> > > Cc: qt-qml@trolltech.com
> > > Subject: Re: [Qt-qml] How to ignore MouseArea signals
> > >
> > > "enabled" does not match my case.
> > >
> > > I need receive the MouseArea signals but as well as those below the top
> > > item can receive the signals also.
> > >
> > > Refer to MouseEvent element document, seems accepted can do that.
> > > -
> > > accepted : bool
> > >
> > > Setting accepted to true prevents the mouse event from being propagated
> > > to items below this item.
> > >
> > > Generally, if the item acts on the mouse event then it should be
> > > accepted so that items lower in the stacking order do not also respond
> > > to the same event.
> > >
> > >
> > > But following code does not work as I wish
> > > MouseArea {
> > > anchors.fill: parent
> > > onClicked: {
> > > console.log("mouse.accepted="+mouse.accepted)
> > > mouse.accepted = false
> > > console.log("mouse.accepted="+mouse.accepted)
> > > }
> > > }
> > >
> > > Thanks,
> > > Halton.
> > >
> > > On Wed, 2010-12-08 at 02:55 +0800, Adriano Rezende wrote:
> > > > On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  wrote:
> > > > > So my questions how to ignore the received signals to let other items 
> > > > > to
> > > > > continue deal with those signals?
> > > >
> > > > You can set enabled property to false or ignore the event on mouse 
> > > > press.
> > > >
> > > > MouseArea {
> > > > anchors.fill: parent
> > > > onClicked: console.log("background clicked");
> > > > }
> > > >
> > > > MouseArea {
> > > > anchors.fill: parent
> > > > enabled: false
> > > > //onPressed: mouse.accepted = false;
> > > > onClicked: console.log("foreground clicked");
> > > > }
> > > >
> > > > Br,
> > > > Adriano
> > >
> > >
> > > ___
> > > Qt-qml mailing list
> > > Qt-qml@trolltech.com
> > > http://lists.trolltech.com/mailman/listinfo/qt-qml
> 


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] How to ignore MouseArea signals

2010-12-07 Thread Halton Huo
Thanks, http://bugreports.qt.nokia.com/browse/QTBUG-15929 is filed.

On Wed, 2010-12-08 at 10:41 +0800, martin.jo...@nokia.com wrote:
> Log a bug.  It would be good if you could suggest where the docs are lacking 
> - i.e. where you started looking when this didn't work as expected.  The 
> "accepted" behavior is documented in the MouseArea signal documentation.
> 
> BR,
> Martin.
> 
> > -Original Message-
> > From: ext Halton Huo [mailto:halton@intel.com]
> > Sent: Wednesday, 8 December 2010 11:56 AM
> > To: Jones Martin (Nokia-MS-Qt/Brisbane)
> > Cc: adriano.reze...@openbossa.org; qt-qml@trolltech.com
> > Subject: RE: [Qt-qml] How to ignore MouseArea signals
> > 
> > Woo, OnPressed works, thanks very much.
> > 
> > The document need to be improved. Any process to do that?
> > 
> > Cheers,
> > Halton.
> > On Wed, 2010-12-08 at 09:46 +0800, martin.jo...@nokia.com wrote:
> > > You need to accept in onPressed.  accepted is ignored for any other event.
> > >
> > > BR,
> > > Martin.
> > >
> > >
> > > > -Original Message-
> > > > From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com]
> > On
> > > > Behalf Of ext Halton Huo
> > > > Sent: Wednesday, 8 December 2010 11:42 AM
> > > > To: Adriano Rezende
> > > > Cc: qt-qml@trolltech.com
> > > > Subject: Re: [Qt-qml] How to ignore MouseArea signals
> > > >
> > > > "enabled" does not match my case.
> > > >
> > > > I need receive the MouseArea signals but as well as those below the top
> > > > item can receive the signals also.
> > > >
> > > > Refer to MouseEvent element document, seems accepted can do that.
> > > > -
> > > > accepted : bool
> > > >
> > > > Setting accepted to true prevents the mouse event from being propagated
> > > > to items below this item.
> > > >
> > > > Generally, if the item acts on the mouse event then it should be
> > > > accepted so that items lower in the stacking order do not also respond
> > > > to the same event.
> > > >
> > > >
> > > > But following code does not work as I wish
> > > > MouseArea {
> > > > anchors.fill: parent
> > > > onClicked: {
> > > > console.log("mouse.accepted="+mouse.accepted)
> > > > mouse.accepted = false
> > > > console.log("mouse.accepted="+mouse.accepted)
> > > > }
> > > > }
> > > >
> > > > Thanks,
> > > > Halton.
> > > >
> > > > On Wed, 2010-12-08 at 02:55 +0800, Adriano Rezende wrote:
> > > > > On Tue, Dec 7, 2010 at 4:31 AM, Halton Huo  
> > > > > wrote:
> > > > > > So my questions how to ignore the received signals to let other 
> > > > > > items to
> > > > > > continue deal with those signals?
> > > > >
> > > > > You can set enabled property to false or ignore the event on mouse 
> > > > > press.
> > > > >
> > > > > MouseArea {
> > > > > anchors.fill: parent
> > > > > onClicked: console.log("background clicked");
> > > > > }
> > > > >
> > > > > MouseArea {
> > > > > anchors.fill: parent
> > > > > enabled: false
> > > > > //onPressed: mouse.accepted = false;
> > > > > onClicked: console.log("foreground clicked");
> > > > > }
> > > > >
> > > > > Br,
> > > > > Adriano
> > > >
> > > >
> > > > ___
> > > > Qt-qml mailing list
> > > > Qt-qml@trolltech.com
> > > > http://lists.trolltech.com/mailman/listinfo/qt-qml
> > 
> 


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


[Qt-qml] Where is QML visual editor

2010-12-07 Thread Halton Huo
Hi,

I'm using Qt Creator built from master of gitorious.org. My Qt version
is 4.7.1. The QML visual editor is missing, anything do I miss? 

Thanks,
Halton.

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Where is QML visual editor

2010-12-07 Thread Chris
Hi,

Since QtCreator v2.1, you can double-click on a QML file to display its
content, then click the "Design" button in the left toolbar (just under
"Edit") to open the visual editor.

Kr,
Chris.

On Wed, Dec 8, 2010 at 8:57 AM, Halton Huo  wrote:

> Hi,
>
> I'm using Qt Creator built from master of gitorious.org. My Qt version
> is 4.7.1. The QML visual editor is missing, anything do I miss?
>
> Thanks,
> Halton.
>
> ___
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Where is QML visual editor

2010-12-07 Thread Huo, Halton
The “Design” button is grayed out when I open a QML file.

From: Chris [mailto:dch...@gmail.com]
Sent: Wednesday, December 08, 2010 3:04 PM
To: Huo, Halton
Cc: qt-qml@trolltech.com
Subject: Re: [Qt-qml] Where is QML visual editor

Hi,

Since QtCreator v2.1, you can double-click on a QML file to display its 
content, then click the "Design" button in the left toolbar (just under "Edit") 
to open the visual editor.

Kr,
Chris.
On Wed, Dec 8, 2010 at 8:57 AM, Halton Huo 
mailto:halton@intel.com>> wrote:
Hi,

I'm using Qt Creator built from master of gitorious.org. 
My Qt version
is 4.7.1. The QML visual editor is missing, anything do I miss?

Thanks,
Halton.

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Where is QML visual editor

2010-12-07 Thread Chris
It might be a problem in the GIT version. I would advise using v2.1rc1:
http://qt.nokia.com/developer/qt-qtcreator-prerelease#download

Kr,
Chris.

On Wed, Dec 8, 2010 at 9:06 AM, Huo, Halton  wrote:

>  The “Design” button is grayed out when I open a QML file.
>
>
>
> *From:* Chris [mailto:dch...@gmail.com]
> *Sent:* Wednesday, December 08, 2010 3:04 PM
> *To:* Huo, Halton
> *Cc:* qt-qml@trolltech.com
> *Subject:* Re: [Qt-qml] Where is QML visual editor
>
>
>
> Hi,
>
> Since QtCreator v2.1, you can double-click on a QML file to display its
> content, then click the "Design" button in the left toolbar (just under
> "Edit") to open the visual editor.
>
> Kr,
> Chris.
>
> On Wed, Dec 8, 2010 at 8:57 AM, Halton Huo  wrote:
>
> Hi,
>
> I'm using Qt Creator built from master of gitorious.org. My Qt version
> is 4.7.1. The QML visual editor is missing, anything do I miss?
>
> Thanks,
> Halton.
>
> ___
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
>
>
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Where is QML visual editor

2010-12-07 Thread Kai Koehne
On 12/8/2010 7:57 AM, ext Halton Huo wrote:
> Hi,
>
> I'm using Qt Creator built from master of gitorious.org. My Qt version
> is 4.7.1. The QML visual editor is missing, anything do I miss?

Check the output of "qmake -r" inside Qt ... most likely it warns about 
QuickDesigner not be compiled due to private headers missing.

QuickDesigner depend on some internal APIs of Qt. They are only 
available if you compiled your Qt yourself. You then either do an 
'in-source' build of Qt (e.g. by -developer-build, or -prefix "." 
configure options). Or you have to point qmake to the include path in 
your Qt source directory with 'qmake -r 
"QT_PRIVATE_HEADERS=$QT_SOURCE_TREE/include'.

This is also described in the README file of QtCreator.

Regards

Kai



> Thanks,
> Halton.
>
> ___
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml


-- 
Kai Koehne
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


Re: [Qt-qml] Where is QML visual editor

2010-12-07 Thread Halton Huo
This instruction does help me. The 2.1rc1 works for me also.

Thanks Kai and Chris.

On Wed, 2010-12-08 at 15:15 +0800, Kai Koehne wrote:
> On 12/8/2010 7:57 AM, ext Halton Huo wrote:
> > Hi,
> >
> > I'm using Qt Creator built from master of gitorious.org. My Qt version
> > is 4.7.1. The QML visual editor is missing, anything do I miss?
> 
> Check the output of "qmake -r" inside Qt ... most likely it warns about 
> QuickDesigner not be compiled due to private headers missing.
> 
> QuickDesigner depend on some internal APIs of Qt. They are only 
> available if you compiled your Qt yourself. You then either do an 
> 'in-source' build of Qt (e.g. by -developer-build, or -prefix "." 
> configure options). Or you have to point qmake to the include path in 
> your Qt source directory with 'qmake -r 
> "QT_PRIVATE_HEADERS=$QT_SOURCE_TREE/include'.
> 
> This is also described in the README file of QtCreator.
> 
> Regards
> 
> Kai
> 
> 
> 
> > Thanks,
> > Halton.
> >
> > ___
> > Qt-qml mailing list
> > Qt-qml@trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-qml
> 
> 


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml