<?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[QMenuBar background image overlays Qmenu text when width of window is small]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">We use QSS to style the qmenubar and qmenu. For qmenubar it looks like this:</p>
<pre><code>QMenuBar {	
    background: white no-repeat right center url(foobar.png);   
}
</code></pre>
<p dir="auto">This works fine and puts the image in the right of the menubar. But when you shrink the width of the app window such that the background image touches and mixes with the qmenus in the qmenubar, the image overlays the qmenus and it doesn't look good. I don't think the qmenu qss has anything relevant in it.</p>
<p dir="auto">Is there a way to make it so the image dissappears behind the qmenu?</p>
<p dir="auto">QMenuBar with image on right when window is large enough :</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/2ad1081d-b447-4e9f-ac32-8603ed7ef746.png" alt="no_mix.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Problem when window width is small and mix happens:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/651aeb49-529a-4000-bb5f-e100f3cbdc61.png" alt="problem.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">"this is test" is an image.</p>
<p dir="auto">QT version 5.15<br />
Platform Windows</p>
<p dir="auto">Thanks,<br />
Adam</p>
]]></description><link>https://forum.qt.io/topic/146076/qmenubar-background-image-overlays-qmenu-text-when-width-of-window-is-small</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 07:41:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/146076.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2023 17:40:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QMenuBar background image overlays Qmenu text when width of window is small on Wed, 28 Jun 2023 18:55:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/howitzerdev">@<bdi>HowitzerDev</bdi></a> Menu bar items have a transparent background by default, so the menu bar will be visible. You can style the items to have opaque background using <code>QMenuBar:item</code> style and that will cover the menu bar background under the items.</p>
]]></description><link>https://forum.qt.io/post/762939</link><guid isPermaLink="true">https://forum.qt.io/post/762939</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Wed, 28 Jun 2023 18:55:35 GMT</pubDate></item></channel></rss>