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

2010-11-30 Thread martin.jones
Right now if you want to access data in your model in script, you will need to add methods to your model to allow that. For the specific case of showing data from the currentItem, you can expose the model data, e.g. ListView { Id: list delegate: Text { property variant data: mod

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

2010-11-30 Thread Jan Ekholm
Hi, The subject says it all, apart from the context. Accessing a QAIM in a view (such as a ListView) is all nicely documented and works as expected. However, how can I access the same exposed C++ model outside a view? In my case I want to show a list of data and next to the list have some Tex

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] How to expose widget to QML

2010-11-30 Thread vuleetu
Thanks Martin :) On Wed, Dec 1, 2010 at 12:13 PM, wrote: > You may be able to do this via QGraphicsProxyWidget, but as the > documentation states: “This class is provided for convenience when bridging > QWidgets and QGraphicsItems, it should not be used for high-performance > scenarios”. If yo

Re: [Qt-qml] How to expose widget to QML

2010-11-30 Thread martin.jones
You may be able to do this via QGraphicsProxyWidget, but as the documentation states: "This class is provided for convenience when bridging QWidgets and QGraphicsItems, it should not be used for high-performance scenarios". If you are able then it is better to port the widget's functionality to

[Qt-qml] How to expose widget to QML

2010-11-30 Thread vuleetu
Hi, I can create custom extension which inherit QDeclarativeItem and it works. But i want to using existing widget like QLabel in Qt exposed to qml? Does anyone know how to do this? Best regards. ___ Qt-qml mailing list Qt-qml@trolltech.com http://lis

[Qt-qml] Custom Item on a ListModel

2010-11-30 Thread Thomas PABST
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 addess book on the second one, an agenda on the third ... But only on the gre

Re: [Qt-qml] Jar-like zip archive of QML code

2010-11-30 Thread Adriano Rezende
On Tue, Nov 30, 2010 at 5:27 AM, Kai Koehne wrote: > On 11/29/2010 8:01 PM, ext Adriano Rezende wrote: >> Hi, >> >> On Wed, Nov 24, 2010 at 7:00 PM, Ville M. Vainio  wrote: >>> Every now and again (case in points - yesterday after Tampere MeeGo >>> meetup) this pops up in conversations - people se

[Qt-qml] QML memory usage with "import QtWebKit"

2010-11-30 Thread Gregory Schlomoff
Hello, One simple observation. Launching the following code in qmlviewer.exe, I get a memory usage of aroung 3 megabytes: --- import QtQuick 1.0 Rectangle { width: 200 height: 200 } Now, with the following code, memory usage jumps to 1

Re: [Qt-qml] Objects get mangled into QVariantMaps when passed from QtScript to QML functions... why?

2010-11-30 Thread Kent Hansen
Hi, Den 29. nov. 2010 15:54, skrev ext Bart Kelsey: > My current project is a game engine that uses QML for the UI and > QtScript for game scripting (video at > http://www.youtube.com/watch?v=SG5p-qLARrw ). At any rate, while it's > possible to call functions on QML elements from QtScript, whe

Re: [Qt-qml] Jar-like zip archive of QML code

2010-11-30 Thread Kai Koehne
On 11/29/2010 8:01 PM, ext Adriano Rezende wrote: > Hi, > > On Wed, Nov 24, 2010 at 7:00 PM, Ville M. Vainio wrote: >> Every now and again (case in points - yesterday after Tampere MeeGo >> meetup) this pops up in conversations - people seem to miss a .jar >> like archive format for QML files. Bas