doesn't QtQuickGuiProvider do the exact same thing with QfontDatabase::families?
Yes, it does. It returns a QStringList. What I mean is that you don't
need a custom C++ base class for your singleton if all you want to do is
expose the font families in pre-wrapped form. The following is enough
for that:
pragma Singleton
import QtQml
QtObject {
// Qt5:
property var wrappedFontFamilies5: Qt.fontFamilies()
// Qt6:
property list<string> wrappedFontFamilies6: Qt.fontFamilies()
}
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest