Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.6k Topics 75.8k Posts
  • Qmake, how to manage QML install files?

    3
    0 Votes
    3 Posts
    4k 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.

  • 0 Votes
    8 Posts
    4k 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
    4k 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
    @

  • Questions about QML for new developer

    4
    0 Votes
    4 Posts
    5k Views
    T

    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.

  • Where is the source code for this example?

    4
    0 Votes
    4 Posts
    4k Views
    D

    ;)

    Ainda estranho ver comentários em pt-br nesse mundo =)

    cheers,

  • Mirroring in Flipable

    5
    0 Votes
    5 Posts
    2k Views
    G

    Hmm... I see. It does make sense after all, although it isn't really intuitive.

    Thanks for your help

  • Qt Quick - design philosophy

    4
    0 Votes
    4 Posts
    3k Views
    A

    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 =)

  • Qml as a vector source for printing.

    4
    0 Votes
    4 Posts
    4k Views
    M

    Hi,

    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.

    Regards,
    Michael

  • ActiveQt Com and QEvents searching for help!

    3
    0 Votes
    3 Posts
    3k Views
    R

    Sure, I'm sorry about that: "Application Object Event":http://msdn.microsoft.com/en-us/library/bb839450(v=office.12).aspx

  • How to use QML animation in broadcasting?

    5
    0 Votes
    5 Posts
    3k Views
    2

    it's interesting. so you need an animations to be based on number of frames , not on time, and then you set the speed(framerate) in frames/second. I will vote for such a suggestion

  • Accessing Delegates from Outside the Delegate

    5
    0 Votes
    5 Posts
    3k Views
    A

    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

  • 0 Votes
    5 Posts
    6k Views
    G

    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.

  • How I can quickly save QML animation to file?

    2
    0 Votes
    2 Posts
    2k Views
    M

    "This answer":http://developer.qt.nokia.com/forums/viewthread/1181/#5150 might be useful here are well.

  • [solved] QML Linux performance issues

    3
    0 Votes
    3 Posts
    5k Views
    S

    Hey guys, your are so great this actually solves the problem at the first sight.

    I called

    @QApplication::setGraphicsSystem("raster");@

    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 ^^