Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Very strange phenomenon in QML animation with openGL

    2
    0 Votes
    2 Posts
    2k Views
    frankcyblogic.deF
    Just a note: The animation timer inside the Animation framework is limited to 60 Hz. Just checked it some days ago on Qt 4.7 . Therefore you won't get more frames, but just more property updates. It's difficult to tell what your problem is about, without knowing the code.
  • [Solved] Change position of ListView

    4
    0 Votes
    4 Posts
    2k Views
    B
    I' sorry mbrasser but you were right! It does work! The problem was I added some qml code that anchors the listview to the parent (which has a smaller height). So my problem is solved, thanks!
  • [Solved]How to Create ListModel in runtime

    5
    0 Votes
    5 Posts
    7k Views
    M
    Thanks for your help. At last i created that object) And i hope the last question is how to manipulate that object? Take parent and compare all it's children to find the object i created, or there is some other way to handle it?
  • Browsing through nested items in XmlListModel: XPath Query question

    2
    0 Votes
    2 Posts
    3k Views
    M
    What I've understood of your problem, is you need a support for nested xml in qml ? If that so , there is no support yet but you could follow the "bug report":http://bugreports.qt.nokia.com/browse/QTBUG-13688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs .
  • Playing a SoundEffect from a QRC

    7
    0 Votes
    7 Posts
    5k Views
    J
    Thanks for that moo1, you're right that it "might" go away if they're moving away from QSound. I added my vote for that bug just in case ;-)
  • [SOLVED] Children's opacity greater than parent's?

    3
    0 Votes
    3 Posts
    4k Views
    F
    Thank you, your idea works. :)
  • How to change the value of QML Coordinate element at runtime?

    5
    0 Votes
    5 Posts
    4k Views
    J
    Hi, I use the Qt SDK 1.1 beta, not the sdk from MCL. I am now using the map widget from C++, but I will test how QML location plugin works when the 1.2 release is out. Thank you! Juan
  • WorkerScript and Math.random().

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, What version of Qt are you using? There was a general (not WorkerScript-specific) problem with random number generation prior to 4.7.2 (see http://bugreports.qt.nokia.com/browse/QTBUG-13440 for details). If you are using 4.7.2 or later and having this problem, I'd recommend filing a bug report for it. Regards, Michael
  • 0 Votes
    2 Posts
    2k Views
    No one has replied
  • QObject::property(const char* name) in QML

    8
    0 Votes
    8 Posts
    4k Views
    M
    I'm talking about the ECMA-Script engine in QML, so it is kind of related to QScriptClass. But as long as we don't have access to the QML script engine, it probably is not possible to implement my idea.
  • QFile and QDir equivalent in QML

    4
    0 Votes
    4 Posts
    7k Views
    B
    Yes, maybe some sort of high level file access would be useful. What sort of access are you thinking about? Things like getting the file name and permissions for a file? (Also, if you have some concrete ideas in mind it might be useful to file a suggestion at bugreports.qt.nokia.com so that they can be considered for future API additions.)
  • "Chained" transitions?

    2
    0 Votes
    2 Posts
    2k Views
    G
    Here's another semi-working version: @import Qt 4.7 Flipable { id: flipper width: 360 height: 360 property int angle: 0 property bool frontShowing: true property bool waitingForTimer: false property string frontColor: "red" property string backColor: "green" Timer { id: timer interval: 2000; running: false; repeat: false onTriggered: { console.log("triggered") waitingForTimer = !waitingForTimer; } } Timer { id: timer2 interval: 200; running: true; repeat: true onTriggered: { console.log(flipper.state + " " + frontShowing + " " + waitingForTimer); } } front: Rectangle { anchors.fill: parent color: frontColor Text { anchors.centerIn: parent text: "front" } } back: Rectangle { anchors.fill: parent color: backColor Text { anchors.centerIn: parent text: "back" } } MouseArea { anchors.fill: parent onClicked: { timer.start(); frontShowing = !frontShowing; waitingForTimer = true; } } states: [ State { name: "displayingFront" when: frontShowing && !waitingForTimer PropertyChanges { target: timer; running: false } PropertyChanges { target: flipper; angle: 0 } PropertyChanges { target: flipper; frontColor: "red" } }, State { name: "switchingToBack" when: !frontShowing && waitingForTimer PropertyChanges { target: flipper; frontColor: "blue" } PropertyChanges { target: timer; running: true } }, State { name: "displayingBack" when: !frontShowing && !waitingForTimer PropertyChanges { target: timer; running: false } PropertyChanges { target: flipper; angle: 180 } PropertyChanges { target: flipper; backColor: "green" } }, State { name: "switchingToFront" when: frontShowing && waitingForTimer PropertyChanges { target: flipper; backColor: "blue" } PropertyChanges { target: timer; running: true } } ] transitions: [ Transition { from: "displayingFront"; to: "switchingToBack" ScriptAction { script: console.log("displayingFront -> switchingToBack"); } }, Transition { from: "switchingToBack"; to: "displayingBack" SequentialAnimation { ScriptAction { script: console.log("switchingToBack -> displayingBack"); } NumberAnimation { properties: "angle"; to: 180; duration: 800; } } }, Transition { from: "displayingBack"; to: "switchingToFront" ScriptAction { script: console.log("displayingBack -> switchingToFront"); } }, Transition { from: "switchingToFront"; to: "displayingFront" SequentialAnimation { ScriptAction { script: console.log("switchingToFront -> displayingFront"); } NumberAnimation { properties: "angle"; to: 0; duration: 800; } } } ] transform: Rotation { id: rotation origin.x: flipper.width / 2 origin.y: flipper.height / 2 axis.x: 0; axis.y: 1; axis.z: 0 angle: flipper.angle } }@
  • [solved] Playing with time

    3
    0 Votes
    3 Posts
    2k Views
    M
    Thanks a lot. That would be great if this information was on the doc.
  • Width of ListView is -1

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Cannot pass enum value as signal parameter from C++ to QML

    2
    0 Votes
    2 Posts
    3k Views
    M
    I have no idea if this works, but have you checked the "QDeclarativeEngine":http://doc.qt.nokia.com/4.7/qdeclarativeengine.html docs, especially "QML_DECLARE_TYPE":http://doc.qt.nokia.com/4.7/qdeclarativeengine.html#QML_DECLARE_TYPE Can that be to any help?
  • QML Testing with QTestLib [Edited title]

    5
    0 Votes
    5 Posts
    6k Views
    M
    Hi, If you have the Qt source, you can look in tests/auto/declarative to see how all the built-in QML elements are tested with QTestLib (hopefully the patterns there will be relevant to your case as well). Alternatively, there are experimental bindings of QTestLib for QML at http://qt.gitorious.org/qt-labs/qtest-qml (which enables you to write QML test cases in QML). Regards, Michael
  • Drop Queued keyboard and mouse events

    5
    0 Votes
    5 Posts
    4k Views
    G
    I would just introduce a boolean sentinel: Set it to true before you do your work. Check it in the slots connected to your UI elements. If it's true do nothing, if it's false start the workload. After your work is done reset it to false.
  • Building with a static map tiles plugin in QML (Qt Mobility)

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • C++ Plugin Creating component editable in QML Visual editor

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [solve] Can't make work gesture example

    4
    0 Votes
    4 Posts
    3k Views
    M
    I've seen this element, but i don't konw how can i get QtQuick 1.1. I'll try it thanks, but the second lnk gave by paulo work fine.