Skip to content
  • 0 Votes
    3 Posts
    783 Views
    H

    I have included the import statement. I have my project being built two ways. I have it setup as using shared libs while debugging so I have a kit that is set up for that using the default qt install. I then have a static kit that I use for release.

    When I run the debug it loads fine, I get no errors. When I switch to the release kit I then get the error that you posted about an unknown component.

    Here is my qml file

    import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Extras 1.4 import QtQuick.Controls.Styles 1.4 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") CircularGauge { id: gauge width: 400 height: 400 antialiasing: true tickmarksVisible: true anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter value: 0 minimumValue: -100 maximumValue: 100 style: CircularGaugeStyle { minorTickmarkCount: 0 needle: Rectangle { y: outerRadius * 0.15 implicitWidth: outerRadius * 0.03 implicitHeight: outerRadius * 0.9 antialiasing: true color: Qt.rgba(0.66, 0.3, 0, 1) } } } }

    I just used the basic Qt Quick Application - Empty template for the project and only added

    CONFIG += static

    to the .pro file

    For some reason it's not finding the Controls.Styles using the static build. If I mouse over the import statement it reads 'Library at C:/Qt/Static/5.12.3/qml/QtQuick/Controls/Styles'.

  • 0 Votes
    2 Posts
    1k Views
    Pablo J. RoginaP

    @alizadeh91 have you check the documentation about CircularGaugeStyle?

    When defining your own needle component, the only properties that the style requires you to set are the implicitWidth and implicitHeight.

    which looks like you're not setting.

    Also this document refers to styling the needle and those mentioned properties.

  • 0 Votes
    4 Posts
    2k Views
    aha_1980A

    @maxime.armand

    Have you actually tried it? It does exactly what you demand in step 1.

    And if you look in http://doc.qt.io/qt-5/qtserialport-creaderasync-main-cpp.html you will see that the serial port and the baud rate are given as command line parameters.

    Just (cross-)compile the program for the Raspberry, and run it. It should work like your HypterTerminal test.