Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Getting data into QML ChartView with Repeater

    Unsolved
    2
    0 Votes
    2 Posts
    269 Views
    B
    Nevermind, I implemented my own QQuickItem which uses the QML scene graph, following this example: https://doc.qt.io/qt-5/qtquick-scenegraph-customgeometry-example.html
  • On ubuntu,QML SystemTrayIcon set visible value false, icon no hidden

    Unsolved
    3
    0 Votes
    3 Posts
    218 Views
    G
    Hi, On Qt 5.15.9 version,Ubuntu 22.04 , GNOME Desktop Manager. SystemTrayIcon{ id: sysTray visible: systemTrayMode iconSource: "../image/logo.png" menu: Menu { MenuItem { text: qsTr("Show Application") onTriggered: { mainwindow.show() mainwindow.raise() mainwindow.requestActivate() } } MenuSeparator{ } MenuItem { text: qsTr("Quit") onTriggered: Qt.quit() } } onActivated: { if(Qt.platform.os !== "osx"){ mainwindow.show() mainwindow.raise() mainwindow.requestActivate() } } onMessageClicked: { mainwindow.show() mainwindow.raise() mainwindow.requestActivate() } Component.onCompleted: { } } Connections{ target: AppSettings function onHasSystemTrayIconChanged() { if (systemTrayMode) { sysTray.show() } else { sysTray.hide() } } } After sysTray is displayed, no matter how the systemTrayMode changes, sysTray will not hide.
  • `QML_IMPORT_PATH` has no effect

    Unsolved
    8
    1 Votes
    8 Posts
    2k Views
    ekkescornerE
    Yep. Create a .pro and open from QtC
  • Curved rectangle fill animation

    Unsolved
    2
    0 Votes
    2 Posts
    157 Views
    No one has replied
  • Missing QQmlApplicationEngine

    Solved
    2
    0 Votes
    2 Posts
    154 Views
    SGaistS
    Hi and welcome to devnet, You shouldn't need to add the module to your include. Are you sure your project is properly setup ?
  • Exposing already defined enum to QML

    Unsolved
    7
    0 Votes
    7 Posts
    714 Views
    GrecKoG
    @TomZ said in Exposing already defined enum to QML: enums are always a mess, basically the general idea to have a clean namespace with enums doesn't work with QML. It does work fine with namespaces. Q_ENUM needs to be made in the scope where the enum was defined though, it doesn't work with an already defined enum. And this requirement exists for both object/gadgets and namespaces. The code you linked would have been fine with a namespace. Also don't use qmlRegister*** in Qt 6, QML_*** are preferred.
  • Dynamic QML for each item of list view

    Unsolved
    5
    0 Votes
    5 Posts
    556 Views
    dheerendraD
    Your connect is executed multiple time. Hence it is executed multiple time. If you do 10 time, it will execute 10 times as well :). I'm not sure what is the semantics of the connect here ? What is deviceList ? Where is the method qFanPropsUpdate(). Since you are disconnecting it perfectly ok. Component.onCompleted: { deviceList.forwardDevicePropertyChanged.connect(qtFanPropsUpdate) }
  • 0 Votes
    10 Posts
    1k Views
    B
    @JonB It appears the problem was in my testing after updating the latest code here (Also it was always 10,000 data points, I wrongly wrote it as 1000.. I over-worked this issue. I will mak an edit. ). CPU usage has come down to 18% from 60%. I had done following things- Moved LineSeries update to backend LineSeres clear + append is replaced with replace Qt is upgraded to 6.8.0 I am not sure which one out of this helped but results look better now. Thank you so much everyone who spent their efforts to read my long question and provide amazing ideas. Appreciate it.
  • QMLLS not finding manual C++ registrations

    Solved qml qmlls cpp registration class
    4
    0 Votes
    4 Posts
    639 Views
    ekkescornerE
    instead of setContextProperty() you should use QML_SINGLETON see: https://t1p.de/ekkeQML_SINGLETON
  • How to Run a batch file from inside a QML file.

    Unsolved
    6
    0 Votes
    6 Posts
    469 Views
    M
    @JoeCFD Hi, Thank you, I will try using QProcess.
  • QML assert_imports created by QT Design Studio is not installed in QT Creator

    Unsolved
    3
    0 Votes
    3 Posts
    352 Views
    C
    I solved it in other way. I create a QML project by qt design studio rather than qt creator frist. Then, I added some 3D assets in the project by qds. After that, I used qt creator opened this project and those 3D assets were represented successfully. By the way, if you want to create a QML project by qt design studio, you need click File -> Export Project -> Enable Automate Generation after build a qds project, and then you will find a qml project organized by cmake file.
  • importing QtQuick.Dialogs gives many ambiguous type warnings

    Unsolved
    2
    2 Votes
    2 Posts
    406 Views
    C
    Some additional info or more like a warning. This crashes the qml language server and if the server is not running, every ctrl+click on your own qml files opens them from the build folder instead of the source folder. And then you basically edit a temp file.
  • ChartView with multiple selectable LineSeries

    Unsolved
    2
    0 Votes
    2 Posts
    419 Views
    T
    Hello, Sorry I could not answer your question! But btw, I new to PySide and QML, could you share me how to visible LineSeries to the chart, when I set 'useOpenGL: true', it could not render to GUI. Could you share me your code above?
  • Qt Quick default window, using the mouse to stretch the window size with black borders

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    johngodJ
    Just check my qml apps in windows 11, they do the same black borders, but also other programs like chrome do the same. Maybe it's a OS limitation / bug. Personally I dont think it's a big issue
  • QML Text's render error

    Unsolved
    5
    0 Votes
    5 Posts
    528 Views
    GrecKoG
    Are you graphics drivers up to date?
  • Get filename of OneDrive file from Android

    Unsolved
    1
    0 Votes
    1 Posts
    135 Views
    No one has replied
  • Why did "useOpenGL" not work?

    Unsolved
    2
    0 Votes
    2 Posts
    372 Views
    T
    I'm getting the same issue. Have you solved this problem yet? If true, could you share me how to fix it? Thanks!
  • Accessing properties of 2D QML object in a 3DView via C++

    Unsolved
    1
    0 Votes
    1 Posts
    130 Views
    No one has replied
  • Please help me with states in Qt Design Studio

    Unsolved
    1
    0 Votes
    1 Posts
    175 Views
    No one has replied
  • Enter key on Android Keyboard

    Solved
    3
    1 Votes
    3 Posts
    507 Views
    M
    Cool. Is that new in Qt6.8? So that will change the button to a search button. How will I get the event from the button press? In Qt6.6.3 I tried using Keys.onReleased and then check for the Qt.Key_Return event. That does work on Linux, but not on Android.