<?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[Quick Controls 2, is it possible to show and hide header (toolbar) dynamically?]]></title><description><![CDATA[<p dir="auto">I have an <code>ApplicationWindow</code> with a header and a footer:</p>
<pre><code>import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.0

ApplicationWindow {
    Material.theme: Material.Dark

    id: window
    visible: true

    header: ToolBar {
        id: toolBar

        RowLayout {
            anchors.fill: parent

            Slider {
                Layout.fillWidth: true
            }
        }
    }

    footer: ToolBar {
        id: statusBar
    }
}
</code></pre>
<p dir="auto">So far it works fine. But if I try to hide the footer and the header at runtime upon some event (<code>toolBar.visible = false</code>), the contents disappears (e. g. the <code>Slider</code>), but the reserved header and footer areas themselves stay on screen. Is there a workaround?</p>
]]></description><link>https://forum.qt.io/topic/69931/quick-controls-2-is-it-possible-to-show-and-hide-header-toolbar-dynamically</link><generator>RSS for Node</generator><lastBuildDate>Fri, 23 Oct 2026 20:39:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/69931.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Aug 2016 08:26:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Fri, 05 Aug 2016 08:10:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekkescorner">@<bdi>ekkescorner</bdi></a>, yes, I've seen that. Turns out I had an anchor loop that prevented it from working. Works now! The QML is starting too look way too complicated, but at least it works.</p>
]]></description><link>https://forum.qt.io/post/340919</link><guid isPermaLink="true">https://forum.qt.io/post/340919</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Fri, 05 Aug 2016 08:10:18 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Fri, 05 Aug 2016 07:41:34 GMT]]></title><description><![CDATA[<p dir="auto">you can use a Component for the Loader<br />
<a href="http://doc.qt.io/qt-5/qml-qtquick-loader.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qml-qtquick-loader.html</a></p>
]]></description><link>https://forum.qt.io/post/340915</link><guid isPermaLink="true">https://forum.qt.io/post/340915</guid><dc:creator><![CDATA[ekkescorner]]></dc:creator><pubDate>Fri, 05 Aug 2016 07:41:34 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Fri, 05 Aug 2016 07:39:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekkescorner">@<bdi>ekkescorner</bdi></a><br />
That's interesting, especially since I'm still struggling with my initial approach (manipulating <code>header.visible</code> + <code>toolbar.height</code>).  But this looks complicated since I don't want to declare a separate .qml. Gonna give it a try.</p>
]]></description><link>https://forum.qt.io/post/340914</link><guid isPermaLink="true">https://forum.qt.io/post/340914</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Fri, 05 Aug 2016 07:39:18 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Fri, 05 Aug 2016 06:38:02 GMT]]></title><description><![CDATA[<p dir="auto">hi,<br />
you can use headers dynamically. simply use loaders.<br />
while my app is starting-up my header is null<br />
then I have different headers for Portrait and Landscape<br />
works perfect</p>
<pre><code>header: isLandscape || !initDone ? null : titleBar
    // show TITLE  BARS is delayed until INIT DONE
    Loader {
        id: titleBar
        visible: !isLandscape &amp;&amp; initDone
        active: !isLandscape &amp;&amp; initDone
        source: "navigation/DrawerTitleBar.qml"
    }
    // in LANDSCAPE header is null and we have a floating TitleBar
    Loader {
        id: titleBarFloating
        visible: isLandscape &amp;&amp; initDone
        active: isLandscape &amp;&amp; initDone
        source: "navigation/DrawerTitleBar.qml"
        anchors.top: parent.top
        anchors.left: parent.left
        anchors.right: parent.right
    }
    // end TITLE BARS
</code></pre>
<p dir="auto">for your scenario use .active of the loader instead of .visible of the header<br />
should work</p>
]]></description><link>https://forum.qt.io/post/340904</link><guid isPermaLink="true">https://forum.qt.io/post/340904</guid><dc:creator><![CDATA[ekkescorner]]></dc:creator><pubDate>Fri, 05 Aug 2016 06:38:02 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Thu, 04 Aug 2016 13:20:02 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://bugreports.qt.io/browse/QTBUG-55143" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-55143</a></p>
]]></description><link>https://forum.qt.io/post/340818</link><guid isPermaLink="true">https://forum.qt.io/post/340818</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Thu, 04 Aug 2016 13:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Thu, 04 Aug 2016 11:28:51 GMT]]></title><description><![CDATA[<p dir="auto">@jpnurmi<br />
Thanks a lot, will report a bug shortly. For a moment there I was afraid the window isn't supposed to relayout its contents, meaning what I'm trying to do is impossible.</p>
]]></description><link>https://forum.qt.io/post/340799</link><guid isPermaLink="true">https://forum.qt.io/post/340799</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Thu, 04 Aug 2016 11:28:51 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Thu, 04 Aug 2016 11:20:17 GMT]]></title><description><![CDATA[<p dir="auto">Please report a bug. ApplicationWindow actually even relayouts the content when the visibility of the header or footer changes, but it must be missing a check for their visibility and so it merely uses their heights regardless of their visibility. As a temporary workaround, you can set the header to null or set the tool bar's height to 0. Sorry for the inconvenience. We have plans to introduce some sort of transient headers and footers at some point, but the work for that hasn't started yet...</p>
]]></description><link>https://forum.qt.io/post/340797</link><guid isPermaLink="true">https://forum.qt.io/post/340797</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 04 Aug 2016 11:20:17 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Thu, 04 Aug 2016 10:48:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/devopia53">@<bdi>Devopia53</bdi></a><br />
Hi. That looked very promising, but no, that doesn't work either. A stripe of the window background color remains where the header and footer were. The full-screen view inside the window (with <code>anchors.fill: parent</code>) did not expand into this free area.</p>
]]></description><link>https://forum.qt.io/post/340789</link><guid isPermaLink="true">https://forum.qt.io/post/340789</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Thu, 04 Aug 2016 10:48:45 GMT</pubDate></item><item><title><![CDATA[Reply to Quick Controls 2, is it possible to show and hide header (toolbar) dynamically? on Thu, 04 Aug 2016 08:46:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/violet-giraffe">@<bdi>Violet-Giraffe</bdi></a></p>
<p dir="auto">Hi.</p>
<p dir="auto">Do you want this? <code>window.header.visible = false</code></p>
]]></description><link>https://forum.qt.io/post/340729</link><guid isPermaLink="true">https://forum.qt.io/post/340729</guid><dc:creator><![CDATA[Devopia53]]></dc:creator><pubDate>Thu, 04 Aug 2016 08:46:28 GMT</pubDate></item></channel></rss>