Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Draw ellipse in Qt5 (porting QPainter functionalities using QSG* classes)

    4
    0 Votes
    4 Posts
    2k Views
    X
    Well yes as far as I know the complete Qt scene graph is drawn with OpenGL, so the QSG files are just some interface classes for open GL in the end, to abstract open GL a little bit and reuse common stuff like line drawing etc. But if you really want to draw 1000 or even millions of the same object you should consider doing a native open GL approach if you care about the best performance, that can also be done with QQuickItem (without using any of the QSG* classes), you just need to override the "paint" method, there are some examples somewhere I think.
  • Audio new metadata

    1
    0 Votes
    1 Posts
    636 Views
    No one has replied
  • Canvases update: best practice and advices

    8
    0 Votes
    8 Posts
    5k Views
    D
    Thanks again for your time! I've been out of the office during the last few days. I'll take a look to your references asap. :) Cheers, F.
  • <Unknown File>: QML VisualDataModel: Error creating delegate

    3
    0 Votes
    3 Posts
    4k Views
    M
    I got the same error too, when using a ListView inside a ListView, Any updates?
  • Creating C++ objects in QML [solved]

    5
    0 Votes
    5 Posts
    1k Views
    T
    Done! Enjoy your Saturday!
  • QML Screen incorrect properties at application start up

    2
    0 Votes
    2 Posts
    761 Views
    EddyE
    The answers are in the "QML screen docs":http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick-window2-screen.html#details
  • Automatic enter after line finished

    2
    0 Votes
    2 Posts
    499 Views
    D
    using TextArea item
  • QtQuick2 : OpenGL Stencil issues

    3
    0 Votes
    3 Posts
    2k Views
    N
    Thanks for your reply,. I tried both of your solutions resetOpenGLState() in 5.2, and tried disabling GL_STENCIL_TEST at the end of paint, either of them did no help.
  • RSS Feed Display - not quite right!!

    2
    0 Votes
    2 Posts
    847 Views
    X
    Hi, is there a reason you came up with your own property and function for the current index? The ListView already has a property currentIndex and also a function incrementCurrentIndex(), maybe you missed it check the doc it might help you. :) About the timer I have no idea it should work like that, try and add some log messages if it really is the timer or the function it calls that doesn't work. I never used the XmlListModel but to reload the data you might just reset the model (set the source to "undefined" and than the URL string again), you have to unset it or it won't trigger a change event so just remove the model first. :D There might be a cleaner way but this isn't so bad I think. Edit: I just checked the doc, XmlListModel has a reload function what about that? :)
  • QML date and time manipulation

    4
    0 Votes
    4 Posts
    2k Views
    D
    thanks i try something like this : @ function getDistance(time1) // time1 another date which i make by gettoday() { return Math.round((gettoday()-time1)/(606024)); } function gettoday() { var nowdate = new Date(); return nowdate/1000; }@
  • How make rectangle cut from Image by ShaderEffect?

    1
    0 Votes
    1 Posts
    532 Views
    No one has replied
  • How break pop window of StackView?

    1
    0 Votes
    1 Posts
    516 Views
    No one has replied
  • Appling Color transformation in a QDeclarativeView

    1
    0 Votes
    1 Posts
    540 Views
    No one has replied
  • [Solved]QML dropdown list with images

    6
    0 Votes
    6 Posts
    8k Views
    G
    Thanks for all that works ! ;))
  • 0 Votes
    2 Posts
    852 Views
    C
    Hi, You're printing that out in a signal handler for a property change signal. That means that if two.f0 is initialized before two.listt and two.width then you are seeing expected behaviour. Remember, QML is declarative, so the order of property initialization is not defined by the order it appears in the code (that would be imperative, not declarative). You should wait until the Component.onCompleted signal is emitted - at that point, all of the property initializations are guaranteed to be complete. Cheers, Chris.
  • [solved] Flickable doesn't function in a Column

    7
    0 Votes
    7 Posts
    2k Views
    ?
    Glad I could help you.
  • [solved] Find a quick item by name

    3
    0 Votes
    3 Posts
    1k Views
    J
    Thanks
  • Get all the children form an element, even the "outerly added children"

    6
    0 Votes
    6 Posts
    1k Views
    X
    Maybe the Items added to the Button in you main.qml are not added to the button directly but to a new Item, I am not sure how QML works if you create objects from QML files but you might create a new derived Item and that is why the other Items are not found in your loop? so you can maybe try the parent of you button? try and use the QML debugger to see the item tree or print this to the console and see for yourself: @ console.log(parent.children.length, parent.parent.children.length) @ maybe you need to also use the parent.parent.children list?
  • Selective crop when using Transitions

    21
    0 Votes
    21 Posts
    5k Views
    M
    Meanwhile, I think the best I can do is simply to toggle the clip property to set it to false whilst the animation is in progress and then set true on completion. Its a bit flickery, but not bad. The "onRunningChanged:" is the crucial part, so thank you very much for all your help Xander84. @add: Transition { onRunningChanged: { list.clip = (running ? false : true); } NumberAnimation { properties: "x"; from: list.finalVrnOrigin.x; duration: 1000 } NumberAnimation { properties: "y"; from: list.finalVrnOrigin.y; duration: 1000 } NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 1000 } } addDisplaced: Transition { NumberAnimation { properties: "x,y"; duration: 1000 } } @
  • How to create and access database

    2
    0 Votes
    2 Posts
    669 Views
    EddyE
    Hi, I woiuld suggest to read "this model view tutorial":http://qt-project.org/doc/qt-5/modelview.html it has many links to usefull information Have a close look at QFileSystemModel