Re: [Qt-qml] problem with transitions

2010-04-21 Thread michael.brasser
Hi, On 20/04/2010, at 8:06 PM, ext Gianni Valdambrini wrote: I wrote a custom element that looks like a text element with a slide effect on the text change. The problem is in the transition. The element works in this way: there are 2 text elements, one placed on the left and the other on the

Re: [Qt-qml] 2d table view

2010-04-26 Thread michael.brasser
Hi, On 26/04/2010, at 6:18 PM, ext Christian Kamm wrote: I want to show a flickable tile-based map view. The GridView element seems not to be designed for for this usecase: it shows only one-dimensional models and, more importantly, adjusts the number of shown columns to fit the view

Re: [Qt-qml] QML and i18n

2010-04-27 Thread michael.brasser
Hi, On 23/04/2010, at 8:43 PM, ext Pertti Kellomäki wrote: A further question on internationalization. I have translations for test.qml in a file called test_fi_FI.qm, and I can verify that it works by running the qml viewer as qml -translation test_fi_FI.qm test.qml I tried to

Re: [Qt-qml] runtime object and c++

2010-05-13 Thread michael.brasser
On 13/05/2010, at 9:55 PM, ext Helio Chissini de Castro wrote: As the calculator sample shows ( in demos/declarative ), to deal with rotation state it uses the runtime object. This is valid when we are running from qml runtime launcher, but when we are using a C++ app with embedded qml,

Re: [Qt-qml] C++ Data Models and plugin mechanism

2010-05-17 Thread michael.brasser
On 18/05/2010, at 6:41 AM, ext Bartosh Wroblevksy wrote: I am enjoying QML. I wanted to confirm what I have been researching. Right now as it stands, if you want to extend a QML Data Model in C++ (as in the C++ Data Models section in

Re: [Qt-qml] Emitting a C++ signal from QML

2010-06-24 Thread michael.brasser
Hi Colin, On 18/06/2010, at 1:19 PM, ext Colin Kern wrote: I want to have a C++ object emit a signal when a QML element is clicked on. I've tried binding the onClicked event handler of the MouseArea to the C++ signal, thinking it would work similar to how in pure C++ you can connect a signal

Re: [Qt-qml] Behavior vs. Follow - 4:1

2010-06-30 Thread michael.brasser
On 29/06/2010, at 8:59 PM, ext Matthias Ettrich wrote: In the general case, where you do not have a timer, you can solve this the following way: 1. declare the property value where the animation should start 2. change it to whatever you like in a Component.onCompleted-handler. Example:

[Qt-qml] Changes to focus properties

2010-07-07 Thread michael.brasser
Hi, I have some small changes to the focus-related properties that I'm hoping to commit in the next couple days: * 'wantsFocus' will be renamed to 'activeFocus' * the semantics of reading from 'focus' will change to indicate whether the item is the focus item for its FocusScope This fixes two

Re: [Qt-qml] QML Questions

2010-07-08 Thread michael.brasser
Hi, On 09/07/2010, at 1:50 PM, ext Jason H wrote: Awesome I got it working! It seems to work by magic that you can have it evaluate like that. The reason why I was trying wrap: true was because the docs told me to do it... It sounds like you've got out-of-date docs. Are you building

Re: [Qt-qml] More QML Questions

2010-07-11 Thread michael.brasser
On 11/07/2010, at 11:05 AM, ext Jason H wrote: I've been playing around with this, and I have several more questions: 1. Is there a Video element? Major bummer if there isn't Yes, qt-mobility includes SoundEffect, Audio, and Video elements. 2. I've been trying to get a ListView to scroll

Re: [Qt-qml] QML supports network transparency by using URLs

2010-07-11 Thread michael.brasser
On 11/07/2010, at 2:55 PM, ext Jason H wrote: When I tried to use a model, they were uniformly spaced, and that's not acceptable. Can you explain further? What do you mean by uniformly spaced? From the ListView perspective, there shouldn't be any issues using variable-sized items. Regards,

Re: [Qt-qml] Fw: Why can't I stylesheet a font?

2010-07-13 Thread michael.brasser
On 14/07/2010, at 10:42 AM, ext Jason H wrote: But the ability to define and apply arbitrary property groups - be they be for themes or something else - has a good bit of support and application. Can we get the feature? Please? From my perspective, the main requirement is make it easy

Re: [Qt-qml] Starting Sequential Animations

2010-07-13 Thread michael.brasser
Hi, You can continue to use the previous on syntax: SequentialAnimation on x { PauseAnimation { duration: 300 } NumberAnimation {} //don't need to specify target/property } You can also manually trigger an animation by calling start(), or by using the running property (running: true).

Re: [Qt-qml] How to reset MouseArea onEntered/onExited status?

2010-07-13 Thread michael.brasser
Hi Frank, A MouseArea that is not effectively visible doesn't receive mouse events -- because testrma is a child of testr it won't receive mouse events when testr isn't visible. If you instead make those two items siblings (don't forget to change anchors.fill: parent to anchors.fill: testr),

Re: [Qt-qml] Changes to focus properties

2010-07-20 Thread michael.brasser
On 08/07/2010, at 2:32 PM, ext michael.bras...@nokia.com wrote: I have some small changes to the focus-related properties that I'm hoping to commit in the next couple days: * 'wantsFocus' will be renamed to 'activeFocus' * the semantics of reading from 'focus' will change to indicate

Re: [Qt-qml] Applying common behaviour to a group of elements

2010-08-04 Thread michael.brasser
Hi, On 05/08/2010, at 8:38 AM, ext Alex wrote: Is there a declarative approach for me to express the following? 1. animate fade-in for element A 2. play sound(S) and wait for completion 3. animate fade-in for element B Typcially ScriptAction is used insert a block of script to execute

Re: [Qt-qml] Applying common behaviour to a group of elements

2010-08-04 Thread michael.brasser
On 05/08/2010, at 10:02 AM, ext Alex wrote: C++ method: void Sequencer::addItem(QDeclarativeItem *item) { item-setOpacity(1); } Representative QML, not verbatim: Behavior on opacity { NumberAnimation { to: 1; duration: 1000 } } This correctly changes the

Re: [Qt-qml] Applying common behaviour to a group of elements

2010-08-04 Thread michael.brasser
On 05/08/2010, at 8:38 AM, ext Alex wrote: As you saw, I am using SequentialAnimation to sequence animations, but what if I want a non-animation in the sequence? For example, assume I've exposed a C++ MediaPlayer component to QML, which has a playFile(path) slot and playbackCompleted()

Re: [Qt-qml] QDeclarativeItem subclasses and mouse events

2010-08-05 Thread michael.brasser
On 04/08/2010, at 8:17 PM, ext Jan Ekholm wrote: On Wednesday 04 August 2010 05:53:13 michael.bras...@nokia.com wrote: Hi, On 03/08/2010, at 4:55 AM, ext Jan Ekholm wrote: I was recommended to make a C++ QDeclarativeItem subclass for my game map tiles to get better performance. This worked

Re: [Qt-qml] Expected behavior of Transitions that animate properties not expected to change

2010-08-09 Thread michael.brasser
On 10/08/2010, at 6:27 AM, ext Eduardo Fleury wrote: While working on Qt components I got into a situation I'd like to share with you. I'm not sure yet this is a bug so I'd rather listen to what you think before opening it. Use case: 1) There is an on-off-switch component has three states

Re: [Qt-qml] Symbian Cluster Key Codes

2010-08-09 Thread michael.brasser
Note that QML KeyEvents don't expose the nativeVirtualCode like QKeyEvent does (so you'd also need to see the mappings in qkeymapper_s60.cpp to translate from the Symbian key code to the Qt key code). I'd guess the keys in the image correspond to: Key_Context1 Key_Context2 Key_Call Key_Hangup

Re: [Qt-qml] running script at item load

2010-08-12 Thread michael.brasser
On 13/08/2010, at 3:38 PM, ext tapani.mik...@nokia.commailto:tapani.mik...@nokia.com wrote: On 08/13/2010 04:31 AM, Brasser Michael (Nokia-MS-Qt/Brisbane) wrote: note that there aren't any Item-level notifications for this type of thing from QML, only Component-level Component.onCompleted works

Re: [Qt-qml] Snapshot of QML document

2010-08-18 Thread michael.brasser
On 17/08/2010, at 5:41 PM, ext Pavol Rusnak wrote: I would like to ask whether there is an effective way how to create a snapshot or screenshot of QML document. Currently I use this hack: qmlviewer foo.qml -recordfile out.png -recordrate 100 -autorecord 11 But I need to kill qmlviewer

Re: [Qt-qml] Forcing Repaint

2010-08-23 Thread michael.brasser
The closest I can think of is calling repaint() on the QDeclarativeView. That will guarantee that the paintEvent has completed, but not that the screen has been updated. Can you say any more about what you are trying to achieve (maybe a workaround or alternative method would be possible)?

Re: [Qt-qml] Left-to-right gradient

2010-08-23 Thread michael.brasser
Hi, We were actually just discussing this task yesterday here in Brisbane :-) I've added a comment to the task explaining the current status, based on the discussion: Gradients besides the vertical linear gradient can be significantly more expensive to draw. So while it's technically fairly

Re: [Qt-qml] QML element initialization

2010-08-23 Thread michael.brasser
Hi, On 17/08/2010, at 7:06 AM, ext Adriano Rezende wrote: To create wb2 object, classBegin() is called twice; in the first call parent is null, in the second call parent is not null (probably this is a bug). Yes, this is a bug -- classBegin() should only be called once. It was trivial to

Re: [Qt-qml] partial MouseArea

2010-08-23 Thread michael.brasser
On 23/08/2010, at 10:36 AM, ext Bartosh Wroblevksy wrote: I would like to set a partial MouseArea determine by real coordinates on an image. Is this possible in QML? Hi, Only Rectangular MouseAreas are supported for 4.7. http://bugreports.qt.nokia.com/browse/QTBUG-6862 is the suggestion

Re: [Qt-qml] Pause animation until a condition is met

2010-08-26 Thread michael.brasser
On 27/08/2010, at 8:21 AM, ext Alex wrote: I am looking for a way to pause a SequentialAnimation until a certain condition is met. I.e., something similar to PauseAnimation but with a conditional statement instead of a duration. For example: SequentialAnimation { NumberAnimation {}

Re: [Qt-qml] How to use XmlRole with more complex XML

2010-08-29 Thread michael.brasser
On 27/08/2010, at 5:54 PM, ext Marko Mattila wrote: I've been trying to figure out how to get data out of XML when dealing with little bit more complex XML than is dealt in the Qt Quick examples or in XmlQuery documentation. Here is the xml: ?xml version=1.0 encoding=utf-8 ? rsp stat=ok items

Re: [Qt-qml] how can I change the property of QML element in C++ application?

2010-08-29 Thread michael.brasser
On 27/08/2010, at 6:52 PM, ext Wei, James wrote: I have a QML file and I want to integrate it into a graphics view framework based UI application written in C++. QDeclarativeEngine *engine = new QDeclarativeEngine; QDeclarativeComponent component(engine, QUrl::fromLocalFile(Button.qml));

Re: [Qt-qml] can't scroll a flickable

2010-08-30 Thread michael.brasser
Hi Bartosh, This should work correctly in the recently released RC1 (the fix for http://bugreports.qt.nokia.com/browse/QTBUG-12295 is the relevant one). Regards, Michael On 31/08/2010, at 6:23 AM, ext Bartosh Wroblevksy wrote: Hello QML'ers Want to check if this is a bug or if I am

Re: [Qt-qml] Parenting with Flickable

2010-09-01 Thread michael.brasser
On 02/09/2010, at 3:44 AM, ext gabriel.dietrich...@nokia.com wrote: I’m currently implementing a position indicator (kind of scrollbar) for the Qt Components project. My first shot, adding it to a ListView as a child worked quite well. Basically, it looks like this: ListView { model:

Re: [Qt-qml] How to animate a sequence of png images

2010-09-09 Thread michael.brasser
AnimatedImage provides support for mng and animated gifs, if either of those is an option for you. Regards, Michael On 09/09/2010, at 4:12 PM, ext andrew.ratcl...@nokia.commailto:andrew.ratcl...@nokia.com wrote: Hi all, What is the best way to animate a looping sequence of 30 or so

Re: [Qt-qml] Dummy model for QListQObject* model

2010-09-12 Thread michael.brasser
On 11/09/2010, at 12:10 AM, ext Cornelius Hald wrote: Hi, I'm exposing a QListQObject* property from C++ to QML. There I can access it, for example, with the following code. ListView { anchors.fill: parent model: myModel.dataObjects //dataObjects is QListQQobject* delegate: Rectangle

Re: [Qt-qml] I am trying to use the aggregate SQL functions using SQLite in Javascript, called from QML and running under QtCreator (on a Mac)

2010-09-12 Thread michael.brasser
On 11/09/2010, at 5:45 AM, ext bruce.cichow...@nokia.com wrote: Hi! I am using QML with a database, a bit like the samegame example. I think I have things set up pretty well, because I am able to perform queries like this without a problem: var query = 'SELECT * FROM ' + table +

Re: [Qt-qml] Dummy model for QListQObject* model

2010-09-13 Thread michael.brasser
Hi Cornelius, On 13/09/2010, at 7:24 PM, ext Cornelius Hald wrote: Hi Michael, On Mon, 2010-09-13 at 04:29 +0200, michael.bras...@nokia.com wrote: There is a discrepancy in how QAbstractItemModel models and QListQObject* models expose data (see

Re: [Qt-qml] Autotest for XmlListModel

2010-09-13 Thread michael.brasser
Are you using a binary install of Qt? In that case I don't think the autotests are included. Regards, Michael On 13/09/2010, at 11:38 PM, ext Anton Alferov wrote: Hi Joona, Maybe there is my bad somewhere but ~/qt/4.7.0-rc1$ find | grep tests | grep declarative outputs nothing. Cheers,

Re: [Qt-qml] Python and QML

2010-09-14 Thread michael.brasser
On 15/09/2010, at 2:40 AM, ext Robert Garrett wrote: Hi all, I'm not sure if this is the correct place for my query, but if not hopefully someone could point me to the right place. I'm building an embedded application using QML for the front-end and python for the back-end. I'm not sure

Re: [Qt-qml] Dummy model for QListQObject* model

2010-09-14 Thread michael.brasser
On 14/09/2010, at 9:10 PM, ext Cornelius Hald wrote: Hi! On Tue, 2010-09-14 at 01:00 +0200, michael.bras...@nokia.com wrote: Is the above the exact wording of the error message you are seeing (if so, what release version are you using)? If the objects in the list are QtObjects, I get the

Re: [Qt-qml] Font rendering quality in QDeclarative

2010-09-14 Thread michael.brasser
On 15/09/2010, at 8:58 AM, ext Alex wrote: Hi all, For a while now, I've had the nagging feeling that text doesn't look quite right in my application. As a sanity check, I ran the availableFonts.qml sample application (from declarative/text/fonts) using QML Viewer, and it looked fine. I

Re: [Qt-qml] Font rendering quality in QDeclarative

2010-09-15 Thread michael.brasser
On 16/09/2010, at 4:33 AM, ext Alex wrote: On Tue, Sep 14, 2010 at 8:34 PM, michael.bras...@nokia.com wrote: On 15/09/2010, at 8:58 AM, ext Alex wrote: Here is a side-by-side comparison of how availableFonts.qml looks when run using QML Viewer vs QDeclarativeEngine.

Re: [Qt-qml] Cannot assign list to 'value' property in Binding

2010-09-21 Thread michael.brasser
On 21/09/2010, at 8:43 PM, ext simon.tur...@nokia.commailto:simon.tur...@nokia.com wrote: The following assignment to ‘value’ does not work. Only the final Rotation in the list seems to get assigned to the target property. Known issue? Or doing something silly?! Binding { target: albumImage

Re: [Qt-qml] Animation events

2010-09-23 Thread michael.brasser
On 24/09/2010, at 11:47 AM, ext Jason H wrote: I know I've asked something like this before, but I've never gotten anything to work like I wanted. Plus it's mutated over time. I have a collection of components. I will start an animation in the first component. When the animation completes,

Re: [Qt-qml] Prperty-binding to parent

2010-09-24 Thread michael.brasser
Hi, On 24/09/2010, at 6:32 AM, ext Almo Nito wrote: Now the onValueChanged in the Slider itself works fine, but as soon as I place the onValueChanged in the Item { id: volume which is also supposed to hold the same value property by a binding (as I understood) it don’t work anymore It

Re: [Qt-qml] 回复 :Re: About transparent and East Asian languages

2010-09-27 Thread michael.brasser
On 28/09/2010, at 8:50 AM, ext l...@neusoft.com wrote: Is this what you are looking for? Rectangle { color: transparent width: 80 height: 80 } Items are transparent as well, but do not support the border.width type properties. Thank you. Rectangle will be transparented. But

Re: [Qt-qml] About transparent and East Asian languages

2010-09-27 Thread michael.brasser
On 27/09/2010, at 4:33 PM, ext 罗军 wrote: 2. How do I setting for East Asian languages? QML should support East Asian languages out of the box -- the only requirement is that the QML files be UTF-8 encoded (and that your system has fonts installed to correctly display those languages). Is there

Re: [Qt-qml] 回复 :Re: About transparent and E ast Asian languages

2010-09-27 Thread michael.brasser
On 28/09/2010, at 11:48 AM, ext Artur Souza (MoRpHeUz) wrote: On Mon, Sep 27, 2010 at 7:58 PM, michael.bras...@nokia.com wrote: QML supports specifying a color as #AARRGGBB (see http://doc.trolltech.com/4.7/qml-color.html for more on color support in QML), so # would be fully

Re: [Qt-qml] Animation events

2010-09-27 Thread michael.brasser
On 27/09/2010, at 9:53 PM, ext Jason H wrote: Thanks, I got it working. It's onCompleted. And I'm using your alias trick. Is there documentation on how to use signals/slots from QML? I looked through and didn't see anything on how to define your own signals in QML The documentation for

Re: [Qt-qml] XmlListModel and request

2010-10-07 Thread michael.brasser
On 08/10/2010, at 8:05 AM, ext Surik Sayadyan wrote: But in Wireshark I looked this: GET /2.0/?method=artist.searchartist=abc26abcapi_key=22789788517XXXe6d7b4a975c220 HTTP/1.1 In request all characters '%' are removed from the line. I'm sorry, correct line: GET

Re: [Qt-qml] Hello World C++ Model on QML Flow?

2010-10-11 Thread michael.brasser
Hi, On 11/10/2010, at 12:40 AM, ext Charley Bay wrote: What is QML Flow? Do you mean ListView? I should have clarified, QML Flow element: http://doc.qt.nokia.com/4.7/qml-flow.html Funny you should say that -- I wanted Flow, didn't know it existed, started to write my own, then found

Re: [Qt-qml] How to display QDeclarativeComponent created from C++?

2010-10-12 Thread michael.brasser
Hi Charley, On 12/10/2010, at 5:10 AM, ext Charley Bay wrote: For example, I previously created *many* QDeclarativeView instances to give the appearance of many desktop-widget-type-things within the same application. One alternative might be to move the multi structure into a single

[Qt-qml] QML model handling

2010-10-13 Thread michael.brasser
Hi all, One of the things we're researching now that 4.7 is out the door is how we work with data sets in QML. Part of that is researching next generation model classes for QML (internally, XmlListModel and and ListModel are already using a modified version of the list model from

Re: [Qt-qml] Transition enabled property (suggestion)

2010-10-14 Thread michael.brasser
On 14/10/2010, at 5:30 AM, ext Adriano Rezende wrote: I have some use cases which I need to go from state A to B with and without transition depending on a condition. Using Transitions I don't see a straightforward way to do this without duplicating states. I think it would be nice to have an

Re: [Qt-qml] How to display QDeclarativeComponent created from C++?

2010-10-19 Thread michael.brasser
On 17/10/2010, at 6:56 AM, ext Charley Bay wrote: snip, not have multiple QDeclarativeView instances, instead, have: QDeclarativeView -Desktop-Widget-Canvas -QDeclarativeItem -QDeclarativeItem -QDeclarativeItem Ah, that makes sense: One convenience

Re: [Qt-qml] Performance cost of using Loader's sourceComponent

2010-10-21 Thread michael.brasser
On 21/10/2010, at 4:44 AM, ext mathias.malmqv...@nokia.com wrote: Quick question; is there a cost involved in instantiating elements using the Loader's sourceComponent property? I.e. does it prevent the source component's code from being cached when it's compiled the first time? It shouldn't

Re: [Qt-qml] QML model handling

2010-10-21 Thread michael.brasser
On 13/10/2010, at 11:45 PM, ext Charley Bay wrote: michael spaketh: One of the things we're researching now that 4.7 is out the door is how we work with data sets in QML. Part of that is researching next generation model classes for QML Outstanding. I *love* your list. In particular, I

Re: [Qt-qml] Apply Transform to Item in onChildrenChanged?

2010-10-21 Thread michael.brasser
Hi Charley, On 22/10/2010, at 9:36 AM, ext Charley Bay wrote: I wrote my own layout type class by hooking into onChildrenChanged which is triggered on parent changed, and it works great: Item { id: myItem onChildrenChanged: { myItem.myUpdateChildrenPlacement() }

Re: [Qt-qml] Custom data type in slot parameter

2010-10-25 Thread michael.brasser
Hi Robert, On 22/10/2010, at 4:06 PM, ext Robert Voinea wrote: I have a QtDeclarative application and I want to connect a signal in my C++ code to a QML slot. The problem is that the signal in the C++ code has a custom data type (ButtonInformation). I have registered the custom data type

Re: [Qt-qml] Property Bindings *within* Javascript?

2010-10-25 Thread michael.brasser
Hi, On 24/10/2010, at 12:49 AM, ext Charley Bay wrote: The QML docs state: Property bindings are the most common use of JavaScript in QML. Property bindings associate the result of a JavaScript expression with a property of an object. ...found at:

Re: [Qt-qml] Extract RGB values from color

2010-10-25 Thread michael.brasser
Hi, On 26/10/2010, at 12:02 AM, ext andrew.christ...@nokia.com wrote: Is there any way to quickly extract R,G, and B values from color property? I tried the obvious things like: Item { property color myColor: blue function getRed() { return myColor.red(); } } but I

Re: [Qt-qml] Set custom property in onChildrenChanged?

2010-10-27 Thread michael.brasser
Hi, On 26/10/2010, at 10:49 PM, ext Charley Bay wrote: Curious problem, this should work, right? //FILE: MyRect.qml Rectangle { property double myDouble: 0 } //FILE: MyParent.qml Item { id: myParent onChildrenChanged: { for(var i = 0; i myParent.children.length; ++i) {

Re: [Qt-qml] activeFocusOnPress use-case

2010-10-31 Thread michael.brasser
Hi Henrik, activeFocusOnPress was added as a convenience property for a behavior that we didn't want to be hard-coded into TextInput (the same is true for selectByMouse). The idea was that as a basic element, TextInput should be flexible enough for people to experiment with and define new ways

Re: [Qt-qml] Using enums in QML signal handlers

2010-11-02 Thread michael.brasser
Hi Olli, This sounds like a bug -- could you please create a report at bugreports.qt.nokia.comhttp://bugreports.qt.nokia.com? Thanks, Michael On 02/11/2010, at 11:06 PM, ext ext-salonen.o...@nokia.commailto:ext-salonen.o...@nokia.com wrote: Hi, I have declared an enum in a class and use it

Re: [Qt-qml] HOWTO: use QStandardItemModel with QML

2010-11-02 Thread michael.brasser
Hi, On 02/11/2010, at 5:14 AM, ext Ville M. Vainio wrote: I wrote a brief guide how to use QStandardItemModel from QML: http://wiki.forum.nokia.com/index.php/Using_QStandardItemModel_in_QML The secret point of the guide is to convince powers-that-be that setRoleNames should be a public

Re: [Qt-qml] Editor example Source Code

2010-11-03 Thread michael.brasser
On 04/11/2010, at 5:23 AM, ext Charley Bay wrote: Mike spaketh: Where do i find The source code for the getting started programming with qml Tutorial ? On my install (win-commercial), I found it easiest to directly navigate to the following directories and look around:

Re: [Qt-qml] Editor example Source Code

2010-11-04 Thread michael.brasser
At what level are you missing the directories? (i.e. is there an examples directory? a tutorials directory?) Regards, Michael On 05/11/2010, at 3:06 PM, ext Michael Rychlik wrote: There are no such directories anywhere in my qt 4.7 install (LGPL Linux) On 5 November 2010 00:11,

Re: [Qt-qml] Basic QML Webkit + Flickable not working

2010-11-08 Thread michael.brasser
Hi, On 06/11/2010, at 7:17 AM, ext Tico Ballagas wrote: I was trying to create a basic QML Webkit + Flickable proof of concept. import Qt 4.7 import QtWebKit 2.0 Flickable{ width: 640; height: 480 contentWidth: webView.width contentHeight: webView.height WebView {

Re: [Qt-qml] Few beginner's questions about QML

2010-11-08 Thread michael.brasser
Hi, On 06/11/2010, at 1:12 AM, ext Jerzy Chalupski wrote: I've been reading about and playing with Qt Quick for the last few days and I have some questions: 1. I've always thought QML was supposed to be used strictly for presentation layer of application, but in declarative examples and

Re: [Qt-qml] Find by id.

2010-11-10 Thread michael.brasser
Hi, On 05/11/2010, at 9:21 PM, ext René Hansen wrote: On Thu, 2010-11-04 at 23:44 +0100, Brasser Michael (Nokia-MS-Qt/Brisbane) wrote: On 04/11/2010, at 10:26 PM, ext René Hansen wrote: I'd like to be able to find child objects in a QML structure and to do that, I've exposed a new QML Object

Re: [Qt-qml] Managing declarative/imperative order of operations

2010-11-10 Thread michael.brasser
Hi Charley, On 07/11/2010, at 5:45 AM, ext Charley Bay wrote: Using QML/Javascript, quite a few options exist to *either* be declarative (e.g., myAnimation.paused = true) or imperative (e.g., myAnimation.pause();) IMHO, when possible, one should be declarative (long discussion for a

Re: [Qt-qml] How to see screen (or preferably window) dimensions?

2010-11-10 Thread michael.brasser
On 10/11/2010, at 8:55 AM, ext Bart Kelsey wrote: Greets! Is there some way from within QML that I can get the dimensions of the QDecarativeView that my QML objects are in, short of writing a special C++ function? This isn't directly accessible, but setting the resize mode of the

Re: [Qt-qml] setData for insert code in qml

2010-11-10 Thread michael.brasser
Hi, On 09/11/2010, at 11:27 PM, ext marvin42 wrote: I want insert code in qml. i have file main.qml, i try append this code import Qt 4.7\n Rectangle { width : 1000; height:1000; color: \blue\ } ex: QApplication app(argc, argv); QDeclarativeView view;

Re: [Qt-qml] Supporting landscape and portrait modes in C++/QML App

2010-11-11 Thread michael.brasser
Hi Paul. On 11/11/2010, at 9:56 PM, ext Paul Drummond wrote: 2. As far as I can tell the sensor QML Bindings aren't release yet - is that correct? Any planned release date? The sensor QML bindings are included in the recent Qt Mobility 1.1 release (but not showing up at

Re: [Qt-qml] Supporting landscape and portrait modes in C++/QML App

2010-11-11 Thread michael.brasser
On 11/11/2010, at 9:56 PM, ext Paul Drummond wrote: 3. All the orientation-specific code in the screenorientation example looks like hard work to me considering that other mobile frameworks such as Android handle orientation automatically as long as you conform to the layout guidelines. Is the

Re: [Qt-qml] Find by id.

2010-11-11 Thread michael.brasser
On 11/11/2010, at 9:59 PM, René Hansen wrote: Then I would like to test application logic by sending keypresses and mouseclicks on certain child elements of my application, buttons, inputs etc. Another thing you might be interesting in looking at is the visual test infrastructure (note

Re: [Qt-qml] Managing declarative/imperative order of operations

2010-11-11 Thread michael.brasser
Hi Charley, On 11/11/2010, at 11:59 PM, ext Charley Bay wrote: So, summary question: Is there guidance on the internal thread model within the Declarative engine (e.g., how is work distributed on threads, their priorities, and when other threads are created?) (Is this too big a question,

Re: [Qt-qml] QML and binding loop problem

2010-11-17 Thread michael.brasser
Hi, It's probably easiest to look at a simplified example: Rectangle { id: rect function myWidth() { return rect.width } height: myWidth() } When the engine analyses the binding for height (i.e. myWidth()), it keeps track of the fact that rect.width was used in the

Re: [Qt-qml] changing gradient on state change

2010-11-17 Thread michael.brasser
It's probably possible, but not recommended -- it would require you to manually take care of things like proper reversing (restoring the original gradient when returning to the base state), and managing the created object (either reusing or deleting/recreating on the state change). Regards,

Re: [Qt-qml] C++ MyClass to detect child added/removed from QML

2010-12-09 Thread michael.brasser
On 25/11/2010, at 7:25 AM, ext Charley Bay wrote: This does raise the next question (or two): (1) The QML implies an instantiation tree of items in a parent-child relationship. That's great, and part of what makes QML so easy to use. Is this tree special in any way? For example, if I

Re: [Qt-qml] Performance cost of using Loader's sourceComponent

2010-12-09 Thread michael.brasser
On 03/12/2010, at 4:00 AM, ext Adriano Rezende wrote: On Fri, Oct 22, 2010 at 2:12 AM, michael.bras...@nokia.com wrote: On 21/10/2010, at 4:44 AM, ext mathias.malmqv...@nokia.com wrote: Quick question; is there a cost involved in instantiating elements using the Loader's sourceComponent

Re: [Qt-qml] PathView Performance issue

2010-12-09 Thread michael.brasser
Hi, I would guess that the problem comes from instantiating new items as the path is flicked. If that is the case, the only real solution at this point is to simplify your delegate (see http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeperformance.html#view-delegates). If the data model is

Re: [Qt-qml] QML memory usage with import QtWebKit

2010-12-09 Thread michael.brasser
Hi Greg, From what I remember 10MB for the base usage of webkit sounds about right, though I didn't realize that just an import statement would add this cost. Did you try any other configurations? e.g. did adding an empty WebView cause the memory to go up or was it still around 13MB? Regards,

Re: [Qt-qml] QML memory usage with import QtWebKit

2010-12-13 Thread michael.brasser
Hi Greg, On 10/12/2010, at 4:52 PM, ext Gregory Schlomoff wrote: Hi Michael, Somme additional figures: 1. Empty Rectangle, not importing QtWebkit: ~ 3MB 2. Empty Rectangle, importing QtWebkit: ~ 13MB 3. Rectangle with an empty WebView: ~ 14 MB 4. Setting url: about:blank in the WebView: ~15 MB

Re: [Qt-qml] print the stack trace in QML?

2010-12-13 Thread michael.brasser
There isn't anything for this currently, but its a good suggestion -- I'd recommend adding a suggestion for it at bugreports.qt.nokia.com. Regards, Michael On 09/12/2010, at 2:32 PM, ext Johnson Ma wrote: Hi, Is there any way in QML to access the stack trace information when error