Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Forbid FileDialog to choose directories

    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    That I can't say for sure. You should double check on the "android-development":http://lists.qt-project.org/mailman/listinfo/android-development mailing list
  • Crazy memory usage with TableView :(

    16
    0 Votes
    16 Posts
    7k Views
    J
    sohail. You would have to hack the source but that is actually pretty simple as it's just a matter of copying the contents of TableView.qml to a local project and directly fork it. You might get some warnings from the style construction, but that is all. For instance, you can go through all of the "styleData" properties and comment out all bindings except the "value" one just to experiment on it's impact. I did a quick test and I'm afraid it wont make all that much difference regardless. They really don't seem like the bottleneck. @gabriel Thats indeed interesting. Did Simon suggest any other ways of injecting the data or is the concept itself not fixable? Given how much we rely on these, it might make sense to modify the engine to be more accommodating for this scenario. Regarding columns, I was actually just playing around with the same concept by simply setting columns !visible based on scrolling but seems like you are way ahead on that already. That should at least prevent the loaders from running. If we could also find a way to prevent setting up the hidden styleData objects too, there would be a pretty significant improvement on memory use. Did you test the patch on the example above already?
  • Get pixel values of an image

    7
    0 Votes
    7 Posts
    3k Views
    p3c0P
    Well I'm not sure what Matrix Coodrinates of OpenCV you are referring but mouseX and mouseY properties definitely gives the exact coordinates respected to the Image's Width and Height on clicking.
  • Qml application with opencv

    8
    0 Votes
    8 Posts
    5k Views
    J
    Can you explain how we can wrap the opencv windwo with QtQuickItem?
  • Customized Qbutton

    7
    0 Votes
    7 Posts
    2k Views
    J
    Yes i did check the path its doesnt show the image
  • Clipping in a widget's paintEvent slows down the program

    3
    0 Votes
    3 Posts
    1k Views
    J
    I see my mistake, thank you. My idea is to draw just the rectangles, that changed their color. But how can I draw only a part of my widget? I found nothing with google, and the Documentation of QGraphicsView didn't help me. Did I miss something? I'm quite new to qt. Maybe someone has a usefull link or keywords that help me. Thanks in advance!
  • Render qml into canvas3d?

    6
    0 Votes
    6 Posts
    2k Views
    R
    What about setting layer.enabled on the element to turn it into a QSGTextureProvider and supporting QSGTexture in Canvas3D? All the QSG stuff lives on the render thread - is the issue that Canvas3D does not live on the render thread and so to use QSG it would need to serialize everything onto that thread? I'm hoping to eventually be able to use a VideoOutput with layer.enabled as a streaming video texture provider into Canvas3D.
  • [Solved]Auto-resize text based on parent component size

    3
    0 Votes
    3 Posts
    4k Views
    D
    The fontSizeMode (http://doc.qt.io/qt-5/qml-qtquick-text.html#fontSizeMode-prop) property of Text will do this for you. font.pixelSize will set the maximum size, and minimumPixel size the minimum (or font.pointSize, and minimumPointSize if you prefer. Then set the Text item dimensions: 'anchors.fill: parent' if you just want to fit to the parent, enable wrapping and eliding as you please and it will be taken care of.
  • [SOLVED]C++ class with QML

    5
    0 Votes
    5 Posts
    1k Views
    K
    If you choose to use a pointer do not forget to create the object. Even if that compiles you will get a crash because r does not point to a valid object. Even better use an automatic pointer to avoid memory leaks: @QScopedPointer<DetectSquares> r(new DetectSquares()); r->Draw();@
  • Button as exclusive group

    2
    0 Votes
    2 Posts
    643 Views
    p3c0P
    Hi, Trying to understand. What is ButtonRow ?
  • Flickable below an item still scrolling

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    Well since that semi transparent rect is your overlay you can define a MouseArea for it and then accept all the wheel events thus stopping it from propagating. @ Rectangle { anchors.fill: parent color: "#99000000" MouseArea { anchors.fill: parent onWheel: wheel.accepted = true } } @
  • Invert ListView without filling the ListView from the bottom

    2
    0 Votes
    2 Posts
    930 Views
    shavS
    Hm.... I think will be simple if you use invert model for ListView. For example if you have a model like (JSON): @ [ {"name":"Item1", ....}, {"name":"Item2", ....}, {"name":"Item3", ....} ] @ you need to crate another array with structure: @ [ {"name":"Item3", ....}, {"name":"Item2", ....}, {"name":"Item1", ....} ] @ And then use it in your ListView.
  • 0 Votes
    23 Posts
    24k Views
    O
    Oh thats sweet, i'll wait until the official release. Thanks for your information.
  • [SOLVED] How to make a division between pages in a PDF?

    4
    0 Votes
    4 Posts
    1k Views
    shavS
    Hi everyone! At last I've solved my problem with PDF. I'm using JavaScript to calculate top margin for every section which must start from new page.
  • Updating duration in Animation.Infinite loop using a slider

    2
    0 Votes
    2 Posts
    617 Views
    J
    The only way I have found a way around this is to stop and start the animation in a slider onValueChanged function, Unfortunately this also resets the animation to the beginning which I would prefer not to do. I'm new to Qt Quick. I'm sure there is a better way. Any help would be appreciated. Thanks
  • [SOLVED] ListView inside ListView (Scrolling issue)

    7
    0 Votes
    7 Posts
    4k Views
    M
    shav WOW!!!! SUPPER!!!! tnx a lot! this is solve my issue!!!
  • [RESOLVED] Access to json model from ListView delegate

    3
    0 Votes
    3 Posts
    2k Views
    G
    [quote author="chocis" date="1423762598"]Try using modelData.count instead of model.count[/quote] yes, thank you, it's working, thank you very much
  • Binding loop detected when parent height changed to childrenRect.height

    5
    0 Votes
    5 Posts
    4k Views
    C
    Thanks, that won't also work, because I want that the height is really 0, so that other dependent elements move accordingly. Example where visibility and opacity doesn't work: @Item { width: 400 height: 400 Component { id: dynamicRec Rectangle { border.color: "red" width: parent.width height: 20 } } Column { id: subOptionList property bool expanded: false // opacity: expanded ? 1 : 0 // visible: expanded ? true : false height: expanded ? childrenRect.height : 0 clip: true width: parent.width Component.onCompleted: { dynamicRec.createObject(subOptionList,{}); dynamicRec.createObject(subOptionList,{}); dynamicRec.createObject(subOptionList,{}); } } MouseArea { anchors.fill: parent onClicked: { subOptionList.expanded = !subOptionList.expanded } } Rectangle { anchors.top: subOptionList.bottom width: parent.width height: 40 color: "blue" } }@
  • [Solved] QML ListView delete element from Model

    6
    0 Votes
    6 Posts
    9k Views
    sierdzioS
    Great, you are welcome, and happy coding :-)
  • 0 Votes
    2 Posts
    1k Views
    F
    I choose a more simpel approach by skipping the qmlRgisterType() .. I create all instances in the c++ context and do .. MyClass class; QQmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("MyClass", &class); // Setup signals and slots.. /Fredrik