Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • [SOLVED] Create qml object in C++ setting a parent

    6
    0 Votes
    6 Posts
    4k Views
    A
    Sorry...i forgot it!
  • QML - extending an existing item

    8
    0 Votes
    8 Posts
    3k Views
    P
    Well, does anybody have a working files, that really works, could anybody leave working example here? ... documentation is quite mean on that...
  • Is it possible to modify header/footer of ListView.???

    10
    0 Votes
    10 Posts
    8k Views
    B
    First I thought it is possible but it seems that header or footer element id is not recognized properly. Here's the modified code that worked for me. Main point is using a universal scoped variable @import QtQuick 1.1 import com.nokia.symbian 1.1 Page { property string buttonText : "OK" ListView { id: list_view1 anchors.fill: parent delegate: Item { x: 5 height: 40 Row { id: row1 spacing: 10 Rectangle { width: 40 height: 40 color: colorCode } Text { text: name anchors.verticalCenter: parent.verticalCenter font.bold: true color: "white" } Button { id: button1 x: 272 y: 0 text: "Button" onClicked : buttonText = model.name } } } model: ListModel { ListElement { name: "Grey" colorCode: "grey" } ListElement { name: "Red" colorCode: "red" } } header: ToolButton { id : button text: buttonText } Button { id: button1x x: 272 y: 0 text: "Button" onClicked: buttonText = "It works" } } } @
  • QTouchEvent::TouchPoint pressure information

    7
    0 Votes
    7 Posts
    4k Views
    A
    Implement a custom declarative item, reimplement event() and handle the touch events. This item can then have some signals to indicate a touch event has occured and a number of properties that provide the touch point data (position, etc.). This is exactly what QQuickMultiPointTouchArea (the implementation of MultiPointTouchArea) does in Qt 5. Alternatively, if a custom item is not desired, you could still install an event filter on the declarative view and expose the events/data to QML via a QObject.
  • [QTBUG-25999] QDeclarativeView bug...

    6
    0 Votes
    6 Posts
    3k Views
    P
    I have pushed it as a bug [QTBUG 25999]...
  • Getting current location on Symbian^3 (Anna, Belle) devices

    4
    0 Votes
    4 Posts
    3k Views
    C
    Hi all, Search for some posts - there is a specific bug in PositionSource which causes your device to look for GPS data and hanging up on it if no GPS signal is received (hence you see GPS icon). This means outside your code will work fine, but PositionSource won't automatically look for non-GPS sources... Best workaround is to go with Qt C++ and write custom nonGPS PositionSource. Problem will be again if you rely on GPS more - to code something to manage "blending" different sources...
  • 0 Votes
    3 Posts
    7k Views
    K
    Hi Chris, Thank you too much because of your reply. I did solve this typing: @ children:[ Text{ id:textDate anchors.centerIn: parent }, CommonHeader{ searchActive: false section: qsTr("MI CIUDAD") z:100 } ] @ instance of doing by default property. I don't know why it solved the problem. But I understood that you told me almost everything. I'm not sure from where it is accessing to the component. But doing explicit code, it doesn't happen. Best, Fernando.
  • Does Qt Quick Components are also suitable for embedded linux ?

    5
    0 Votes
    5 Posts
    3k Views
    C
    You probably want to use http://qt.gitorious.org/qt-components/desktop on desktop.
  • Transform slow?

    7
    0 Votes
    7 Posts
    2k Views
    C
    I'm not 100% certain, but I seem to recall someone saying that transform with QGV is much slower than with scenegraph rendering (ie, Qt 4.8 will be slower than Qt 5.0, in that QtQuick 1.1 will be slower than QtQuick 2.0, for transform operations) - although I can't remember why, now. Perhaps scenegraph allows partial-update and thus only the transformed element needs to be redrawn? Not sure.
  • [solved] QDeclarativeItem geometry

    6
    0 Votes
    6 Posts
    3k Views
    D
    Nope :) then you can put [solved] in in the title of the post :)
  • Image Gallery like bottom image gallery in android.

    5
    0 Votes
    5 Posts
    3k Views
    M
    Ravinder, What functionality do you want beyond scrolling?? If you look at the QML Flickr example in the QtSDK, you can take the flickable/scrollable GridView and make it one column horizontal. Or as minimoog77 suggests use a horizontal ListView and then add animation or transitions to get the functionality you want. http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html The Animation and Transitions section under QML Elements may help you find what you are thinking of: http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeelements.html
  • [solved] QDeclarativeItem does not repaint even when I call update()

    6
    0 Votes
    6 Posts
    4k Views
    X
    Hi, ok problem solved. The loops: Animation.Infinite caused the problem. I needed to change it to loops: 1 (which means I can leave it out because this is it's default value). After that onCompleted gets called when it should.
  • How to reload GridView

    5
    0 Votes
    5 Posts
    5k Views
    A
    I also think this is the preferred way
  • How to terminate or destroy WorkerScript?

    6
    0 Votes
    6 Posts
    3k Views
    B
    As far as I know, Workerscript processes the instruction in a separate thread. There's very little way to control that separate thread. Instead of trying to destroy it, you might wanna try to stop it, but in that case, the stop instruction will be queued I suppose.. Main tactic will be to design it in such a way that the separate thread doesn't affect the app even if listView instance gets destroyed
  • WebView is not available in STATIC COMPILE

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Problems with QML with OpenGL view

    5
    0 Votes
    5 Posts
    5k Views
    C
    Hi ultramanjones, It's not something I've tried to do. But, with your example: @ import QtQuick 1.0 import MDEPlugins 1.0 MDE{ width:200 height:200 } @ Just add some Q_INVOKABLE functions to it, if you want to call those functions from QML. Why can you not access the MDE object from C++? Alternatively, from C++, just qobject_cast (actually, there may be a qgraphics_cast or similar, for graphics-view based stuff, I can't remember) the pointer returned by view.rootObject() as an MDE and access it that way. Or am I misunderstanding what you're trying to do? In general, if you have an Item in QML, you can pass it back to C++ as an argument. Just give it an id, and then pass that id as a QObject* argument to a Q_INVOKABLE function of a helper item. eg: @ // assume that I have a QDeclarativeItem-derived class called // Helper which is installed into the Helper 1.0 namespace // where that class has a Q_INVOKABLE void doStuffWithObject(QObject* arg) { /whatever/ } function import Helper 1.0 Item { id: root MDE { id: mde width: 200; height: 200 } Helper { id: helper } Component.onCompleted: { helper.doStuffWithObject(mde); } } @
  • XmlListmodel with complex XML

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Qt5 control, shift, all modifiers not working with mouse

    2
    0 Votes
    2 Posts
    2k Views
    sierdzioS
    Works for key events. But I confirm, there are problems with mouse, at least I had some with wheel events.
  • Speed up loading of QML

    9
    0 Votes
    9 Posts
    11k Views
    C
    In QtQuick 2.0, if you set asynchronous to true, loading/compilation will occur on a separate thread, and cooperative instantiation (on the main thread) will be used to instantiate it. Thus, while you won't be guaranteed that there won't be glitches in the animation (since the OS scheduling during loading/compilation might lead to skipped animation updates on a single-core system, and during instantiation the incubator only yields on element boundaries which may also lead to skipped frames) for most use-cases (especially if you're careful with your component design) you should see velvet animations. But you're right - in QtQuick 1.0, everything is done in the main thread, so loading a QML file will block the animation updates.
  • Qml video wmfengine trouble

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied