Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.8k Posts
  • [Closed] How to Convert a QVariant to a QList<MyTypedef>

    4
    0 Votes
    4 Posts
    4k Views
    T
    Thanks Andre and guziemic :) for replying to the question That helped. What I found that I had to @Q_DECLARE_METATYPE( QList<MyTypeDef> )@ otherwise compiler cries hoarse while converting to or from a QVariant object Thanks TheIlliterate
  • Text rendering

    7
    0 Votes
    7 Posts
    3k Views
    J
    I tried your changes and this is what I got: when I disabled double buffering nothing happend except scroll stopped running fluently setting smaller font actualy did it's job (maybe qml has to rescale it somehow, that's why it's buffering the whole text) Another fing that I found out is that when I have richt text, despite of small font the CPU usage is high. But there is still no straight answer to the problem.
  • 0 Votes
    2 Posts
    2k Views
    H
    It's okay I figured it out. On clicked i should put it like this, @ //Page1 pageStack.push(Qt.resolvedUrl("Page2.qml"), {itemUrl2:products2, itemTitle2:category1}) //set the properties in the bracket, linking to the name in the XmlListModel //Page2 Page { id: container2 property string itemUrl2: "" //set the property here property string itemTitle2: "" orientationLock: PageOrientation.LockPortrait FontLoader { id: fixedFont; source: "../fonts/CANON.ttf"} //---------------------------------xml---------------------------------------------- XmlListModel { id: products2 property string feedUrl: "" property bool loading: status == XmlListModel.Loading source: itemUrl2 //put the itemUrl2 here as source query: "/plist/dict/array/dict" XmlRole { name: "icon2"; query: "string[1]/string()" } XmlRole { name: "category2"; query: "string[2]/string()" } XmlRole { name: "products3"; query: "string[3]/string()" } } @ Found this from, http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-pagestack.html under Advanced Usage. Can use both of these ways for deep linking. @pageStack.push ([ { page: pageOne, properties: { one: 1 } }, { page: Qt.resolvedUrl("two.qml"), properties: { two: 2 }}, ]); //or this pageStack.push(Qt.resolvedUrl("foo.qml"), {foo: bar, foz: baz }); @
  • [Solved] Mulitple selection in ListView

    5
    0 Votes
    5 Posts
    3k Views
    R
    Thanx for the answers I am marking the thread solved but I still not sure how I would do mouse event handling on QML side without handling all of the mouse events that the list would have handled for me.
  • QML SoundEffect Element is too slow!

    6
    0 Votes
    6 Posts
    4k Views
    T
    LOT OF THANKS!!!!! what was my problem? Is the first time that I make a resource.qrc and when I add the prefix I don´t delete the address, now with only this: "/" it works fine!!! thanks!!!
  • Youtube videos in qml webview

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Camera problem

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    4 Posts
    3k Views
    H
    Thanks for the tips :)
  • What is the "cost" of using unnecessary imports on QML ?

    2
    0 Votes
    2 Posts
    1k Views
    C
    Generally it depends on which type of import it is (installed module vs located module vs components directory vs JavaScript resource). If it is an installed or located module, the cost can be quite high in some circumstances (plugin loading and calling into the type registration function). If it is a components directory with a qmldir listing file, or module without a plugin, the cost is somewhat lower (the import system will parse the qmldir file and enumerate the available typenames but shouldn't parse the QML documents or load the type until/unless they're used). If it is a components directory without a qmldir listing file, the cost should be nil unless you use one of the types specified. If the import is a JavaScript resource, the cost will be substantial, since the file is parsed and loaded, and then evaluated, at import time. Cheers, Chris.
  • Playing Video in QML

    5
    0 Votes
    5 Posts
    5k Views
    B
    QtRookie, did you ever get this to work? I am having trouble with the same code getting phonon to play the stream "v4l2://///dev/video2" (which it successfully displays in Qt) in QML
  • 0 Votes
    2 Posts
    2k Views
    H
    Got it figured out myself. All I have to do is set the condition like this : @ flickableDirection:Flickable.Horizontal || Flickable.VerticalFlick @ instead of @ flickableDirection:Flickable.HorizontalAndVerticalFlick @ So, either horizontal or vertical scrollbar will work when scroll. The flickable item can now be scrolled in a more organized manner rather than moving around. :)
  • 0 Votes
    2 Posts
    3k Views
    U
    You could create both models in your QML file and reference to the appropriate one via the id of the object in your property changes. You may also want to load models through a loader if you don't want too much models loaded at the same time.
  • 0 Votes
    4 Posts
    4k Views
    E
    Hi! I had the same problem, and your solution worked for me. I have a ListView showing thumbnails changing from time to time. I'm providing the images using a class inherited from QDeclarativeImageProvider. BUT when removing items from the list, this trick is not working any more for the items after the one removed. The items above the one removed are reloading their images properly, but not the others. Any suggestions? Help is appreciated
  • Change mousecursor from QML with setContextProperty and Qt::CursorShape

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • Navigate through QML ListView

    3
    0 Votes
    3 Posts
    2k Views
    ?
    Hi. Thank you for help, but that does not solve my problem. But that week I solved it with using positionViewAtIndex.
  • Mouse click Issue

    4
    0 Votes
    4 Posts
    3k Views
    A
    yes, i already tried the timer thing. thanks.
  • QML Video Element not detecting or reading stream from webcam

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Multithread for QML property binding

    6
    0 Votes
    6 Posts
    4k Views
    C
    Alternatively, provide a second Q_PROPERTY which is updated less frequently, and bind to it instead of the original property. I assume that you have control over the setter function of the original function? Modify it so that it also updates the new property value, every 100 updates or something (and then make sure you manually emit the change notification for the second property value in that case, too).
  • QML GPS

    11
    0 Votes
    11 Posts
    7k Views
    W
    Hi amccarth, I have put in below code inside the .pro file but it still cannot run. symbian:TARGET.CAPABILITY += NetworkServices Location CONFIG += mobility MOBILITY += location
  • 2D QML as texture of Quick3D Object

    6
    0 Votes
    6 Posts
    3k Views
    A
    What you are trying to do is not very easy and I do not know of any easy QML way to do it. You are trying to have 2D surface that respond to 2D input on 3D surface (cube in your example). To do that, you will need to transform the 3D coordinates of the mouse to 2D coordiantes and then use those 2D coordinates in some kind of update method. As I said, I am not aware of any easy non C++ method of doing so. So you might just have to get native ;)