Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.9k Topics 77.1k Posts
  • QML-App crashes with VirtualKeyboard (InputPanel)

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    N
    I am having the same issue with qt 6.5.4 on linux... Any idea why this is happening?
  • qt5->qt6 Migration / Qml

    Unsolved
    2
    0 Votes
    2 Posts
    120 Views
    sierdzioS
    Do you get any warnings or errors printed? Have you tried running the app with debugger attached? Was your Qt 5 app using old QtQuick.Controls version 1 by any chance? (they have been removed, only controls version 2 are supported)
  • Translation of standard buttons in MessageDialog ?

    Unsolved
    2
    0 Votes
    2 Posts
    101 Views
    T
    Answering my own question -- well, I switched from using "MessageDialog" to instead using "Dialog" then used a footer of type DialogButtonBox, and finally could make translation happen by using "onOpened" -- below is partial of my Dialog... footer: DialogButtonBox { id: buttons font.pointSize: medButTextSize font.bold: stnButtonTextBold alignment: Qt.AlignRight | Qt.AlignBottom buttonLayout: Qt.WinLayout // puts 'Cancel' button on the right standardButtons: Dialog.Cancel | Dialog.Yes } onOpened: { buttons.standardButton(Dialog.Yes).text = qsTr("Yes"); buttons.standardButton(Dialog.Cancel).text = qsTr("Cancel"); }
  • Sending input events through an OpacityMask

    Solved
    5
    0 Votes
    5 Posts
    1k 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
    546 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
    90 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
  • Help with VTK + Qt: DICOM Application Crashes After Scrolling First Slice

    Unsolved
    4
    0 Votes
    4 Posts
    156 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
  • What is the best practice for passing data from C++ to QML?

    Solved
    6
    0 Votes
    6 Posts
    239 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.
  • Combobox dropdown text not showing

    Unsolved
    7
    0 Votes
    7 Posts
    411 Views
    T
    Did you try removing the qsTr() from around the strings? Might work that way.... I think I had something like this....
  • QML WebView in iOS can not receive cookieAdded signal

    Unsolved
    4
    0 Votes
    4 Posts
    156 Views
    SGaistS
    Are you in the case described in the second note of the signal documentation ?
  • Rename buttons in FileDialog

    Unsolved
    2
    0 Votes
    2 Posts
    89 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
    102 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
    519 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
  • Disable specific qml compiler warnings (f.e. [import]) or mark an area in .qml file

    Unsolved
    3
    0 Votes
    3 Posts
    130 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
    228 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
    76 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. ?
  • how to make water ripple (circles)

    Unsolved
    2
    0 Votes
    2 Posts
    89 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 } }
  • How to fix height and width of filedailog in qml.

    Unsolved
    4
    0 Votes
    4 Posts
    208 Views
    S
    You're right — my earlier response was focused on QFileDialog from Qt Widgets, but the OP is indeed asking about QML's FileDialog. If the OP needs full control over the size or wants to add a background overlay, the alternative would be to create a custom file browser UI in QML using FolderListModel, ListView, and other controls instead of relying on FileDialog. Thanks again for pointing this out!
  • import marble in qml qt

    Unsolved
    2
    0 Votes
    2 Posts
    188 Views
    R
    Step 1: Verify Marble Installation ls /usr/lib/qml/org/kde/marble Step 2: Check Where Marble Installed Its QML Module find /usr -type d -name "org.kde.marble" find /usr/local -type d -name "org.kde.marble" Step 3: Manually Add QML Import Path // Set additional import path for QML modules engine.addImportPath("/usr/local/lib/qml"); // Adjust if necessary in main.cpp Step 4: Verify Installed Marble Libraries ldd /usr/local/lib/libmarblewidget-qt5.so If any dependencies are "not found", you might need to add /usr/local/lib to your library path: sh Copy Edit export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH Step 5: Try Importing Again in QML import org.kde.marble 0.20 // Change version based on installed version