Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.1k Posts
  • Several ChartViews and animations.

    Unsolved
    1
    0 Votes
    1 Posts
    76 Views
    No one has replied
  • How to show a Page over ApplicationWindow header and footer with Qt 6.9?

    Unsolved
    1
    0 Votes
    1 Posts
    97 Views
    No one has replied
  • the Qt Quick emulation layer crashed. with import QtQuick.Controls【qt6.8.2 m1】

    Unsolved
    5
    0 Votes
    5 Posts
    257 Views
    JoeCFDJ
    @LeoJeams can you try to replace Window with ApplicationWindow? import QtQuick.Window for Window and import QtQuick.Controls for ApplicationWindow
  • 0 Votes
    6 Posts
    363 Views
    jeremy_kJ
    @peter-thompson said in What is the best practice for passing C++ data objects to QML that is contained in a QQuickWidget?: @jeremy_k said in What is the best practice for passing C++ data objects to QML that is contained in a QQuickWidget?: I had not noticed a warning against setting properties in root objects. That's the method I prefer, as it resembles what I would generally do if instantiating the component as a node of a larger QML tree. Properties of the root component can serve as documentation of inputs. Multiple property initialization functions such as QQmlComponent::setInitialProperties() might be more efficient. The warning I was referring to is mentioned in two places: Overview - QML and C++ Integration and Interacting with QML Objects from C++. It says: Warning: Although it is possible to access QML objects from C++ and manipulate them, it is not the recommended approach, except for testing and prototyping purposes. One of the strengths of QML and C++ integration is the ability to implement UIs in QML separate from the C++ logic and dataset backend, and this fails if the C++ side starts manipulating QML directly. Such an approach also makes changing the QML UI difficult without affecting its C++ counterpart. I think it may be specifically referring to navigating the QML object tree and setting properties/invoking methods on child objects. So it might not apply to working with the root object alone. That's my reading, and hence the subsequent surprise. I generally attempt to treat children of widget instances similarly. If there are a significant number of QQuickWidgets, consider instantiating an independent QQmlEngine, rather than relying on each widget to create its own. This is an interesting idea that I had not considered. How would this work? Would I still use QQuickWidgets to integrate the QML with the widgets visually/structurally, and just pass the already-created QQmlEngine instance that they should use? Exactly. The engine comes with a component cache, network access manager, and some additional configurable features that can be more efficient to reuse.
  • Talking avatar in QML

    Unsolved
    1
    0 Votes
    1 Posts
    85 Views
    No one has replied
  • Resizing delegates in a ListView

    Unsolved
    1
    0 Votes
    1 Posts
    73 Views
    No one has replied
  • Quickcontrols 2 StackView push without properties

    Unsolved
    2
    0 Votes
    2 Posts
    114 Views
    R
    I can do below with push for now and seems to be working, but I would like to have strong type checking nature of pushItem. stackView.push(item, undefined, StackView.Immediate);
  • QML TableView simple keyboard navigation

    Unsolved
    4
    0 Votes
    4 Posts
    184 Views
    jeremy_kJ
    I overlooked the portion of the request to separate the index change from the delegate. The current index can be pulled from the view's currentRow and currentColumn properties, or from the selection model. Eg view.selectionModel.currentIndex.row and view.selectionModel.currentIndex.column.
  • QML Singleton Exposes Empty QVariantList for Custom QVector Data

    Unsolved
    6
    0 Votes
    6 Posts
    240 Views
    JoeCFDJ
    @Pivit QStringListModel c++ model or QML ListModel is needed for the model in listview. If QStringListModel is applied, define a C++ class to inherit QStringListModel and make it accessible to qml.
  • How to change camera or capture resolution in Qt6 ?

    Unsolved
    2
    0 Votes
    2 Posts
    122 Views
    jsulmJ
    @LZHD For video recording there is https://doc.qt.io/qt-6/qml-qtmultimedia-mediarecorder.html which has https://doc.qt.io/qt-6/qml-qtmultimedia-mediarecorder.html#videoResolution-prop Also see https://doc.qt.io/qt-6/qml-qtmultimedia-capturesession.html
  • World coordinate system in quick 3d

    Unsolved
    2
    0 Votes
    2 Posts
    143 Views
    J
    Hi. The default dimensions of built-in shapes are around the 100x100x100 size, see https://doc-snapshots.qt.io/qt6-dev/qml-qtquick3d-model.html#mesh-format-and-built-in-primitives . Most properties in QQ3D are built around these dimension being the "unit size".
  • Flickable inside SwipeView has different behaviour for left and right bounds

    Unsolved
    1
    0 Votes
    1 Posts
    79 Views
    No one has replied
  • 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
    138 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
    119 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
    621 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
    105 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
    184 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
    282 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.