<?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[WindowSystemMenuHint strange bug]]></title><description><![CDATA[<p dir="auto">Hi everybody. I just added new fresh .ui file with class which inherits QDialog for extra window of my main project. Add in ui some layout and labels, it looks as it should, everything ok on the following screenshot:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/634cd73c-d16f-4b86-bc50-54c03fc851a1.jpg" alt="0_1540970770088_proper.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">But when i try to remove that unnecessary MenuHint(question mark) like that:</p>
<pre><code>myNewDialog-&gt;setWindowFlags(Qt::WindowSystemMenuHint);
</code></pre>
<p dir="auto">Or. By adding such thing in to constructor of that child dialog:</p>
<pre><code>this-&gt;setWindowFlags(Qt::WindowSystemMenuHint);
</code></pre>
<p dir="auto">The window will start looking, i would say, strange:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/08d3aec4-11a4-4d2f-a514-d87b837e3d8e.jpg" alt="0_1540970976451_unproper.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">The code in constructor of my main class:</p>
<pre><code>myNewDialog = new FinalResult(this);   //class of child window
myNewDialog-&gt;show();
</code></pre>
]]></description><link>https://forum.qt.io/topic/96133/windowsystemmenuhint-strange-bug</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 02:50:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/96133.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Oct 2018 07:32:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 12:10:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/engelard">@<bdi>Engelard</bdi></a><br />
ok, odd. worked for my dialog.</p>
]]></description><link>https://forum.qt.io/post/490580</link><guid isPermaLink="true">https://forum.qt.io/post/490580</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 01 Nov 2018 12:10:31 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:53:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> said in <a href="/post/490568">WindowSystemMenuHint strange bug</a>:</p>
<blockquote>
<p dir="auto">Hi<br />
I tried</p>
</blockquote>
<p dir="auto">I try that stuff long ago, no efforts of doing that attempts from the constructor of child QDialog were paid...</p>
]]></description><link>https://forum.qt.io/post/490573</link><guid isPermaLink="true">https://forum.qt.io/post/490573</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:53:34 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:49:44 GMT]]></title><description><![CDATA[<p dir="auto">Lol i figure it out, with little help of Qt documentation and imagination:</p>
<pre><code>resultsWindow = new FinalResult(this);
Qt::WindowFlags flags = 0;
flags = Qt::Dialog;

resultsWindow-&gt;setWindowFlags(flags |= Qt::WindowSystemMenuHint); // question mark removed, but close button now disabled
resultsWindow-&gt;setWindowFlag(Qt::WindowCloseButtonHint, true);
</code></pre>
]]></description><link>https://forum.qt.io/post/490570</link><guid isPermaLink="true">https://forum.qt.io/post/490570</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:49:44 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:43:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
I tried</p>
<pre><code>CustomDialog::CustomDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CustomDialog)
{
    ui-&gt;setupUi(this);
    setWindowFlags(Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
}


</code></pre>
<p dir="auto"><img src="http://imagizer.imageshack.com/img922/6420/snmAaU.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/490568</link><guid isPermaLink="true">https://forum.qt.io/post/490568</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:43:18 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:36:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> i tried at first from my object(child dialog), not working, tried, can't understand why.</p>
]]></description><link>https://forum.qt.io/post/490566</link><guid isPermaLink="true">https://forum.qt.io/post/490566</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:31:02 GMT]]></title><description><![CDATA[<p dir="auto">Not all combinations works all types of windows.</p>
]]></description><link>https://forum.qt.io/post/490563</link><guid isPermaLink="true">https://forum.qt.io/post/490563</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:31:02 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:30:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/engelard">@<bdi>Engelard</bdi></a><br />
Oh, must be from dialog :)</p>
<p dir="auto">myNewDialog-&gt;setWindowFlags(myNewDialog-&gt;windowFlags() &amp; (~Qt::WindowSystemMenuHint &amp; ~Qt::WindowMaximizeButtonHint));</p>
]]></description><link>https://forum.qt.io/post/490562</link><guid isPermaLink="true">https://forum.qt.io/post/490562</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:30:04 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Thu, 01 Nov 2018 11:29:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto">Very good stuff. But.</p>
<ol>
<li>as i understand, it set it from windowFlags() which comes from parent, it do totally no effect if i would try set it up from it's own flags:</li>
</ol>
<pre><code>myNewDialog-&gt;windowFlags()
</code></pre>
<ol start="2">
<li>As it appliable only from parent(QMainWindow), it adds maximize and minimize hints, maximize is unnecessary, so i tried to remove it, but it only disable it, not hide:</li>
</ol>
<pre><code>myNewDialog-&gt;setWindowFlags(windowFlags() &amp; (~Qt::WindowSystemMenuHint &amp; ~Qt::WindowMaximizeButtonHint));
</code></pre>
]]></description><link>https://forum.qt.io/post/490561</link><guid isPermaLink="true">https://forum.qt.io/post/490561</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Thu, 01 Nov 2018 11:29:30 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Wed, 31 Oct 2018 22:15:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
The reason for the odd look is due to you remove all its flags<br />
setWindowFlags(Qt::WindowSystemMenuHint);<br />
Now ONLY WindowSystemMenuHint is set. not Dialog and all the others it needs.<br />
You need to do<br />
setWindowFlags(windowFlags() &amp; ~Qt::WindowSystemMenuHint);<br />
which takes the current flags and bitwise disable only hint.</p>
]]></description><link>https://forum.qt.io/post/490463</link><guid isPermaLink="true">https://forum.qt.io/post/490463</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Wed, 31 Oct 2018 22:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Wed, 31 Oct 2018 20:06:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> said in <a href="/post/490412">WindowSystemMenuHint strange bug</a>:</p>
<blockquote>
<p dir="auto">which type of widget is your dialog?</p>
</blockquote>
<p dir="auto">QDialog</p>
]]></description><link>https://forum.qt.io/post/490430</link><guid isPermaLink="true">https://forum.qt.io/post/490430</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Wed, 31 Oct 2018 20:06:55 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Wed, 31 Oct 2018 18:38:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/engelard">@<bdi>Engelard</bdi></a> isn't that ...HelpButtonHint?</p>
<p dir="auto">which type of widget is your dialog? it may be the platform defaiult to show it.</p>
]]></description><link>https://forum.qt.io/post/490412</link><guid isPermaLink="true">https://forum.qt.io/post/490412</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Wed, 31 Oct 2018 18:38:40 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Wed, 31 Oct 2018 18:10:39 GMT]]></title><description><![CDATA[<p dir="auto">Maybe anybody knows another way to hide that button?</p>
]]></description><link>https://forum.qt.io/post/490408</link><guid isPermaLink="true">https://forum.qt.io/post/490408</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Wed, 31 Oct 2018 18:10:39 GMT</pubDate></item><item><title><![CDATA[Reply to WindowSystemMenuHint strange bug on Wed, 31 Oct 2018 08:38:21 GMT]]></title><description><![CDATA[<p dir="auto">Why that stuff even enabled by default...</p>
]]></description><link>https://forum.qt.io/post/490260</link><guid isPermaLink="true">https://forum.qt.io/post/490260</guid><dc:creator><![CDATA[Engelard]]></dc:creator><pubDate>Wed, 31 Oct 2018 08:38:21 GMT</pubDate></item></channel></rss>