About 187,000 results
Open links in new tab
  1. qt - How to access C++ enum from QML? - Stack Overflow

    Nov 20, 2013 · Qt also supports QML-defined enum types since Qt version 5.10. As an alternative to the C++-based answer by air-dex, you can now also use QML to create enum types: …

  2. QML: How can I pass model properties to a delegate loaded inside …

    QML reports that "name" is an unknown variable inside the Text element. If I replace the name variable with a string (i.e. "hello"), it works as expected. My question is, how can I pass the …

  3. How does QML compare two objects when compared with

    Jul 21, 2023 · My expectation was that, in QML when we compare two objects, it will return true only if they are two same objects. No. Remember that JS is quite loosely typed. The "===" …

  4. QML - Control border width and color on any one side of …

    May 14, 2013 · // CustomBorderRect.qml import QtQuick 2.12 Item { property alias color: innerRect.color property alias borderColor : borderRect.color property int borderWidth: 0 …

  5. QML - How to use QStringList as a model of ListView?

    To elaborate on Francisco's answer: if the data of the model is subject to change while the program is running, it is indeed the cleanest solution to implement the QStringList as a …

  6. c++ - Include another QML file from a QML file - Stack Overflow

    Oct 26, 2014 · The imported QML file defines a type whose name is the same as the filename (capitalized, less the .qml suffix). QML calls the type a reuseable component. You use that …

  7. How to do a "is_a", "typeof" or instanceof in QML?

    Dec 17, 2012 · For me, it was good enough use JSON.stringify() to compare QML elements. Of course, if two different elements have exactly the same properties and values, this would give …

  8. Declare a global property in QML for other QML files

    So if you need type checking and binding/change notify, simply declare your property as a member of the root object in your main.qml, and it will be accessible from everywhere in the …

  9. How to simulate C-style "ifdef" macro in QML? - Stack Overflow

    QML is not compiled but interpreted at run time, so preprocessor directives can't be used directly by QML. But this is not a limitation, because it is possible to introduce properties to QML from …

  10. How to use QML_IMPORT_PATH with Qt Cmake Project?

    Dec 19, 2015 · We need FORCE to # change it there immediately. Also, add a comment to the cache file. set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator …

Refresh