Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.9k Topics 77.0k Posts
QtWS25 Last Chance
  • 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
    2k 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
    12k 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
  • QML TextInput element's validation

    3
    0 Votes
    3 Posts
    8k Views
    P
    Thanks a lot DigitalPioneer.. it worked..Thank you very much!!! :)
  • [SOLVED] Are you able to extend QML via C++ with MSVC2010 ?

    5
    0 Votes
    5 Posts
    2k Views
    P
    Bug it's only under MSVC. Solution: work with MinGW
  • ListView is (very) slow to move to current item

    20
    0 Votes
    20 Posts
    16k Views
    B
    Anybody has a suggestion? I have the same problem on my arm 300 mhz device... I also want to drop the scroll animation and just jump immediately to the next item.
  • When QML Loader is loading a file show a wait dialog

    11
    0 Votes
    11 Posts
    8k Views
    sierdzioS
    [quote author="bkamps" date="1339785531"]Too bad QtQuick doesn't offer some handy stuff to do something simple like showing a wait dialog... [/quote] Well, with QML still being relatively new, you will have to wait for it (pun very much intended :P). Right now QML consists mostly of the basic building blocks. You are free to take it anywhere, but you have to do the "taking" yourself. Or look into some material from other people, like the desktop components, etc. Over time number of available components and add-ons will grow (if there is enough interest in QML).
  • FontLoader: Load Entire Family Font Files

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Inserted Data not getting saved in DB.

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • "SQL logic error or missing database Error opening database"

    4
    0 Votes
    4 Posts
    3k Views
    S
    So it happens i was using the same path for both simulator and device, which is not correct. I can access the database with: @#ifdef Q_WS_SIMULATOR viewer.engine()->setOfflineStoragePath(<PATH>); #else QString privatePathQt(QApplication::applicationDirPath()); QString pathOfflineStorage(privatePathQt); pathOfflineStorage.append(QDir::separator()).append(<PATH>); pathOfflineStorage = QDir::toNativeSeparators(pathOfflineStorage); viewer.engine()->setOfflineStoragePath(pathOfflineStorage); #endif@ Now i can access it but i can't edit it permanently. I run it in the simulator, make some changes in a table and when i restart it the changes are not saved.
  • QtQuick 1.0 with opengl support?

    12
    0 Votes
    12 Posts
    5k Views
    L
    Haven't used the QmlApplicationViewer, so I don't know how to do that, sorry. I assume you would have to change the QmlApplicationViewer source code, where the declarative view is created. Just create a QGlWidget, and set it as the declarative view's viewport. You may also have to adjust its QGlFormat to something suitable for your device.
  • QGraphicsView & QML: single whole GUI item vs. many separate items

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] string endsWith in QML for url detection

    5
    0 Votes
    5 Posts
    5k Views
    A
    Well i gave that a try and works perfect thanks for your help
  • Home_Control_Demo for Qt Quick 2.0

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    R
    But i had seen that there are many APIs in QML that can be used in place of C++ . Somthing like Qt Mobility etc. etc.
  • Looping threw model items with marquee

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    T
    qmlEngine and QDeclarativeEngine::contextForObject returns NULL in class A constructor. I've done creating additional internal components in A::onCompleted - there i can get pointer to engine from qmlEngine function.