Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.9k Topics 76.8k Posts
  • Sending input events through an OpacityMask

    Solved
    5
    0 Votes
    5 Posts
    962 Views
    F

    Hi!
    The trick is not to set the interactive content to visible: false. Instead, you have to set opacity to 0. Then the content remains interactive and everything works as expected.

  • QAbstractListModel and QCustomPlot

    Unsolved
    16
    0 Votes
    16 Posts
    268 Views
    T

    @SGaist I made a seperate issue for this problem in the Qt forum:
    qtcreator-errors-with-qtgraphs-qml

    Tobias

  • Imx8mp qt5.15 Video playyback with gstreamer

    Unsolved
    2
    0 Votes
    2 Posts
    17 Views
    JoeCFDJ

    @Rosciio
    For 1, go to gstreamer website to find the bug report about this issue and get a workaround. You need to rebuild gsteamer for your OS.
    For 2, simply add qmlglsink in your layout to the sink of your pipeline. The example is here.
    https://github.com/GStreamer/gst-plugins-good/tree/master/tests/examples/qt

  • 0 Votes
    4 Posts
    45 Views
    jsulmJ

    @xava said in Help with VTK + Qt: DICOM Application Crashes After Scrolling First Slice:

    myVtkInteractorStyleImage::MoveSliceForward InteractorStyleSlices.h

    Check what you're doing in that line

  • qt5->qt6 Migration / Qml

    Unsolved
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • 0 Votes
    6 Posts
    94 Views
    JoeCFDJ

    @peter-thompson Better not to mix them. I mixed only one gstreamer qml sink in a widgets app. It is doable, but messy.

  • 0 Votes
    1 Posts
    33 Views
    No one has replied
  • Combobox dropdown text not showing

    Unsolved
    7
    0 Votes
    7 Posts
    292 Views
    T

    Did you try removing the qsTr() from around the strings? Might work that way.... I think I had something like this....

  • Translation of standard buttons in MessageDialog ?

    Unsolved
    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • QML WebView in iOS can not receive cookieAdded signal

    Unsolved
    4
    0 Votes
    4 Posts
    91 Views
    SGaistS

    Are you in the case described in the second note of the signal documentation ?

  • World coordinate system in quick 3d

    Unsolved
    1
    0 Votes
    1 Posts
    31 Views
    No one has replied
  • Rename buttons in FileDialog

    Unsolved
    2
    0 Votes
    2 Posts
    38 Views
    Gojir4G

    Hi @Mihaill, I would say with the acceptLabel property

    This property holds the label text shown on the button that accepts the dialog.

    When set to an empty string, the default label of the underlying platform is used. The default label is typically Open or Save depending on which fileMode the dialog is used in.

  • Setting a QML property to undefined via JavaScript

    Unsolved
    2
    0 Votes
    2 Posts
    49 Views
    B

    After poking around some more, I think the error message may be referring to the vert[i] object as being undefined, not the value I'm trying to feed it.

    But my vert object works otherwise, and I can change the color on it using similar syntax, so it should be valid. Also, when I do a typeof(vert[i]), I get something along the lines of Vertex_QMLTYPE_3(0x6000003b82a0)
    I get the same thing if I say console.log(vert[i]). That suggests to me that my object is valid.

    The verts are created dynamically, and they are created from the following .qml file, using these commands:
    var component = Qt.createComponent("Vertex.qml");
    var vertex = component.createObject(parent, {x: xPos, y: yPos, width: size, color:"yellow"});

    import QtQuick Rectangle { width: 8 height: 8 color: yellow property string tag: "" MouseArea { anchors.fill: parent drag.target: undefined drag.smoothed: false onReleased: { polyCanvas.requestPaint() } } }

    Please let me know if you've got something...
    bc

  • Add column header to TreeView

    Unsolved
    4
    1 Votes
    4 Posts
    451 Views
    C

    I think this is solved. GrecKo's suggestion is works well.

    you can start from the example 'QT Quick Controls - table of contents'.
    modify Main.qml like below

    Item{ // added component anchors.fill: parent HorizontalHeaderView { // added component id: horizontalHeader anchors.top: parent.top anchors.left: treeView.left syncView: treeView model: ["title", "content"] clip: true } TreeView { id: treeView //anchors.fill: parent // anchoring is modified anchors.top: horizontalHeader.bottom anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: 10 clip: true
  • 0 Votes
    3 Posts
    82 Views
    M

    @KH-219Design
    Thanks i will try that.

    I also saw that in another thread you mentioned, that its possible to write your own QtMessageHandler and filter qml warnings.
    https://forum.qt.io/topic/151653/is-there-any-way-to-suppress-qml-warnings

    I will try that too, but i guess there is nothing like this for compiler warnings.

  • Strategy for handling exceptions in property accessors

    Unsolved
    4
    0 Votes
    4 Posts
    154 Views
    SGaistS

    I was about to suggest adding an explicit decorator to the functions that "misbehave".

    I would however not decorate all properties blindly so it can also serve as documentation to avoid getting the same issues in the future.

  • QML app freezes for a bit after deactivating Loader3D

    Unsolved
    1
    0 Votes
    1 Posts
    48 Views
    No one has replied
  • QML TreeView

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    JonBJ

    @chapayev
    I know nothing about QML. Your code looks to me as though it handles expansion/contraction, and subitems? Are you saying this addresses the OP's question

    The representation requires that rows have to be displayed differently - for example some rows have a checkbox some dont.

    ?

  • 0 Votes
    4 Posts
    93 Views
    B

    @Pivit I tried your example but for now I have only this in my onCompleted:

    console.log("Lights List:", MyManager.lightsList) console.log("Lights List length:", MyManager.lightsList.length)

    and if I debug from the QML into the C++, I see that the correct manager object is called and that the lisghtsList is non-empty:

    Filled lights: 5 qml: Lights List: [QVariant(Light, ),QVariant(Light, ),QVariant(Light, ),QVariant(Light, ),QVariant(Light, )] qml: Lights List length: 5

    I think your issue is that you have not properly exposed Light to QML. For a simple struct-type class the easiest thing is to make it a Q_GADGET to expose the properties to QML:

    #include <QVariant> struct Light { private: Q_GADGET Q_PROPERTY(uint id MEMBER id) Q_PROPERTY(uint intensity MEMBER intensity) public: uint id; quint16 intensity; // ... same as your code }; Q_DECLARE_METATYPE(Light)

    I have only exposed the id and intensity members for now, but it is enough to try it out. I added an extra print in the onCompleted:

    console.log("Lights List first id:", MyManager.lightsList[0].id)

    The output is now:

    Filled lights: 5 qml: Lights List: [Light(0, 0),Light(1, 100),Light(2, 200),Light(3, 300),Light(4, 400)] qml: Lights List length: 5 qml: Lights List first id: 0
  • how to make water ripple (circles)

    Unsolved
    2
    0 Votes
    2 Posts
    53 Views
    S

    Here How You Can Do With Animation Method

    Rectangle { width: radius * 2 height: radius * 2 color: "rgba(255, 255, 255, 0.4)" radius: width / 2 anchors.centerIn: parent // Animation to expand the ripple NumberAnimation { target: parent property: "radius" from: 0 to: 100 duration: 1000 loops: Animation.Infinite easing.type: Easing.OutElastic } }