Re: [Qt-qml] Qt-qml Digest, Vol 9, Issue 53
ext qt-qml-requ...@trolltech.com qt-qml-requ...@trolltech.com wrote: Send Qt-qml mailing list submissions to qt-qml@trolltech.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.trolltech.com/mailman/listinfo/qt-qml or, via email, send a message with subject or body 'help' to qt-qml-requ...@trolltech.com You can reach the person managing the list at qt-qml-ow...@trolltech.com When replying, please edit your Subject line so it is more specific than Re: Contents of Qt-qml digest... Today's Topics: 1. Re: Using enums in QML signal handlers (jerome.pas...@nokia.com) 2. Win/Lin differences (Jason H) 3. Re: JavaScript with .pragma library cannot seeComponent object (Ville M. Vainio) -- Message: 1 Date: Fri, 19 Nov 2010 23:33:48 +0100 From: jerome.pas...@nokia.com Subject: Re: [Qt-qml] Using enums in QML signal handlers To: michael.bras...@nokia.com, ext-salonen.o...@nokia.com Cc: qt-qml@trolltech.com Message-ID: 7e2e76540f3c0c49bdeb06f892c61f0054f44e4...@nok-eumsg-04.mgdnok.nokia.com Content-Type: text/plain; charset=Windows-1252 Hello, There is a similar bug that was already fixed: http://bugreports.qt.nokia.com/browse/QTBUG-11313 How do you register the enum in the Qt Declarative module? Did you use qmlRegisterUncreatableType? http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeengine.html#qmlRegisterUncreatableType Thanks, Jerome P. From: qt-qml-boun...@trolltech.com [qt-qml-boun...@trolltech.com] On Behalf Of Brasser Michael (Nokia-MS-Qt/Brisbane) Sent: Wednesday, November 03, 2010 6:26 AM To: Olli Salonen (EXT-Futurice/Berlin) Cc: qt-qml@trolltech.com Subject: Re: [Qt-qml] Using enums in QML signal handlers 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 as an argument in a signal. I can use the enum in QML, but I cannot read the parameter in the signal handler. Is it supposed to work somehow? Example: class MyObject { Q_OBJECT Q_ENUMS(MyEnum) Q_PROPERTY(MyEnum value READ value NOTIFY valueChanged) public: enum MyEnum { Value1, Value2}; signals: void valueChanged(MyEnum value); } Qml file -- MyObject { onValueChanged: console.debug(?Value is ? + value) } This fails with the following output: QMetaProperty::read: Unable to handle unregistered datatype 'MyEnum' for property 'QDeclarativeBoundSignalParameters::value' I also tried to rename the signal parameter type to MyObject::MyEnum, but this did not work either. I can use the value correctly if I access it as a property, or if I assign enum values such as ?property int myvalue: MyObject.Value1?. Thanks, Olli ATT1..txt -- Message: 2 Date: Fri, 19 Nov 2010 18:46:21 -0800 (PST) From: Jason H scorp...@yahoo.com Subject: [Qt-qml] Win/Lin differences To: qt-qml@trolltech.com Message-ID: 323032.9180...@web120711.mail.ne1.yahoo.com Content-Type: text/plain; charset=us-ascii I am developing/testing on WinXP, deploying on Lin (TCE/X11/Nvidia ION) 4.7.0 on both. I had some surprises... 1. When I set opacity to 255 (errantly) in Win, it renders fine. On Lin, it doesn't render at all until opacity = 1 2. Text font.pointSize doesn't seem to be respected on Linux, but pixelSize is works. -- Message: 3 Date: Sat, 20 Nov 2010 09:47:38 +0200 From: Ville M. Vainio vivai...@gmail.com Subject: Re: [Qt-qml] JavaScript with .pragma library cannot see Component object To: ext-rene.1.han...@nokia.com,ext ext-ivailo.il...@nokia.com ext-ivailo.il...@nokia.com Cc: qt-qml@trolltech.com Message-ID: 1290239258.1585.13.ca...@nokia-n900 Content-Type: text/plain; charset=utf-8 I think that documentation is misleading - you can easily maintain state in a singleton inside your .js file, using .pragma library.. You just need to ensure that you pass the needed qml side information in arguments instead of referring to them directly. It's sort of like combining c++ and qml, really. -- Sent from my Nokia N900 - Original message - This is because when you include .pragma, you are really indicating that you want to create a stateless library. Here's an excerpt from the Docs about integrating Javascript: Stateless JavaScript libraries Some JavaScript files act more like libraries - they provide a set of stateless helper functions that take input and compute output, but never manipulate QML component instances directly. As it would be wasteful for each QML component instance to have a unique copy of these libraries, the JavaScript programmer can indicate a particular file is a stateless
Re: [Qt-qml] Mouse wheel events in QML
You have to make your own component in C++ to catch them. On Sun, Nov 21, 2010 at 1:29 AM, Girish Ramakrishnan gir...@forwardbias.in wrote: See http://bugreports.qt.nokia.com/browse/QTBUG-7369. In short, Flickable supports it but not MouseArea. Girish On Sat, Nov 20, 2010 at 9:17 PM, Jerzy Chalupski jerzy.chalup...@gmail.com wrote: I can't find any mouse wheel events handler. Am I selectively blind or are mouse wheel events not supported by QML? ___ 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 mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml
[Qt-qml] Looking for existing Qt/QML MediaCenter application
Hi, I was wondering if anyone's currently working (or planning to) on a QML-based MediaCenter application. I'm project leader of GeeXboX [1] multimedia distribution and Enna [2] EFL-based MediaCenter application and, for various reasons, I'm considering a switch from EFL to Qt/QML since quite a while. Most of our codebase actually relies in 2 external libraries (libplayer [3] and libvalhalla [4]) that we use for mediaplayer, metadata retrieval, database ... so the UI parts that actually make use of EFL are minimized to their minimum. As a result, I believe that migration should be affordable without complete rework of existing code. Though, instead of re-inventing wheel over and over again, I'd better re-use existing code or extend existing projects if some already exist. So if someone's already working on a Qt/QML MediaCenter, please say so. If no is and would be willing to contribute to one, please tell also, I'd be more than happy to recruit new developers. Ben References: - [1]: http://www.geexbox.org/ - [2]: http://enna.geexbox.org/ - [3]: http://libplayer.geexbox.org/ - [4]: http://libvalhalla.geexbox.org/ ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml
Re: [Qt-qml] Component loading in background thread?
I'm exposing a complex QGraphicsWidget to QML and the problem is, that whenever I load that component my application freezes for a second (on desktop, on mobile it's much longer). I'd like to display a lightweight 'loading' animation and load that component in the background without freezing the interface. Then whenever it's ready it should replace the animation with the real content. There is no all-encompassing answer to this. Threading is not directly provided in QML object instantiation (it would make simple constructions way to slow). Firstly, do you REALLY need to do all the construction you are doing? One second on the desktop is an inordinately huge amount of time. Perhaps a different approach is needed. For example, if you loaded an entire company addressbook at start-up, that might be better done per-record as needed. Can you thread the internals of your class? For example, if you did need to load a huge addressbook, you could do that in a thread and have a progress property and onLoaded signal emitted as it progresses. This keeps the threading in the C++ side (QThread is your friend), while using QML's inherent asynchronicity on the QML side. The Image elements effectively work this way (though the actual threading is in QDeclarativePixmap). -- Warwick ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml
Re: [Qt-qml] Aliasing handler properties
Hi, On 19/11/2010, at 10:42 PM, ext simon.tur...@nokia.commailto:simon.tur...@nokia.com wrote: Why does this not work? property alias onClicked: myEmbeddedMouseArea.onClicked It’s just a property after all. Just one that’s just a function assigned to it. When written like that it sounds trivial :) In reality they're not just properties and they're not just assigned a function. Of course, it is not an unreasonable thing to want to do, so if you create a bug we can look into it for a future release. Cheers, Aaron ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml
[Qt-qml] XML patterns and Namespace prefix
Hi all, I am trying to parse an activity-stream: entry idtag:photopanic.example.com,2008:photo01/id titleMy Cat/title published2008-11-02T15:29:00Z/published link rel=alternate type=text/html href=/geraldine/photos/1 / activity:object-type tag:atomactivity.example.com,2008:photo /activity:object-type /entry with QML XMLlistmodel and XMLrole as follows: query: /wall/entry XmlRole { name: title; query: title/string() } XmlRole { name: published; query: published/string() } XmlRole { name: link; query: link/@href/string() } but get this error: Error FODC0002 in tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:src, at line 9, column 25: Namespace prefix 'activity' not declared any idea how to solve that. All work well if I use very simple XML docs. thanks, Adrian ___ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml