Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • In win10 can't customization

    Solved
    4
    0 Votes
    4 Posts
    53 Views
    B
    @JKSH said in In win10 can't customization: Yes, the best way is via the import statement: import QtQuick.Controls.Basic -- this allows the Qt Quick Compiler to optimize your code. That optimization can't happen if you set the style at runtime. Thanks for this tip. I'll bear it in mind for later. I currently have my code running in both Qt 5.15 and 6.8 as I may or may not need to make the switch in the near future (out of my control unfortunately). The runtime selection is a pragmatic approach for me at the moment.
  • Map Touch Issue in Qt QML

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • In win 10 I get error with popup, but programm don't crash

    Solved
    4
    0 Votes
    4 Posts
    70 Views
    M
    I find error only with help analize code
  • Shadow around an Item

    Unsolved
    7
    0 Votes
    7 Posts
    99 Views
    A
    Solved via RectangularGlow from Qt5Compat.GraphicalEffects for now as MultiEffect is buggy and unusable now: RectangularGlow { anchors.fill: item glowRadius: 15 spread: 0.4 color: "#9B9B9B" cornerRadius: 12 /* item radius */ + glowRadius }
  • ChartView LineSeries and model data

    Unsolved
    2
    0 Votes
    2 Posts
    54 Views
    B
    Have you looked at HXYModelMapper/VXYModelMapper? I haven't used these yet myself but from what I understand, they should fit with your use case. There is a widgets example here https://doc.qt.io/qt-6/qtcharts-modeldata-example.html, which might be adaptable to QML.
  • Preferred line break for japanese translation in TS-file

    Unsolved
    4
    0 Votes
    4 Posts
    316 Views
    G
    What happens when you use ​? does it still break in another position? In that case you might want to combine it with ⁠ to prevent breaking in other places. Such as これは​⁠非常に長い文章です.
  • Cannot show the "Repeat days' buttons" when I run the "alarms" example on Windows 10

    Unsolved
    8
    0 Votes
    8 Posts
    245 Views
    R
    @Richard-L said in Cannot show the "Repeat days' buttons" when I run the "alarms" example on Windows 10: Sorry. But I tried this fix. It does not work. [image: aa2a914d-cfc4-4e76-a6ed-e7a436a5b665.png] Qt version is 6.9.1, Qt Creator version is 17.
  • QQuickFramebufferObject with external OpenGL in Qt6

    Unsolved qt6 fbo opengl
    7
    0 Votes
    7 Posts
    2k Views
    D
    I'm currently working on getting on of my older applications to work with PyQt6 on Wayland. The python-mpv library has classically used an X window ID for telling mpv where to render, but that obviously won't work on Wayland. There are several examples of using OpenGL rendering with python-mpv: https://github.com/trin94/qtquick-mpv The PySide6 example does work, but my entire application is written in PyQt6: https://gitlab.com/djsumdog/mediahug/ I've been playing around with the code trying to figure out what's happening. All the mpv output looks identical between the different API examples. Creating another window and commenting out the setSource/show for the quickview prevents it from crashing out. I guess there might be an issue with the PyQt6 bindings? I'd really rather not trade out everything in my code for PySide.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Display rotated -> qt/qml application not visible

    Solved
    4
    0 Votes
    4 Posts
    69 Views
    M
    Changes in /boot/config.txt solved this problem.
  • runtime error: module is not installed when using qt_add_qml_module()

    Unsolved
    2
    0 Votes
    2 Posts
    616 Views
    K
    For future readers: you need to set the extra module as static in order for it to link with the main executable. I don't know why this is. It's very hidden in the Qt guide qt_add_library(UiComponents STATIC) qt_add_qml_module(UiComponents URI "Muse.UiComponents" VERSION 1.0 NO_PLUGIN QML_FILES ....
  • Setting x11 Window properties

    Unsolved
    2
    0 Votes
    2 Posts
    44 Views
    jsulmJ
    @Berg You could check how KDE does that.
  • setContextProperty "TypeError: Cannot call method"

    Unsolved
    3
    0 Votes
    3 Posts
    57 Views
    H
    @SGaist simple code in main.cpp int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQuickStyle::setStyle("Basic"); QQmlApplicationEngine engine; QObject::connect( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); DataManager dataManager; engine.rootContext()->setContextProperty("dataManager", &dataManager); //DataManager* pDataManager = new DataManager; //engine.rootContext()->setContextProperty("dataManager", pDataManager); engine.loadFromModule("Project", "Main"); return app.exec(); }
  • S-Shaped Curve with PathCubic

    Unsolved
    1
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • QMLlint warning for ids

    Unsolved
    3
    0 Votes
    3 Posts
    81 Views
    JKSHJ
    You need required property int index in gridDelegate (see https://doc.qt.io/qt-6/qtquick-modelviewsdata-modelview.html#view-delegates ) deleteIndex is qualified (this is good), but index is unqualified (this is bad). Qualify index too: root.deleteIndex == gridDelegate.index (see https://doc.qt.io/qt-6/qmllint-warnings-and-errors-unqualified.html )
  • How to make the animation run as expected

    Unsolved
    2
    0 Votes
    2 Posts
    54 Views
    MarkkyboyM
    Please learn to format your code correctly. It makes things so much easier for those attempting to help you.
  • QML with VS Code - Builds but fails at runtime (Windows)

    Unsolved
    3
    0 Votes
    3 Posts
    118 Views
    C
    This is helpful thanks
  • Getting binding loop when checking mousearea.containsMouse on a drag operation

    Solved
    6
    0 Votes
    6 Posts
    984 Views
    E
    Unfortunately, the stackoverflow solution doesn't work if you're depending on mime settings or imageSource (or requires some more effort to make it work), but the delayed binding solution did work.
  • Qmllint Warnings for rootcontextproperty

    Unsolved
    2
    0 Votes
    2 Posts
    65 Views
    jeremy_kJ
    Hi, Please use the code (</>) tags. The general advice is to avoid context properties. Embedding C++ Objects into QML with Context Properties spells out a few reasons, including the one noted here. My preferred fix is to declare a property within the item, and then set it using an API such as QQmlComponent::createWithInitialProperties()
  • MouseArea and WebEngine: Qt6 Bug?

    Unsolved qml webengine mousearea
    3
    1 Votes
    3 Posts
    409 Views
    SGaistS
    @viliak hi and welcome to devnet, I think you should check and maybe create a ticket on the bug tracker since it's a pretty big change of behavior.