<?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[Dialog is visible only above parent widget]]></title><description><![CDATA[<p dir="auto">I have some application with custom window frames.  It was achived by using some default template BaseWindow witch sets <code>Qt::FramelessWindowHint</code> and handels move, resize e.t.c.   here its code <a href="http://pastebin.com/1Uzqmgaw" target="_blank" rel="noopener noreferrer nofollow ugc">http://pastebin.com/1Uzqmgaw</a><br />
I have two windows witch inherets this class. First one is main window inhereted from BaseWindow&lt;QWidget&gt;, second one is a dialog(for example settings dialog)  inhereted from BaseWindow&lt;QDialog&gt;<br />
The problem:<br />
If  in ctor of BaseWindow class i use parent class initilizer i.e</p>
<pre><code class="language-c++">template &lt;class T&gt;
BaseWindow&lt;T&gt;::BaseWindow(TitleMode titleMode, ResizeMode resizeMode, QWidget* parent) : T(parent)
</code></pre>
<p dir="auto">than dialog is visible only above parent.<br />
Can any one explain why this happend?<br />
I'm using Qt 4.8. Windows.</p>
]]></description><link>https://forum.qt.io/topic/53131/dialog-is-visible-only-above-parent-widget</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 06:27:00 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/53131.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Apr 2015 13:10:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dialog is visible only above parent widget on Fri, 10 Apr 2015 22:43:11 GMT]]></title><description><![CDATA[<p dir="auto">My comment might not be a reason it does not work for you, but every QObject derived class require Q_OBJECT macro at least if you have any signal/slot defined in it.<br />
I never tried to write template with such macro and believe it is not supported and will be not handled properly by mocing.<br />
It might be possible manually create required code  instead, but I doubt this solution will be portable.</p>
<p dir="auto">In other words my impression is templates are no-no with QObject derived classes.</p>
]]></description><link>https://forum.qt.io/post/269311</link><guid isPermaLink="true">https://forum.qt.io/post/269311</guid><dc:creator><![CDATA[alex_malyu]]></dc:creator><pubDate>Fri, 10 Apr 2015 22:43:11 GMT</pubDate></item></channel></rss>