Re: [Qt-qml] Accessing a QAbstractItemModel in QML outside a view

2010-12-01 Thread Jan Ekholm
} > Text { text: list.currentItem.data.name } > > BR, > Martin. > >> -Original Message- >> From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com] On >> Behalf Of ext Jan Ekholm >> Sent: Wednesday, 1 December 2010 4:55 PM >> To: qt-qm

[Qt-qml] Accessing a QAbstractItemModel in QML outside a view

2010-11-30 Thread Jan Ekholm
ocument, and not being able to actually access it makes it all feel somewhat silly. I can make extra methods on my subclassed QAIM on the C++ side to get data, but the point is that I should not have to do that, it ought to just work. Someone please give me some RTFM resource. Best regards,

Re: [Qt-qml] setting QDeclarative view using UI file of Qt

2010-08-24 Thread Jan Ekholm
On Tuesday 24 August 2010 13:02:47 Kumar vaibhav wrote: > ...vaibhav.qml... > import Qt 4.7 > > Rectangle { > width: 640 > height: 480 > > MouseArea { > id: mouse_area1 > anchors.fill: parent > onClicked: console.

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

2010-08-23 Thread Jan Ekholm
ions: Binding loop detected for property "target" Perhaps I did it wrong, but if it's this hard to copy instructions verbatim and get them right, then the whole workaround kludge setup is already way too complex. I'll leave the errors as they are and put this down to "c

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

2010-08-23 Thread Jan Ekholm
roperty "connectionTarget" The connection is working though and my "onSeenChanged" gets called when it should, but the reason for this workaround was to get rid of errors, not double them. :) -- Jan Ekholm jan.ekh...@smultron.net ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml

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

2010-08-22 Thread Jan Ekholm
at all, but as long as they are, more workarounds are needed. I'm sorry for being such a pain in the rectal regions, but I've invested so much time in this project now for it to stumble and collapse at the final stages of development. -- Jan Ekholm jan.ekh...@smultron.net ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml

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

2010-08-20 Thread Jan Ekholm
Unit"; when: unit != undefined > PropertyChanges { target: img; x: unit.x * 48 + ( unit.y % 2 ) > * 24; y: unit.y * 36; source: unit.icon } > } > } Ha! I tried something like this, but not exactly like that. Your version works perfectly and there are no longer

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

2010-08-19 Thread Jan Ekholm
On Tuesday 27 July 2010 01:42:36 Martin Jones wrote: // see previous mail ... > The above is not a binding. It is an assignment. Bindings are created > using the colon syntax. > > One solution is to provide the Unit to the QML item and let it setup the > bindings: > > Unit.qml: > > Image { >

Re: [Qt-qml] enumerations in QML

2010-08-05 Thread Jan Ekholm
On Thursday 05 August 2010 08:03:41 bea@nokia.com wrote: > 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

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

2010-08-05 Thread Jan Ekholm
On Thursday 05 August 2010 09:03:36 michael.bras...@nokia.com wrote: > In tests/benchmarks/declarative there is a tool called qmltime that can be > used to profile component creation costs. Running my N900: > > * the original QML tile took 2.13ms to create > * the same tile with the 5 bindings re

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

2010-08-04 Thread Jan Ekholm
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 well > > Give

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

2010-08-03 Thread Jan Ekholm
On Tuesday 03 August 2010 09:51:13 michael.bras...@nokia.com wrote: > Hi, > > On 03/08/2010, at 4:27 PM, ext Jan Ekholm wrote: > > On Tuesday 03 August 2010 04:55:46 Gregory Schlomoff wrote: > >> Hello ! > >> > >> You may want to have a look at our code

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

2010-08-02 Thread Jan Ekholm
On Tuesday 03 August 2010 04:55:46 Gregory Schlomoff wrote: > Hello ! > > You may want to have a look at our code for drag and drop, it's working > well: > > http://bitbucket.org/gregschlom/qml-drag-drop > > (and more specifically > http://bitbucket.org/gregschlom/qml-drag-drop/src/tip/Declarati

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

2010-08-02 Thread Jan Ekholm
On Monday 02 August 2010 22:22:25 alexis.men...@nokia.com wrote: > Hello, > > QDeclarativeItemPrivate constructor does this : > > QGraphicsItemPrivate::acceptedMouseButtons = 0; > > which means that no mousePress/mouseMove/mouseRelease will be delivered. > > You need to call setAcceptedMouseBut

[Qt-qml] QDeclarativeItem subclasses and mouse events

2010-08-02 Thread Jan Ekholm
7;s something trivial I'm missing here? I've looked through all the demos and examples, but none of the C++ items are interactive that I can see. Any hints as to where my failure to grok stuff would be? Kind regards, Jan Ekholm -- Five exclamation mar

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

2010-07-27 Thread Jan Ekholm
On Tuesday 27 July 2010 01:42:36 Martin Jones wrote: > The above is not a binding. It is an assignment. Bindings are created > using the colon syntax. Ah, great! I hoped there was something that I just didn't grok. I've never noticed the difference before. > One solution is to provide the Uni

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

2010-07-26 Thread Jan Ekholm
I tried to change the Unit item to really, really bind to the C++ properties using this change: > Item { > > function createUnits (component) { > if ( component.status == Component.Ready ) { > // get all units, this is a C++ list of Unit* > var unit_list = sc

[Qt-qml] Dynamically created items and properties

2010-07-25 Thread Jan Ekholm
re the QML side is even initialized. But this would be an epically ugly kludge that should fall into the 12th layer of hell.] Best regards, Jan Ekholm -- He says gods like to see an atheist around. Gives them something to aim at.

Re: [Qt-qml] Changes to how QML files can import other QML files?

2010-07-22 Thread Jan Ekholm
On Thursday 22 July 2010 17:24:04 Kai Koehne wrote: > There was an e-mail some time ago that this 'feature' (which is just a > bug) has been fixed. The warning message tells you exactly what the > problem is: import "X" is for importing a directory, not an individual > file. > > You can just remo

[Qt-qml] Changes to how QML files can import other QML files?

2010-07-22 Thread Jan Ekholm
does not work. Any hints? Would it be better to wait some months to let everything stabilize before trying QML for real apps? Kind regards, Jan Ekholm -- Pets are always a great help in times of stress. And in times of starvation too, o'course.

Re: [Qt-qml] Audio and Video

2010-05-23 Thread Jan Ekholm
On Thursday 20 May 2010 10:41:56 kai.koe...@nokia.com wrote: > qt-qml-boun...@trolltech.com wrote: > > defaultServiceProvider::requestService(): no service found > > for -"com.nokia.qt.mediaplayer" > > > > My Qt version is 4.7 Beta1 > > My best advice for you is to try downloading the Qt APIs for