If they are working fine from Creator, but not from qtdemo, running with "-graphicssystem raster" may help (this is set by default when running qmlviewer/qmlobserver, but not when running qtdemo).
AFAIK, there is no plan for an official browser plugin. At least it was the position in the last time I saw a developer talking about this subject, but it was in the first semester, don't know if the plans changed since then...
EDIT: "a developer talking about this subject" == "http://lists.trolltech.com/pipermail/qt-qml/2010-April/000213.html":http://lists.trolltech.com/pipermail/qt-qml/2010-April/000213.html =)
Indeed, probably anchor layouts is what you want. If you want, as you said, components to be enlarged only on vertical, you can write, for instance:
anchors.horizontalCenter: parent.horizontalCenter // or, for example: anchors.right: parent.right
This way the Rectangle will be enlarged only on vertical axis when Item is enlarged.
Is something like this what you want?
Well, I don't know it. But it's interesting that all examples in Qt declare as directories for qml files only the current directory, although many of them have qml files in subdirectories and Qt Creator still find them. Maybe one only has to declare the root directory.
Nevertheless, if a .qmlproject file uses the same syntax as a general qml file, then you can specify more than one directory in this manner:
directory: [ 'a directory', 'another directory']
Instructions for getting Qt Mobility are here: "http://doc.qt.nokia.com/qt-mobility-snapshot/installation.html":http://doc.qt.nokia.com/qt-mobility-snapshot/installation.html
The second question is outside of my scope, sorry.
Are you looking for blueRectangle to initially be positioned at rectRectangle.x + 120, but not bound to it? (so changing redRectangle.x does not cause blueRectangle to move?) In that case you could either use an absolute value for the position of blueRectangle, or assign a value to blueRectangle.x at component completion:
// this assigns a value, and does not establish a binding
Component.onCompleted: blueRectangle.x = redRectangle.x+120 @
By default, the first item to accept a mouse press "grabs" the mouse (for more on this behavior, see docs "here":http://doc.qt.nokia.com/4.7/qgraphicsitem.html#mousePressEvent). So currently only one MouseArea can actively handle mouse events. We'd like to make this more flexible -- the task tracking this is "QTBUG-13007":http://bugreports.qt.nokia.com/browse/QTBUG-13007
Thanks, that worked very well. For reference, "this page":http://doc.trolltech.com/4.7/qtbinding.html describes putting QML files into an application as resources.
[edit: link highlighted / Denis Kormalev]
[quote author="Gary_" date="1287690827"]It is the exact way I wish to access my model. However, it uses private classes/headers to achieve this. I assume it is so they can be flexible with the engine logic without impacting the public SDK.[/quote]
That's exactly right. The bug that tracks this is:
[quote author="Gary_" date="1287690827"]Is it possible to safely implement their approach using the public SDK? If not, what is the most efficient way to do it?[/quote]
There is "this thread":http://lists.trolltech.com/pipermail/qt-qml/2010-September/001313.html that mentions two approaches to accessing the engine (one using private headers). Alternatively, what about returning a QDeclarativePropertyMap instead of a QScriptValue (may depend on planned ownership of this value)?
When 4.8 is released, the plan is that you will be able to continue using old import statements, or switch to new import statements if you want to use any of the new features provided.
The reason QtQuick 1.0 was introduced was to decouple QML versioning from Qt versioning. That will hopefully allow us to add new properties, etc within a minor release (e.g. 4.7), rather than having to wait for the next minor release (e.g. 4.8). This flexibility is important because QML is a new technology -- I think its natural that it grows at a different rate from Qt as a whole, which is overall quite mature.
A mouse up/down can be used in the following code to increment/dec the text value when the cursor is over top the item. What is the best way to make the scroll wheel do the same? Note, I need this for many items on a single screen. With a QDeclarativeItem subclass, would I need to implement the below in C++?
With the "implement in mainWindow and sync with qml", would this approach work and how does it look from a high level?
I'm still climbing the QML learning curve, so so looking for a high level overview or a place to start.
property color default_color: "white"
property alias text: text.text
property alias text_color: text.color
property int default_pixel_size
anchors.centerIn: parent; anchors.verticalCenterOffset: -1
font.pixelSize: parent.width > parent.height ? parent.height * .5 : parent.width * .5
text.text = text.text - (-1)
text.text = text.text - 1
default_pixel_size = text.font.pixelSize
text.font.pixelSize = default_pixel_size + 5
parent.color = "yellow"
valuebox.focus = true
text.font.pixelSize = default_pixel_size
parent.color = default_color
valuebox.focus = false
Working with a direct QObject-derived subclass rather than a QDeclarativeItem-derived subclass shouldn't be a problem (the engine itself knows nothing about QDeclarativeItem; to the engine QDeclarativeItem is simply another QObject with properties). Note that QDeclarativeParserStatus is an interface that is meant to be multiply inherited from (i.e. you would inherit from both QObject and QDeclarativeParserStatus to use it).
There was a great presentation on mixing C++ and QML at the "DevDays":http://qt.nokia.com/qtdevdays2010/. Maybe you can still make it to the San Francisco event?
The presentations were recorded, I have no idea when those videos will become available though.
Qt Components is in an, let's say, alpha stage. If you get interested, in the repository pointed by danilocesar you'll find in the master branch a widget set for MeeGo (in progress). Also, check the branch mx, where you can see a widget set created in QML with the look and feel of the "MX toolkit":http://www.ohloh.net/p/mx-toolkit.
In "this wiki page":http://developer.qt.nokia.com/wiki/Qt_Quick_Components you can find how to contact the developers and contribute with your opinions (and, maybe, with code =).
Stay tuned when the Qt Developer Days videos and/or slides become available and check the "talk about the project":http://qt.nokia.com/qtdevdays2010/qt-technical-sessions#qtcomponents.
A developer sprint happened last week in Oslo, so there will be new stuff soon. (Probably nothing appeared yet because of the Qt DevDays Munich =)
Ultimately almost all of the painting in the QML graphical elements is cached into pixmaps for performance reasons. This is done in the elements themselves (have a look at QDeclarativeRectangle::generateBorderedRect(), for example), so I can't think of an easy way to get around this without hacking all of the elements, or writing your own set of vector-based elements.
yes the value in myDelegate will be undefined.A solution to this problem is to reset the variable in myDelegate to NULL whenever the list starts moving( onMovementStarted: ) just to make sure it doesn't point to an invalid object/delegate
Do you have a ".qmlproject" file in your project directory? It has a QmlFiles field where it instructs Qt Creator where to find qml files. If you don't have one, it's possible that it's causing the need to reopen the project in order to load the new files, because, like Schneidi said, normally reopening is not necessary.
Hey guys, your are so great this actually solves the problem at the first sight.
before calling the QApplication constructor.
Now I get a pretty good performance on my Quad processor maybe I have validate this on
a weaker system, but I guess this should solve the performance problems we had.
Thanks mbrasser I already knew this page but I just forgot to consult this one ^^
[quote author="JesseOnRails" date="1286006941"]>ls /Developer/Applications/Qt/imports/
Okay, it looks like this has "old" contents (there should be a QtWebKit rather than an org) -- I've added a note to "QTBUG-13888":http://bugreports.qt.nokia.com/browse/QTBUG-13888.