Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Qml and javascript files in resource (qrc), how to import js in qml ?

    11
    0 Votes
    11 Posts
    24k Views
    A
    Try to put ".js" in the alias like: <file alias="componentCreator.js">qml/CC/componentCreation.js</file>
  • Make TreeView flickable

    tree view flickable 5.5
    0
    0 Votes
    0 Posts
    678 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    X
    color: "transparent" works correctly for me in an ApplicationWindow on Linux.
  • [Request] TreeView C++ model to qml example

    treeview tree view example qml
    4
    0 Votes
    4 Posts
    7k Views
    p3c0P
    @Pheelbert Yes missed the mentioning of data() here. You're Welcome :-) Happy Coding.
  • Properties and signals

    2
    0 Votes
    2 Posts
    555 Views
    p3c0P
    Every signal has a corresponding signal handler by deafult in QML. What is your second question ?
  • [Solved] Flickable does not flick dynamically added children!

    qml qt quick
    5
    0 Votes
    5 Posts
    3k Views
    p3c0P
    @iMasoud You're Welcome :) It is documented here. Happy Coding ..
  • ScrollView Binding Loop

    2
    0 Votes
    2 Posts
    1k Views
    p3c0P
    @krobinson Try updating those properties by assignment i.e using = when height or width change signal handler.
  • has a relationship in QML

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    p3c0P
    Hi @Pradeep-Kumar Honestly I too had never thought of inheritance and relationship in QML but Ill try to explain. Accroding to your code: Adding One in Two and Three makes a has-a relationship between them i.e Two and Three contains (has i.e has a relationship) One. I think there is no inheritance in between them. Now in QML terms according to me inheritance would be something like this: One.qml Rectangle { width: 50 height: 50 color: "red" } Two.qml One { width: 200 height: 200 property string myProperty Text { anchors.centerIn: parent text: "Two" } } Now here Two extends One which means it extends the Rectangle plus has its own properties as well and also contains new element Text. If you run Two.qml you will see it will be of width and height 200 but it will have its color "red" which it inherited from One.qml. This means Two inherited the color property as well has have it own new properties.
  • 0 Votes
    2 Posts
    910 Views
    p3c0P
    @betty_crokker Why isn't there a TableViewHeaderDelegate widget that I can "inherit" and just modify the font? Or is there, and I just don't know where to look? There is no such way to do so. No such functionality provided yet. Is there an example somewhere showing how to get the UI for sorting to work? You can use the method described here. Basically it is a QML wrapper around QSortFilterProxyModel and works with ListModel.
  • Using QML TreeView in Qt5.5 alpha, how to create my own treemodel class?

    3
    0 Votes
    3 Posts
    1k Views
    P
    Same question, that I have. In QML, how do you create a model with children? ex of what i'd want (that doesn't work): model: ListModel { ListElement { name: "Parent" children: [ ListElement { name: "Child0" }, ListElement { name: "Child1" } ] } }
  • TreeView Shows my data not correctly. What is wrong?

    2
    0 Votes
    2 Posts
    523 Views
    p3c0P
    @Kofr You can't emit beginInsertRows and endInsertRows. They are not signals.
  • MouseEvents not delivering to internalMouseAreas QML 1.1 TouchScreen

    2
    0 Votes
    2 Posts
    663 Views
    p3c0P
    Hi @Sfatima, I don't know about Qt Quick 1.1 but in Qt Quick 2.0 and onwards you have propagateComposedEvents. Setting it allows the mouse events to propagate to other areas. BTW QtQuick 1.x is deprecated now.
  • This topic is deleted!

    Locked
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • Qbs Project : Box2D with QML

    box2d qml qbs
    3
    1 Votes
    3 Posts
    1k Views
    B
    @SGaist That's a good idea, I'll ask them. Thank you
  • Multiples Connections in QML

    json qml qtquick connections c++ qnetworkaccessm qnetworkreply
    2
    0 Votes
    2 Posts
    3k Views
    benlauB
    Not quite understand your question.. Generally speaking, Javascript application use a Promise object for deferred and asynchronous operation. For example , do something when two or more asynchronous operations completed (in any order). Qt do not bundle any Promise implementation by default. You could get a one from my github repo: benlau/quickpromise Example Promise { resolveWhen: Q.all([endpoint1. onReplyStatusChanged,endpoint2. onReplyStatusChanged]); onFulfilled: { // It will be triggered only if both of the endpoint emitted the signal controller.setData1(); controller.setData2(); } }
  • 1 Votes
    1 Posts
    1k Views
    No one has replied
  • How to Load Another Qml file?

    qt quick qml
    3
    0 Votes
    3 Posts
    7k Views
    I
    Hi @p3c0 , Thank you for your reply. It really was helpful.
  • Using aliases of modelfunctions

    qml alias property model
    1
    0 Votes
    1 Posts
    889 Views
    No one has replied
  • 0 Votes
    6 Posts
    9k Views
    K
    You did a complete rebuild as well? The run of qmake does not create an error code, but it does not introduce a moc statement into makefile. I guess you are using a shadow for compiling. Delete the whole shadow folder, rerun qmake once again and rebuild. If you think it imay be a bug related to Qt 5.5 you can check on JIRA.
  • [SOLVED] Memory leak using Canvas context2d.getImageData

    canvas memory leak
    2
    0 Votes
    2 Posts
    6k Views
    B
    Solved thank to the help of inz on IRC. I've added the line gc() just after the line canvas.imageData = ctx.getImageData(0, 0, canvas.width, canvas.height) // this causes a memory leak And the memleak disappeared. Seems like the automatic garbage collector didn't run often enough for my use case, so the call to gc() is necessary to force the garbage collection.