Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Custom QQuickItem -- accessing QML functions from c++

    7
    0 Votes
    7 Posts
    3k Views
    Q
    I got it to work by simply doing this: QObject*t=this; This essentially casts it and I can then pass t as the the object. Wise? It is working now and I can call the QML function in this way. There appears to be no other way to directly pass a custom class to invokeMethod. I agree that it shouldn't make a difference since my this class derives from QQuickItem which derives from QObject. I wonder what is going on?
  • [solved][TableView] Access of elements and data

    3
    0 Votes
    3 Posts
    1k Views
    Z
    Ok my bad, I didn't see that styleData.row :) Should be right now ;)
  • QML Nested Repeater

    6
    0 Votes
    6 Posts
    5k Views
    X
    just tried it in my program, when I try to run with more than 1 item as the delegate of a repeater I get an error "Cannot assign multiple values to a singular property" and "The program has unexpectedly finished." anyway did you change your model or is it working like that now? I always use the object notation for objects, like the JSON notation also that better to read I think. also tested it to be clear: @[foo:"bar"]@ that is a syntax error, even qt creator can't parse that, so how is your code even running.. very weird with your model :p so you have to use @{foo:"bar"}@ for objects (dictionaries)
  • Undostack (QAction and all QUndo* classes) in QtQuick application

    1
    0 Votes
    1 Posts
    546 Views
    No one has replied
  • [SOLVED] QQmlApplicationEngine/QQuickWindow slower than qmlscene

    3
    0 Votes
    3 Posts
    2k Views
    EddyE
    If you need no more help on this issue, please add [solved] to the topic so everyone can see that this problem is solved. You can do that by editing your first post.
  • Detect if delegate item inside ListView has been destroyed

    6
    0 Votes
    6 Posts
    3k Views
    X
    I don't know if this a bug, but it is a little weird. I use a ListView at that place because a Column or Row will generate all delegates directly or won't it? The ListView will dynamically load more item when scrolled further, so if the user never scrolls to the end the delegates don't need to be generated and the data not loaded..
  • QML program not working via remoteDesktop

    2
    0 Votes
    2 Posts
    1k Views
    B
    It does not even launch. No error message though. Looks like a display issue.
  • SVG Rendering and Source Size:

    15
    0 Votes
    15 Posts
    10k Views
    S
    Yes I thaught of that but so far I did not find anythingelse than the "recomputesmoothness" function and it modify the properties sourceSize.W&H and he width end eight propertie. so it is likely to engender loops... Modifiyng sourceSize.width automatically modify width :( Modifiyng sourceSize.height automatically modify height :( That is why I reset width and height to their original values in this function... But you are right, I will try to dig into onSourceSizeChanged....
  • Calling a C++ function inside a property subclass from QML

    13
    0 Votes
    13 Posts
    21k Views
    T
    When you use a construct like @m.fce().rulesStrength()@ you need to be careful about object ownership of the object returned by fce(). If this object has no explicit parent set or doesn't have explicit CppOwnership set, then QML will assume ownership and will destruct it when it is no longer referenced. You can check if it gets destructed by setting a breakpoint in the desctructor for example.
  • Creating a custom-drawn component

    3
    0 Votes
    3 Posts
    1k Views
    EddyE
    another one : "usage of dynamic graph":http://developer.nokia.com/community/wiki/QML_Performance_Meter This one seems more close to what you want. I haven't tested it though, but seems worth looking at. same remark here : it's based on Qt4's QDeclarativeView
  • Are there any free Qt Quick graph / charting components?

    3
    0 Votes
    3 Posts
    1k Views
    S
    Thanks Eddy. Exploring and waiting for more :-)
  • How do I loop video??

    2
    0 Votes
    2 Posts
    723 Views
    EddyE
    Maybe something like this: @ OnStopped : {position == duration ? Position =0 ;position = position Play() } @ Didn't test this though Hope this helps
  • How to get Screen Resolution in QML for Ubuntu Touch?

    2
    0 Votes
    2 Posts
    2k Views
    EddyE
    I think you will enjoy reading this "doc":http://qt-project.org/doc/qt-5/qml-qtquick-window-screen.html Happy coding
  • 0 Votes
    5 Posts
    12k Views
    L
    great answer, I am looking for it.
  • Grid layout spacing issue (Solved)

    6
    0 Votes
    6 Posts
    2k Views
    O
    Hey, i'm glad that it is solved. You can also set the color of the rectangle to "transparent", that will work too. Anyways, please add [solved] to the topic, thank you. Alex
  • What is a XMLListModel query. Could someone give me a clear understanding

    1
    0 Votes
    1 Posts
    554 Views
    No one has replied
  • Connect QObject properties to a QQmlComponent

    3
    0 Votes
    3 Posts
    1k Views
    0
    Nice, using the modelData property I managed to create a C++ function that gives me the data object for the modelData object (I'd thought there would be some other way though). Thank you, Jan
  • Date manipulations

    4
    0 Votes
    4 Posts
    949 Views
    F
    Ok it seems there is no official method to do it so I use : @ function dateDiffInDays(date1, date2) { var timeDiff = Math.abs(date2.getTime() - date1.getTime()); return Math.ceil(timeDiff / (1000 * 3600 * 24)); } @
  • Key Navigation in ListView Component -> Set Focus to ListView Element

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Overwrite internal properties

    2
    0 Votes
    2 Posts
    1k Views
    O
    Found the property component i was searching for in the MenuStyle.qml which is used by Menu which is used by ComboBox. I am using a ComboBox and i need to change or overwrite this property: @property Component menuItem: Rectangle{...}@ Is there any possibility for me to do that only for one ComboBox? I really dont want to replace multiple control-components and styles with custom ones...