Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Linking QML plugins statically

    2
    0 Votes
    2 Posts
    4k Views
    C
    Didn't find a way that works for linking static plugins. However, you can include the plugin source in your project and use qmlRegisterType().
  • Qml+browser

    2
    0 Votes
    2 Posts
    3k Views
    A
    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 =)
  • TeamCity Dashboard with QML

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Building QML Applications resolution independent

    5
    0 Votes
    5 Posts
    13k Views
    G
    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: @ Item { id: rootItem Rectangle { id: anchoredRectangle anchors.top: parent.top anchors.topMargin: 17 anchors.bottom: parent.bottom anchors.bottomMargin: 10 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?
  • .qmlproject file question

    2
    0 Votes
    2 Posts
    7k Views
    G
    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: @ QmlFiles { directory: [ 'a directory', 'another directory'] } @
  • Cannot load video elements in MS windows

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Loader Element

    8
    0 Votes
    8 Posts
    4k Views
    K
    Thanks for the help.
  • Video and Audio elements

    4
    0 Votes
    4 Posts
    3k Views
    M
    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.
  • 0 Votes
    2 Posts
    2k Views
    M
    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 @
  • Two MouseAreas for the same real estate?

    5
    0 Votes
    5 Posts
    5k Views
    M
    Hi, 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 Regards, Michael
  • Complex QML UI questions

    37
    0 Votes
    37 Posts
    22k Views
    K
    Can I create a .config file or the equivalent of a .plist file for the settings menu to write to?
  • Qmake, how to manage QML install files?

    3
    0 Votes
    3 Posts
    5k Views
    C
    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]
  • QML and font family

    2
    0 Votes
    2 Posts
    4k Views
    M
    Yes, you can use "FontLoader":http://doc.trolltech.com/4.7-snapshot/qml-fontloader.html to load a font from a specified location.
  • QML Plugin. Returning a QScriptValue without using private headers.

    8
    0 Votes
    8 Posts
    5k Views
    M
    [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: "QTBUG-11942":http://bugreports.qt.nokia.com/browse/QTBUG-11942 [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)? Regards, Michael
  • Manipulating unknown types from c++.

    2
    0 Votes
    2 Posts
    3k Views
    L
    Found the answers... For QObjects they can just be cast using qvariant_cast<QObject*>(variant). For qml created lists use a QDeclarativeListReference, making sure to pass in the engine.
  • QML and future releases compatibility

    10
    0 Votes
    10 Posts
    7k Views
    M
    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. Regards, Michael
  • Animating dynamic ListViews

    4
    0 Votes
    4 Posts
    5k Views
    L
    Fix Version: 4.7.2 Thank you very much!
  • QML drop and wheel events

    4
    0 Votes
    4 Posts
    7k Views
    C
    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. Thanks, Cliff @ Rectangle { id: valuebox smooth: true anchors.margins: 10 radius: 10 property color default_color: "white" color: default_color property alias text: text.text property alias text_color: text.color property int default_pixel_size Text { id: text anchors.centerIn: parent; anchors.verticalCenterOffset: -1 font.pixelSize: parent.width > parent.height ? parent.height * .5 : parent.width * .5 color: "white" style: Text.Sunken styleColor: "black" smooth: true } Keys.onUpPressed: { text.text = text.text - (-1) } Keys.onDownPressed: { text.text = text.text - 1 } MouseArea { anchors.fill: parent hoverEnabled: true onEntered: { default_pixel_size = text.font.pixelSize text.font.pixelSize = default_pixel_size + 5 parent.color = "yellow" valuebox.focus = true } onExited: { text.font.pixelSize = default_pixel_size parent.color = default_color valuebox.focus = false } } } @
  • [4.7] QML properties load order

    6
    0 Votes
    6 Posts
    5k Views
    M
    Hi, 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). Regards, Michael
  • Import on "." needed?

    3
    0 Votes
    3 Posts
    7k Views
    A
    I forgot to mention one thing: qmlviewer has the -I option that also can be used to add paths to the QML import path variable. @ $ qmlviewer -I /path/to/example/dir main.qml @