Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.7k Posts
  • TableView struggles

    Unsolved
    4
    0 Votes
    4 Posts
    200 Views
    G
    Someone pointed me to the TableViewDelegate; I switched to that since it comes with the functionality that I need.
  • Open CV for QT 5.6.0 on Embedded Linux

    Unsolved
    2
    0 Votes
    2 Posts
    20 Views
    SGaistS
    Hi, What kind of example do you have in mind ? How to use OpenCV ? How to grab an image with Qt and apply OpenCV operations on it ?
  • TableView: the highlight of the selected row is displayed only after scrolling

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • QLineSeries

    Unsolved
    3
    0 Votes
    3 Posts
    26 Views
    Y
    im using Qt Charts , you think i can find a way with Qt Graphs ?
  • Copy objects -> copy gets slower

    Solved
    5
    0 Votes
    5 Posts
    60 Views
    M
    Thanks for your answer. In meanwhile I was able to solve this problem. I think it was related to the singleton. The QtObject blub was in a singleton-qml-module. Now I moved this QtObject to the main-qml-module. Now the copy is much faster and it does not get slower.
  • TableView: ReferenceError: styleData is not defined

    Solved
    5
    0 Votes
    5 Posts
    65 Views
    W
    @Bob64 Thanks for the detailed reply!
  • Error while trying to use svg image

    Unsolved
    3
    0 Votes
    3 Posts
    144 Views
    R
    Why dont you use https://doc.qt.io/qt-6/qml-qtquick-vectorimage-vectorimage.html
  • Type annotations / Typescript as a feature request

    Unsolved
    3
    0 Votes
    3 Posts
    29 Views
    R
    @jsulm That makes sense! Also, you are damn fast, thank you for reviewing my message!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Issue: Transferring a class that inherits QAbstractListModel via QtRO

    Unsolved
    4
    0 Votes
    4 Posts
    138 Views
    SGaistS
    Oh ! Great ! Smple solution :-) Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so other forum users may know a solution has been found :-)
  • Howto setup qml android 16kb Pages

    Unsolved
    7
    0 Votes
    7 Posts
    605 Views
    M
    That's useful. Thanks!
  • Qt6: the Qt.labs.qmlmodels library is not imported.

    Solved
    5
    0 Votes
    5 Posts
    195 Views
    W
    @JKSH said in Qt6: the Qt.labs.qmlmodels library is not imported.: The auto-completer might not see the module for some reason, but you can type it out manually. Does that work? Yes, it works! The TableModelColumn now has syntax highlighting! Thank you very much! @JKSH said in Qt6: the Qt.labs.qmlmodels library is not imported.: We recommend omitting the version number. Just write import Qt.labs.qmlmodels Fixed it.
  • Dialog modality ignored

    Unsolved
    5
    0 Votes
    5 Posts
    496 Views
    Q
    Same issue in Qt6.9.2 on Windows 10 IoT 企业版 LTSC 19044.1288
  • TableView refuses to show in the UI

    Unsolved
    2
    0 Votes
    2 Posts
    194 Views
    jeremy_kJ
    @gsal said in TableView refuses to show in the UI: I am at a loss, here, any hints? tests? Look for the usual stuff. In no particular order: Remove everything believed to be extraneous (window titles, scroll bars, unused imports, non-trivial dummy data, ...), until the problem goes away. Reintroduce the last change, and remove everything else extraneous. Keep going until the absolute minimum is reached. Post that if the answer still isn't obvious. Check the return value of functions, and the existence/lifetime of objects. Does XYZTableModel refer to a valid object? Does QUrl.fromLocalFile(filename) return the expected url? Does the content of the url's target match what is expected? QML and Qt in general has a bias toward types starting with an upper case letter, and properties starting with lower case. Violating that custom can have unexpected results. (There are exceptional cases...) Turn on categorized logging and run the program via something that logs or displays standard error. Avoid context properties.
  • QML Binding Triggers Unnecessary Initial Assignment with Same Value

    Solved
    2
    0 Votes
    2 Posts
    117 Views
    jeremy_kJ
    This would be easier to discuss with a minimal working example. There's a lot of room for misinterpretation with natural language. In general, the QML engine invokes a property setter during initialization on assignment any time a component of a binding emits a changed signal It's the responsibility of property setters to recognize and ignore duplicate or otherwise invalid inputs. class Object : public QObject { Q_OBJECT Q_PROPERTY(int prop MEMBER m_prop WRITE setProp NOTIFY propChanged) int m_prop = 1; int m_max = 5; signals: void propChanged(); public: void setProp(int newValue) { if (newValue == m_prop || newValue > m_max) return; m_prop = newValue; emit propChanged(); } };
  • How to get current theme color ?

    Unsolved theme color qml
    10
    1 Votes
    10 Posts
    4k Views
    RokeJulianLockhartR
    @QtTester, I think I'd misunderstood, too... Thanks.
  • Windows - qt_add_qml_module failed to load the plugin

    Solved
    5
    0 Votes
    5 Posts
    643 Views
    Q
    @dheerendra can you show some demo source? I don't konw how to write qml plugin and use the component in app.qml, thank you .
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    33 Views
    No one has replied
  • Qt6.8 + CMake : <Unknown File>: No module named "IMClient" found

    Solved
    6
    0 Votes
    6 Posts
    741 Views
    JKSHJ
    Hi, and welcome! @Lopher said in Qt6.8 + CMake : <Unknown File>: No module named "IMClient" found: I'm uncertain whether this is a sustainable solution and if it aligns with proper practices." For the cleanest solution: Use qt_standard_project_setup(REQUIRES 6.8) in your top-level CMakeLists.txt -- this automatically applies QTP0001 and QTP0004, so you don't need to set them manually Don't set a custom RESOURCE_PREFIX Don't call addImportPath() Don't put your QML files on a specific place on disk -- let your app load it from the embedded resources instead Give your main *.qml file a name that starts with an uppercase letter (so Login.qml, not login.qml) Now, you can call engine.loadFromModule("IMClientQml", "Login"); Note: The whole point of introducing QTP0001 was to avoid the need for RESOURCE_PREFIX and addImportPath() For further troubleshooting, call the following and inspect the output: qDebug() << "Import paths:" << engine.importPaths(); qDebug("### Resources ###"); QDirIterator qrc(":", QDirIterator::Subdirectories); while(qrc.hasNext()) qDebug() << qrc.next();
  • Qt6.8 + CMake: QML components cannot find qrc resources built by qt_add_resources

    Solved
    2
    0 Votes
    2 Posts
    122 Views
    Christian EhrlicherC
    @Lopher said in Qt6.8 + CMake: QML components cannot find qrc resources built by qt_add_resources: Cannot open: qrc:/icons/close.svg Because they are not there as you can see here: qt_add_resources(IMClientResources "IMClientSvg" PREFIX "/icons" FILES resources/images/close.svg They are in :/icons/resources/images/close.svg