<?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[A Simple Question About Icons  Of Window]]></title><description><![CDATA[<p dir="auto">I got a simple question about icons of window. I have asked for AI for several times, but however it didn't give me a proper answer.</p>
<pre><code>import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.12
import QtQuick.Window
import Qt.labs.platform 1.1 as Platform


ApplicationWindow {
    id: mainWindow
    width: Screen.width
    height: Screen.height
    visible: true
    visibility: "FullScreen"

    icon: "qrc:/images/msRain.png"
    title: qsTr("NaciroManchurianMsRain")
    flags: Qt.FramelessWindowHint
    color: "transparent"

    Component.onCompleted: {
        PetHelper.setWindow(mainWindow);
    }



    Image {
        id: msRain0_1
        source: "qrc:/images/msRain.png"
        Component.onCompleted: {
            var id = PetHelper.autoCreateNewRegion(msRain0_1.source);
            PetHelper.updatePosition(msRain0_1.x, msRain0_1.y, id);
            PetHelper.updateMask();
        }
    }

    Platform.SystemTrayIcon {
            id: trayIcon
            visible: true
            icon.source: "qrc:/images/msRain.png"
            tooltip: "我的透明窗口应用"
            menu: Platform.Menu {
                Platform.MenuItem {
                    text: qsTr("关闭")
                    onTriggered: Qt.quit()
                }
            }
    }
}
</code></pre>
<p dir="auto">It says that "Cannot assign to non-existent property 'icon'". But I think ApplicationWindow does have the property "icon" right?</p>
<p dir="auto">If you need more files about cpp files or cmake files et cetera, I will instantly offer it.</p>
<p dir="auto">There's a few Chinese words, but it won't make a influence on your conprehension. And my English is really bad, hope all of you can forgive me, pardon me.</p>
]]></description><link>https://forum.qt.io/topic/164801/a-simple-question-about-icons-of-window</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 08:16:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164801.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jun 2026 04:59:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to A Simple Question About Icons  Of Window on Tue, 16 Jun 2026 05:26:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> said in <a href="/post/838770">A Simple Question About Icons Of Window</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kansas">@<bdi>Kansas</bdi></a> said in <a href="/post/838769">A Simple Question About Icons Of Window</a>:</p>
<blockquote>
<p dir="auto">But I think ApplicationWindow does have the property "icon" right?</p>
</blockquote>
<p dir="auto">Wrong. See <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-applicationwindow.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qml-qtquick-controls-applicationwindow.html</a><br />
What icons do you mean? The icons in the title bar of the window (close/minimize/maximize)?</p>
</blockquote>
<p dir="auto">Oh, I see. Thanks a lot. I specifically mean the icons in the title bar of the window, but I also want to set the icon of the exe.<br />
I'll search it again carefully. Thank you again.</p>
]]></description><link>https://forum.qt.io/post/838771</link><guid isPermaLink="true">https://forum.qt.io/post/838771</guid><dc:creator><![CDATA[Kansas]]></dc:creator><pubDate>Tue, 16 Jun 2026 05:26:24 GMT</pubDate></item><item><title><![CDATA[Reply to A Simple Question About Icons  Of Window on Tue, 16 Jun 2026 05:17:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kansas">@<bdi>Kansas</bdi></a> said in <a href="/post/838769">A Simple Question About Icons Of Window</a>:</p>
<blockquote>
<p dir="auto">But I think ApplicationWindow does have the property "icon" right?</p>
</blockquote>
<p dir="auto">Wrong. See <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-applicationwindow.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qml-qtquick-controls-applicationwindow.html</a><br />
What icons do you mean? The icons in the title bar of the window (close/minimize/maximize)?</p>
]]></description><link>https://forum.qt.io/post/838770</link><guid isPermaLink="true">https://forum.qt.io/post/838770</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 16 Jun 2026 05:17:41 GMT</pubDate></item></channel></rss>