Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • DevDays 2010

    23
    0 Votes
    23 Posts
    12k Views
    A
    sure:)
  • [Solved] QdeclarativeImageprovider issues

    5
    0 Votes
    5 Posts
    7k Views
    Z
    Thanks, save me a lot of work! and remember to addImageProvider before loading QML source.
  • [bug] Component id cannot start with underscore

    3
    0 Votes
    3 Posts
    3k Views
    ?
    thanks Tobias, done "here":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3245 :)
  • Best practice for non UI multiplatform issues

    3
    0 Votes
    3 Posts
    3k Views
    M
    Thanks for the tips! Sounds like use of C++ Qt is the way to go.
  • (Solved) Transparent Windows

    10
    0 Votes
    10 Posts
    11k Views
    C
    Yes, I tried opengl, but I get white screen with only some of the interface being drawn. http://bugreports.qt.nokia.com/browse/QTBUG-15429?focusedCommentId=133846#comment-133846
  • Problem using mapFromItem()

    3
    0 Votes
    3 Posts
    5k Views
    B
    The problem is that in this code: @ Rectangle { y: mapFromItem(null, 0, 0).y } @ mapFromItem() is only called when the y position is initially set - i.e. when the item is created, before all the items in the scene are properly sized and laid out. There is nothing to notify the Rectangle when everything has been sized and the y property should be re-evaluated. What you could do is ensure the y is not set until the components are initialized: @ Rectangle { Component.onCompleted: y = mapFromItem(null, 10, 10).y } @ However the y is not updated if the window is resized. In this case the root item will have to notify the component to update the y (e.g. by adding a method in ComponentX that is called when the root item's height changes).
  • QML WebView keyboard focus

    6
    0 Votes
    6 Posts
    7k Views
    T
    Hi, Thanks for the tip. I didn't see the "code" icon. I did some more experimenting and it seems that key navigation is working as wanted when the Webview object is NOT part of the FocusScope. @ import Qt 4.7 import QtWebKit 1.0 FocusScope { width: 1280 height: 600 focus: true WebView { id: web_view1 x: 35 y: 20 width: 1280 height: 600 url: ”http://www.google.com” focus: true onActiveFocusChanged:{ console.log(“Focus = ”+ focus); } Keys.onPressed:{ console.log(“Key pressed”); } } } @
  • QML drawing

    2
    0 Votes
    2 Posts
    3k Views
    C
    Have a look at qmlcanvas: http://qt.gitorious.org/qt-labs/qmlcanvas
  • [SOLVED] Transitions between screens

    6
    0 Votes
    6 Posts
    9k Views
    B
    thanks to all. I got the picture.
  • Release - qtcore4.dll checksum error

    3
    0 Votes
    3 Posts
    4k Views
    C
    I've reported a bug here: http://bugreports.qt.nokia.com/browse/QTBUG-15500 And they say that if it's working (along with examples and demos) I should not worry about those Dependency Walker errors.
  • Strings in QML/QtQuick/Qt

    7
    0 Votes
    7 Posts
    6k Views
    M
    You could create a "model" class in c++ of your value that emits a signal when the value changes. Something like this for example: @ class PersonName : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) public: QString name() const { return m_name } public slots: void setName(const QString &name) { if (m_name != name) { m_name = name; emit nameChanged(); } } signals: void nameChanged(); private: QString m_name; } @ Create an instance in c++ and add it to the decl. context. Now you can both set the value in qml and get notifications when the value changes.
  • QML Code not running

    14
    0 Votes
    14 Posts
    7k Views
    S
    No no, not Qt Creator. The actual Qt. Usually it is located somewhere in c:\qt\4.7.0\qt\bin.
  • Qt Creator download out-of-date

    6
    0 Votes
    6 Posts
    5k Views
    Z
    The problem turned out to be the location of qmake.exe. There are two, Qt4.7.1\bin Qt4.7.1\qmake For my VS2008 environment I had to manually choose the one in \bin. I am using Creator (stand-alone, outside VS2008) and MinGW is not installed. After a few relaunches, everything started working and the Examples are auto-detected. Thanks
  • Qt::CursorShape + QML

    7
    0 Votes
    7 Posts
    8k Views
    K
    well that's no to so bad. you just need to register the type like other enums in QML are registered i've searched for it in declarative sources, and what i found is that you should use Q_ENUMS macro for registering enum type
  • Problems with setting volume for SoundEffect

    2
    0 Votes
    2 Posts
    2k Views
    M
    I had the same problem on osx 10.6.5 with qtmobility 1.1. I tried with mp3s and wavs, but I couldn't get it working. In the end my solution was to modify the audio files...
  • QML Viewer Installer

    9
    0 Votes
    9 Posts
    11k Views
    B
    Just install Qt SDK on the managers computer and run viewer. Maybe, you should add shortcut to viewer and hide other shortcuts :)
  • 0 Votes
    2 Posts
    2k Views
    B
    This is done by design. Any list item added to a ListModel is taken to be a "sub-list model". This allows any list within a list model to also be used as a model, which is useful for creating views for such sub-models. For example: @ import Qt 4.7 Rectangle { width: 200; height: 200 ListModel { id: model } ListView { model: model anchors.fill: parent delegate: Column { Repeater { model: outer Text { text: inner } } } } Component.onCompleted: { model.append({'outer': [ {'inner': 'aaa'}, {'inner': 'bbb'}]}) model.append({'outer': [ {'inner': 'ccc'}, {'inner': 'ddd'}]}) } } @ The inner view can use 'outer' as a list model in order to render the 'inner' values. However, the fact that a list like "[1,2,3]" can be added as an item is a bug. It should only allow lists of objects to be added. I've added a link to this post in the relevant bug report (http://bugreports.qt.nokia.com/browse/QTBUG-13640).
  • Casting signaled QObjects from C++ code

    7
    0 Votes
    7 Posts
    5k Views
    I
    Some days ago, I tried to write some codes like you. It does not work very well. I find that it's wrong in this way. if you call : qmlRegisterType<Object1>("com.test.object1", 1, 0, "Object1"); then you can use Object1 in qml file as Rectangle , Image, Text and so on, Object1 is only a type before you use it in qml. such as Object1{id:object_1} The following code, you write: Object1 *object1 = new Object1(); view.rootContext()->setContextProperty("myObject1",object1); works good, but if you call the method of object1, the method must be Q_INVOKABLE
  • Creating a dynamic tree like user interface with qml

    5
    0 Votes
    5 Posts
    5k Views
    B
    I need to be able to show the parent and child xml lists at the same time for a nice looking transition, but once the transition is over I will only need to show one list. Another challenge is that I need the last selected item the user saw when leaving a list to be remembered; so when the user returns to that list it will be as they left it. I am doing that by storing the indexes of each list's selected item in an associative array, and that seems to work. Denis, your approach sounds pretty interesting. I will have to use two list views, but I could do a round robin kind of thing for the two list views. And I would have to store a history (stack or have children store links to there parent xml file) so the user could navigate in both directions. Thanks for the ideas
  • Poor graphic performance in drag element

    4
    0 Votes
    4 Posts
    3k Views
    C
    thanks. I will see the setGraphicsSystem