0

Windows 10,
msvc 2019,
Qt 5.15.5
I cannot open custom QML component files in the Design mode in Qt Creator 9.0.2. I'm sure the project structure itself is correct, but why can't I see the appearance of the elements normally? How to make Design Studio find the plugin?

enter image description here

import qbs

GnsQmlPlugin {
    name: "pscontrols"
    pluginUri: "prosoft.controls"

    Depends { name: "gnsutils" }

    Group {
        name: "C++"
        files: [
            "*.h",
            "*.cpp",
            "palette/*.*",
            "shapes/*.*",
        ]
    }

    Group {
        name: "resources"
        condition: staticBuild
        files: ["pscontrols_resources.qrc"]
    }

    cppDefines: ['PSCONTROLS_LIBRARY']
}

c:\proj\guiness\pscontrols\prosoft\controls\qmldir file:

module prosoft.controls
classname ProsoftControlsPlugin
typeinfo pscontrols.qmltypes
plugin pscontrols ../..

TextLabel 2.2 TextLabel.qml
AbstractButton 2.2 AbstractButton.qml
...

The QML file contents:

import QtQuick 2.9
import QtQml 2.15
import QtQuick.Templates 2.9 as T
import prosoft.controls 2.2

T.Button {
    id: control    

    readonly property bool isHovered: hovered || activeFocus
...
Vladimir Bershov
  • 2,701
  • 2
  • 21
  • 51

0 Answers0