Re: [Qt-qml] how to expose nested ListModel from C++ to QML?

2010-12-09 Thread bea.lam
And ignore the duplicate 'outerDelegate' id below - that should only be in the Repeater, not the Component. On 10/12/2010, at 3:09 PM, ext bea@nokia.com wrote: > Hi James, > > On 10/12/2010, at 2:20 PM, ext Wei, Xiaohai wrote: > >> Thanks. >> >> another question on nested listview. >>

Re: [Qt-qml] how to expose nested ListModel from C++ to QML?

2010-12-09 Thread bea.lam
Hi James, On 10/12/2010, at 2:20 PM, ext Wei, Xiaohai wrote: > Thanks. > > another question on nested listview. > > How can inner delegate get the index of current outer model index? > One way to do it is to add a property to each delegate of the outer view, which holds the 'index' value o

Re: [Qt-qml] why does signal clicked (MouseEvent mouse) not parse

2010-12-05 Thread bea.lam
On 06/12/2010, at 10:09 AM, ext Bartosh Wroblevksy wrote: > Thanks, but I was hoping I can do something like this: > > //Example Button Component > Item { > id: rootElement > signal clicked(MouseEvent mouse) > > ... > > MouseArea { > anchors.fill: parent > onClicked: { > rootElement.clicked( mo

Re: [Qt-qml] How to think about Attached Properties?

2010-12-05 Thread bea.lam
Hi Charley, > > In the case where I have MyAttachedProperties, must the nested "b.c.d" > actually be nested within each other (with each of "b" and "c" derived from > QObject and exposed to QML), or is there a way I could "map" the "b.c.d" to > some application-specific attribute within MyAtta

Re: [Qt-qml] Custom Item on a ListModel

2010-11-30 Thread bea.lam
Hi Thomas, On 01/12/2010, at 2:07 AM, ext Thomas PABST wrote: > Hi, > > I'm currently trying to find a way to make differents items on a ListModel ! > I design a general box, and I would like to add customs items on them. By > exemple, I would like to add a file manager on the first one, an a

Re: [Qt-qml] How to think about Attached Properties?

2010-11-30 Thread bea.lam
Hi Charley, On 27/11/2010, at 11:45 AM, ext Charley Bay wrote: > I'm implementing "attached properties" on my custom C++ type (exposed to > QML), and am unsure about the "proper" use model: > > > > For example, I did: > > (a) Implement C++ clas

Re: [Qt-qml] Tracking framerate in hybrid C++ & QML app

2010-11-29 Thread bea.lam
Hi Ville, On 28/11/2010, at 8:23 AM, ext Ville M. Vainio wrote: > Is there a "canned" way to track framerate in an application using > that is using QDeclarativeView from C++? > You can set the QML_SHOW_FRAMERATE environment variable to output the frame rate. regards, Bea _

Re: [Qt-qml] XML patterns and Namespace prefix

2010-11-22 Thread bea.lam
Hi Adrian, On 22/11/2010, at 5:40 PM, ext adrian hornsby wrote: > Hi all, > > I am trying to parse an activity-stream: > > > tag:photopanic.example.com,2008:photo01 > My Cat > 2008-11-02T15:29:00Z > href="/geraldine/photos/1" /> > > tag:atomactivity.example.com,2008:photo > > > > > with

Re: [Qt-qml] Object passing in threaded applications.

2010-11-10 Thread bea.lam
Hi René, On 10/11/2010, at 10:49 PM, ext René Hansen wrote: > > And my question is then, is there any other QML objects besides > ListModel I can use? Where can I find the documentation? Why isn't there > support of custom objects? > No, the WorkerScript doesn't support passing of custom object

Re: [Qt-qml] QML Listmodel signal parameters

2010-11-08 Thread bea.lam
Hi Christian, On 08/11/2010, at 8:32 PM, ext ext-christian@nokia.com wrote: > The ListModel in QML has a number of signals like: > > onItemsInserted > onItemsChanged > onItemsRemoved > etc… > > Is there any way to know which items have actually been changed? I can’t find > any documentat

Re: [Qt-qml] Getting the id

2010-11-07 Thread bea.lam
On 05/11/2010, at 5:34 PM, ext pekka.e.jok...@nokia.com wrote: > Can the QDeclarativeEngineDebug be used in test code and in the tools somehow > for this? > > -P These classes are private so we wouldn't recommend that you use them. Currently the declarative auto tests use objectName to locat

Re: [Qt-qml] Call C++ Slot from Workerscript.sendmessage

2010-11-01 Thread bea.lam
Hi Mike, On 01/11/2010, at 9:37 PM, ext Schmidt wrote: > >> Hi All, >> >> >> >> how do i call a slot of my c++-Programm from >> >> the WorkerScript .js file ? >> >> >> >> class MyClass { >> >> Q_OBJECT >> >> public slots: >> >> void work() { /* do something*/ } >> >> } >> >> >>

Re: [Qt-qml] how to reload qml Image

2010-10-28 Thread bea.lam
Hi Jingzhe, On 28/10/2010, at 6:07 PM, ext jingzhe...@nokia.com wrote: > Hi, > > I have a Image element in my QML, and I use my own ImageProvider as the > source, my ImageProvider is a plugin. > > Image { > Id: foregroundImage > Source: “image://ownimageprovid

Re: [Qt-qml] Setting width and height depending on screen resolution

2010-10-28 Thread bea.lam
Hi Felipe, On 28/10/2010, at 9:50 PM, ext Felipe Mogollon wrote: > Hi, > > I am developing a qml gui based application and I would like to know > if there is any way of knowing screen resolution (width and height) > from qml in order to set icons position relative to that resolution. You can us

Re: [Qt-qml] Accessing C++ singleton from QML

2010-10-27 Thread bea.lam
Hi Alex, On 28/10/2010, at 5:04 AM, ext Alex wrote: > Hi all, > > This is probably a silly question, but how do I access a singleton > instance of a C++ class from QML? > > For example, I have: > > class Settings : QObject { > public: > static Settings *instance(); > > private: > Settings()

Re: [Qt-qml] Flipable not showing content

2010-10-19 Thread bea.lam
On 20/10/2010, at 4:36 AM, ext Colin Kern wrote: > On Fri, Sep 24, 2010 at 2:00 PM, Almo Nito wrote: >> Hello there, i have a Flippable like the one in the flipabe example >> >> Cant I use ids as front and back? do I have to place the real item there? >> > > It looks like you have to place th

Re: [Qt-qml] QML Quick examples : "Charts 1.0 module" : how this works?

2010-09-22 Thread bea.lam
On 22/09/2010, at 5:44 PM, ext matthieu.riot...@skf.com wrote: > Thanks for useful link and advice. > > But as you well anticipated, I'm now unable to make the chapter 6 to run. > :-) > With the files as they are delivered, I've got the now usual message > "module Charts is not installed" > I

Re: [Qt-qml] QML Quick examples : "Charts 1.0 module" : how this works?

2010-09-21 Thread bea.lam
Hi Matthieu, On 21/09/2010, at 9:36 PM, ext matthieu.riot...@skf.com wrote: > Hi all, > > I have a big interest in QML but am facing an issue where I can't > understand what to do. > I downloaded the latest Qt Creator snapshots and started looking at the > Quick examples. > In the one named "t

Re: [Qt-qml] SmoothedAnimation Soul Searching

2010-09-06 Thread bea.lam
On 03/09/2010, at 8:10 PM, ext Alan Alpert wrote: > I'm looking for some feedback on what people think the real use case for > SmoothedAnimation is. There's currently two different cases that I'm looking > into. > > A) Move from point C to point D, smoothly, where point D doesn't change > (mu

Re: [Qt-qml] Multiple qml files in one .cpp

2010-08-23 Thread bea.lam
On 21/08/2010, at 1:12 AM, ext Sulamita Garcia wrote: > Hi > > I'm following the SameGame example - > http://doc.qt.nokia.com/4.7-snapshot/qml-advtutorial.html. The example runs > fine with qmlviewer, but I'm trying to generate a release for it. I have a > main.cpp like this: > > #include

Re: [Qt-qml] Dynamically created items and properties

2010-08-23 Thread bea.lam
> > This does not seem to work too well for me. Or, well, not at all actually. > What I have is: > > property alias connectionTarget: seenConnection.target > > id: dummyId > states: [ > State { > name: "UnitValid" > when: unit != undefined >

Re: [Qt-qml] UTF-8 vs. other encodings with XMLHttpRequest

2010-08-23 Thread bea.lam
On 20/08/2010, at 5:04 PM, ext ari.koivi...@nokia.com wrote: > Hi, > > I've run into problems in how qml handles character encodings with > XMLHttpRequest. > > The web service I'm using returns either a block of text with following > response header "content-type: text/plain; charset=iso-8859

Re: [Qt-qml] Dynamically created items and properties

2010-08-23 Thread bea.lam
Hi Jan, > The destruction is not triggered there yet, it happens much later when the > user does some > actions. The errors come immediately when the Unit is created. The unit does > work and all the > bindings seem to get updated, but the initial stream of errors is a bit > worrying to me. >

Re: [Qt-qml] Dynamically created items and properties

2010-08-19 Thread bea.lam
Hi Jan, > > The "unit" is still a C++ object that gets assigned as soon as the Image is > created. I still get warnings like these for every line that contains a > "unit". The properties do work, but something is clearly wrong here: > > file:///.../qml/Unit.qml:27: TypeError: Result of express

Re: [Qt-qml] How catch C++ signal in qml

2010-08-17 Thread bea.lam
Hi Patryk, > > When I'm trying catch this signal - tick in MyPlayer file, I get something > like: Couldn't find slot/function: myAction. But when I put myAction in > main.qml everything works fine. For now, I add to main.qml: > > function myAction(data) > { > player.myAction(data); > } > > bu

Re: [Qt-qml] ScalingAnimation in QML

2010-08-15 Thread bea.lam
Hi Bartosh, > > So if I omit the transformOrigin in the PropertyChanges and write this > > states: State { > name: "rotated" > PropertyChanges { target: rect; rotation: 180 } > } > > transitions: Transition { > SequentialAnimation { > PropertyAction { target: rect; property: "transformOrigin"

Re: [Qt-qml] ScalingAnimation in QML

2010-08-15 Thread bea.lam
Hi Bartosh, On 14/08/2010, at 8:24 AM, ext Bartosh Wroblevksy wrote: > Hi > > I would like to do a rotation animation through transition but would like to > change the center of the rotation. Can I change the property > "transformOrigin" on the fly? >something like this > > Rectangle

Re: [Qt-qml] Views and models

2010-08-09 Thread bea.lam
Hi Cornelius, On 07/08/2010, at 1:14 AM, ext Cornelius Hald wrote: > [...] > > So far, so good. I will get all sides from my first slide show. But how > can I, for example, access the element of ? And how > can I access the other slide shows? > > I would like to have a list, where each elemen

Re: [Qt-qml] enumerations in QML

2010-08-04 Thread bea.lam
On 05/08/2010, at 2:45 PM, ext Gregory Schlomoff wrote: > Isn't there a way to expose an enum to QML with qRegisterType or something? > If an enum is exposed to Qt's Meta Object system using Q_ENUMS, the enum is automatically available to QML. This is mentioned in http://doc.qt.nokia.com/4.7

Re: [Qt-qml] Image { pixmap } is gone :( Can't use QIcons anymore

2010-07-22 Thread bea.lam
Hi Steve, On 22/07/2010, at 1:03 AM, ext Stephen Kelly wrote: > Hello, > > The pixmap property has been removed. > > http://bugreports.qt.nokia.com/browse/QTBUG-11980 > > This came as a great surprise to us because we are using it and it is > already very late in the release cycle to be removi

Re: [Qt-qml] QML Questions

2010-07-13 Thread bea.lam
On 14/07/2010, at 10:20 AM, ext Jason H wrote: > Ok, I'm with you. So how do I make sure all the images have loaded in the > model? > Actually, it's probably better to avoid NumberAnimation. In your case it's not the best thing to use since your "to" value keeps changing. A better option i

Re: [Qt-qml] Qml extending with QGraphicsWidgets

2010-07-13 Thread bea.lam
Hi Kate, On 14/07/2010, at 2:29 AM, ext kate.alh...@nokia.com wrote: [...] > > I am implementing both paint() and boundingRect() as normal QGraphicsView > code. > > I also find dojo flipmo but it is also using proxywidget and not painting > itself. > > Is there some extra property that need t

Re: [Qt-qml] QML Questions

2010-07-13 Thread bea.lam
On 14/07/2010, at 7:41 AM, ext Jason H wrote: > I'm putting this out on the list so others can refer to it... > > Ah, I see, as the model loads stuff async, it adjusts content height > continuously. I could very well use count, but I don't know the number of > pixels > per item. > > > I re

Re: [Qt-qml] QML Questions

2010-07-11 Thread bea.lam
> > >> Unable to assign [undefined] to double to // to: contentHeight >> > > Not sure about this error - I can't reproduce it myself. Could you file a bug > with a standalone example? Ah, it looks like the error shows up if the ListView is enclosed within a parent item. To avoid this erro

Re: [Qt-qml] QML Questions

2010-07-11 Thread bea.lam
On 10/07/2010, at 12:37 AM, ext Jason H wrote: > So I dug more into it and got this: > ListView{ >id: lv >width: 1000 >height: 700 >anchors.fill: parent >model: visualModel >spacing: 10 >NumberAnimationon contentY { >from:

[Qt-qml] Changes to pixmap loading for image elements

2010-07-09 Thread bea.lam
Hi, The Image::pixmap property has been removed as it can cause memory issues, as noted in http://bugreports.qt.nokia.com/browse/QTBUG-11980. To improve support for pixmap loading (for both Image and BorderImage), we have extended QDeclarativeImageProvider to enable it to serve QPIxmaps as well

Re: [Qt-qml] QML Questions

2010-07-09 Thread bea.lam
Hi Jason, To scroll a flickable, change the contentY property. E.g. change >NumberAnimationon visibleArea.yPosition { >from:0.0 >to: 1.0 >easing: Easing.Linear >duration: 1 >} >} to something lik

Re: [Qt-qml] Javascript include/import?

2010-06-16 Thread bea.lam
> > In the meantime you can work around this by using the actual constant value > for the enum, e.g. > > if (component.status == 1) { > print("it worked!") > } > Actually, it turns out this change won't fix the problem because there's a bug with calling Qt.createCom

Re: [Qt-qml] Javascript include/import?

2010-06-16 Thread bea.lam
Hi Greg, On 17/06/2010, at 2:58 AM, ext greg.edwa...@nokia.com wrote: > Hi all, > > Have a look at an example of my javascript code below, it’s causing the > following error, > > TypeError: Result of expression 'Component' [undefined] is not an object. > This is caused by a known bug whe

Re: [Qt-qml] debugger for javascript in QML apps ?

2010-06-09 Thread bea.lam
Hi Sacha, On 10/06/2010, at 2:13 AM, ext Sacha Zyto wrote: > Hi everyone, > > I've been playing with QML for a few days, with great interest, and I > was wondering if there was anyway to debug the javascript code that I > write for QML app. > > By that, I mean basic debugging: Being able to s

Re: [Qt-qml] Rendering of rectangle borders with odd-numbered widths

2010-05-18 Thread bea.lam
On 06/05/2010, at 3:23 PM, ext bea@nokia.com wrote: > Currently if a Rectangle has an odd-numbered width, part of the bottom and > right-hand borders are rendered outside the rectangle's boundaries, not > inside. This is consistent with Qt's border rendering, as documented at > http://doc.

Re: [Qt-qml] XmlListView question

2010-05-17 Thread bea.lam
Hi Tim, On 18/05/2010, at 1:53 AM, ext tim@nokia.com wrote: > Hi, > > I noticed there isn’t a get() method for the XmlListView. Is there any way to > get at a specific index in an XmlListView model? Not at the moment. I've created http://bugreports.qt.nokia.com/browse/QTBUG-10761 to add a

Re: [Qt-qml] Rendering of rectangle borders with odd-numbered widths

2010-05-06 Thread bea.lam
Hi, >> >> This can be easily fixed with the attached patch, but >> obviously it would change the appearance of existing apps. >> For example if a ListView delegate renders bordered Rectangle >> elements for each item like this: > > If I got the patch right it's just fixing the (arguably most com

[Qt-qml] Rendering of rectangle borders with odd-numbered widths

2010-05-05 Thread bea.lam
Currently if a Rectangle has an odd-numbered width, part of the bottom and right-hand borders are rendered outside the rectangle's boundaries, not inside. This is consistent with Qt's border rendering, as documented at http://doc.qt.nokia.com/4.7-snapshot/qrectf.html (under "Rendering"). This b