<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[StatusBar is not a type]]></title><description><![CDATA[<p dir="auto">Hello<br />
I'm new to QML<br />
just trying to do some simple tasks<br />
here's the problem:<br />
I have a main.qml file in which I am trying to connect an external unit called the StatusBar<br />
The StatusBar is accordingly placed in a separate file and added to the resources<br />
, but an error occurs when building the project. StatusBar is not a type<br />
Please help!</p>
<p dir="auto">Here the code<br />
<strong>main.qml</strong></p>
<pre><code>import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.12


Window {
    width: 1024
    height: 680
    visible: true
    title: qsTr("CoffeeSodaDispenserExample")


    StackView {
        id: stackView
        anchors.fill: parent
        initialItem: "qrc:/HotColdSelectionPage.qml"

    }

    StatusBar {
        id: statusB
    }

}
</code></pre>
<p dir="auto">StatusBar.qml</p>
<pre><code>
import QtQuick 2.12

Item {
    Rectangle {
        id: statusBar
        color: "black"
        radius: 5
        width: 780
        height: 50



        Rectangle {
            id: notificationBage
            width: 40
            height: 40
            radius: 20
            color: "white"

            Text {
                id: badgeText
                text: qsTr("2")
                anchors.centerIn: parent
                font.pixelSize: 24
                color: "black"
            }
        }


        Text {
            id: timeText
            text: qsTr("12:22 PM")
            anchors.centerIn: parent
            color: "white"
            font.pixelSize: 36

        }

        Image {
            id: wifiSymbol
            source: "qrc:/UI/Assets/wifi.png"
            anchors
            {
                verticalCenter :parent.verticalCenter
                right: parent.right
                rightMargin: 10

            }

            width: 40
            height: 40

        }


    }

}

</code></pre>
<p dir="auto">Resource file</p>
<pre><code>&lt;RCC&gt;
    &lt;qresource prefix="/"&gt;
        &lt;file&gt;UI/Assets/hot.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/previousCold.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/previousHot.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/resetCold.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/resetHot.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/snowflake.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/soda.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/softdrinks.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/tea.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/tickCold.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/tickHot.png&lt;/file&gt;
        &lt;file&gt;UI/Assets/wifi.png&lt;/file&gt;
        &lt;file&gt;HotColdSelectionPage.qml&lt;/file&gt;
        &lt;file&gt;StatusBar.qml&lt;/file&gt;
    &lt;/qresource&gt;
&lt;/RCC&gt;

</code></pre>
]]></description><link>https://forum.qt.io/topic/139242/statusbar-is-not-a-type</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 12:20:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139242.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Sep 2022 05:55:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to StatusBar is not a type on Mon, 12 Sep 2022 08:24:31 GMT]]></title><description><![CDATA[<p dir="auto">As I found this problem only in Qt 6.2<br />
when I select the minimum required version of QT 5.x  - everything works.<br />
Obviously, in 6.2, the order of registration of components has somehow changed<br />
Who knows how to fix it or do it right ?</p>
]]></description><link>https://forum.qt.io/post/728293</link><guid isPermaLink="true">https://forum.qt.io/post/728293</guid><dc:creator><![CDATA[AleksE]]></dc:creator><pubDate>Mon, 12 Sep 2022 08:24:31 GMT</pubDate></item></channel></rss>