Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Qt Designer - QML file creation

    6
    0 Votes
    6 Posts
    3k Views
    cmessineoC
    Thanks for answering my question. I also found template files that can be updated in QtCreator/share/qtcreator/templates/qtquickapp/qml/
  • [SOLVED] Qt Quick Components for Symbian via SmartInstaller

    4
    0 Votes
    4 Posts
    7k Views
    W
    hi thanks but it's still unclear for me : I have those depencies in ${package}_template.pkg but not ${package}_installer.pkg @ grep -i components *.pkg redak_installer.pkg:; Dependency to Symbian Qt Quick components redak_installer.pkg:; Default dependency to Qt Quick Components for Symbian library redak_stub.pkg:; Dependency to Symbian Qt Quick components redak_stub.pkg:; Default dependency to Qt Quick Components for Symbian library redak_template.pkg:; Dependency to Symbian Qt Quick components redak_template.pkg:(0x200346DE), 1, 0, 0, {"Qt Quick components"} redak_template.pkg:; Default dependency to Qt Quick Components for Symbian library redak_template.pkg:(0x200346DE), 1, 1, 0, {"Qt Quick components for Symbian"} @ More infos : https://bugreports.qt-project.org/browse/QTCREATORBUG-6338 https://bugreports.qt-project.org/browse/QTSDK-1283?focusedCommentId=180330#comment-180330 -- http:/rzr.online.fr/q/symbian
  • [solved] I have an idea to develop particles in qml

    7
    0 Votes
    7 Posts
    2k Views
    C
    OK... thanks
  • [Solved] Best practices to hide context menus?

    4
    0 Votes
    4 Posts
    4k Views
    D
    Have you tried explicitly setting accepted to false? I don't know if that would work, but logically it should... Glad you got it figured out, though. :) I know the feeling; I spent hours trying to figure out how I could make a scrolling ListView not show list items that have scrolled outside of the view, and finally found that wonderful clip property. Pfft. :)
  • Problem in detection of special keys...

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    Probably you need to use OS-specific APIs... or test with Qt5 - there might have been a change there (definitely was for mouse buttons).
  • QML Timer is blocked?

    4
    0 Votes
    4 Posts
    4k Views
    M
    Hi, The issue in this case is that Loader loads the QML on the main thread (effectively blocking it), which the Timer is also running on. This has been addressed in QtQuick 2.0 via the asynchronous property added to Loader (which allows animations to run while the loading happens). Regards, Michael
  • Qtonpi + qtnetwork + phonon + qtquick

    2
    0 Votes
    2 Posts
    2k Views
    T
    Of course. You should to talk about it in QtonPI group.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • QDeclarativeDebugtrace API documentation

    1
    0 Votes
    1 Posts
    819 Views
    No one has replied
  • Problems with QML internationalisation on Windows CE with Qt 4.8.2

    2
    0 Votes
    2 Posts
    2k Views
    L
    Solved this myself. The problem was that I had defined QT_NO_CODECS and QT_NO_TEXTCODEC when configuring Qt. If I remove these definitions, things work as expected (except for a bug which I have reported as "QTBUG-26193":https://bugreports.qt-project.org/browse/QTBUG-26193).
  • Passing values from C++ to QML...

    12
    0 Votes
    12 Posts
    9k Views
    D
    I think these properties screenHeight and screenWidth need to go away. They make no sense; they seem to be copies of width and height. Looking at your code there, this is the only code I see that actually seems useful: @ Rectangle { id: root Rectangle { //Whatever actually goes in this thing } } @ From the C++, you can just set the root object to resize to the view like I showed earlier, do a viewer.showFullScreen() and be happy. :) Oh, and stop using Component.onCompleted() to tell you what the sizes of things are. QML doesn't work that way -- components are completed, but after that changes continue propagating through until everything is set up the way it's supposed to be. Rendering a QML GUI is a multistep process that happens behind the scenes, don't expect onCompleted to have the final values of things. It will have the initial placeholders (most likely 0) that are used until everything is created and real values can be calculated. Of course, my response is naive because I don't know what you're actually trying to put on the screen. If I had some idea of what you want your window to look like, I could give much more useful responses.
  • Proxy models - mapping a table model to a tree model

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QsTr() and non-ASCII characters

    5
    0 Votes
    5 Posts
    4k Views
    L
    QML file is UTF-8, C++ files are Latin-1. Filed a bug report for this as "QTBUG-26193":https://bugreports.qt-project.org/browse/QTBUG-26193.
  • [SOLVED] parseInt problem...

    5
    0 Votes
    5 Posts
    4k Views
    A
    yes, it was my mistake that i didn't checked the details. by specifying "radix", one can force parseInt for conversion...
  • Custom mesh, but QQuickShaderEffectMesh is defined private

    4
    0 Votes
    4 Posts
    2k Views
    M
    Yes, as far as I know GridMesh only defines a resolution, and is meant to be used with a custom vertex shader.
  • How to send Qt signals with non basic types to a QML script

    4
    0 Votes
    4 Posts
    3k Views
    M
    You know that instead of adding new clas you could use QPointF: @ //.h file class Map : public QObject { Q_OBJECT Q_PROPERTY(QPointF center READ getCenter NOTIFY centerChanged) public: explicit Map(QObject *parent = 0); inline QPointF getCenter() const; void setCenter(const QPointF& aCenter); signals: void centerChanged(); public slots: void blabla(); private: QPointF m_center; }; QPointF Map::getCenter() const { return m_center; } //.cpp file void Map::setCenter(const QPointF &aCenter) { if (aCenter == m_center) return; m_center = aCenter; emit centerChanged(); } //Part of qml file Connections { target: myMap onCenterChanged: { myTxt.text = "x " + myMap.center.x + " y " + myMap.center.y } } @ If you want to use longitude and latitude keywords you can do: @ //.h file Q_PROPERTY(QVariant center READ getCenter NOTIFY centerChanged) //... QVariant getCenter() const; //.cpp file QVariant Map::getCenter() const { QMap<QString, QVariant> centerMap; centerMap.insert("longitude",m_center.x()); centerMap.insert("latitude",m_center.y()); return centerMap; } //.qml file Connections { target: myMap onCenterChanged: { myTxt.text = "x " + myMap.center.longitude + " y " + myMap.center.latitude } } @
  • Switch case problem

    6
    0 Votes
    6 Posts
    13k Views
    M
    Hi, This problem was mentioned in "this":http://qt-project.org/forums/viewthread/9897/ post
  • XMLListModel & [CDATA]

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, The CDATA wrapper itself should be automatically removed by XmlListModel (i.e. the beginning <![CDATA[ and ending ]]> should be stripped off). The link at the beginning is part of the body of the CDATA, so if you want to remove it you'll need to do so via string manipulation (e.g. rssDescription.substr(rssDescription.indexOf("<p>")) ). Regards, Michael
  • [QtQuick - QML] Dynamic curves

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, QtQuick 2.0 introduces a Canvas element that might be useful for this. Another option might be creating a custom item for drawing the curve (there are no built-in curve drawing items, besides the newly added Canvas). Regards, Michael
  • Replace dont work within JS/QML

    2
    0 Votes
    2 Posts
    5k Views
    M
    Hi, You should be able to get this working by changing the first line to: @var str = url.toString()@ Regards, Michael