<?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[OpenGL and MenuBar height]]></title><description><![CDATA[<p dir="auto">I added the MenuBar to the application which uses OpenGL. Unfortunately it doesn't look as I expect:<br />
<img src="https://i.imgur.com/RBTFzfp.png" alt="alt text" class=" img-fluid img-markdown" /><br />
The height of the elements is too big. I have similar problem if I add the menu to the Scene Graph - OpenGL Under QML example - <a href="https://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html</a> to the qml file</p>
<pre><code>    MenuBar {
        Menu {
            title: qsTr("&amp;File")
            MenuItem {
                text: qsTr("E&amp;xit")
            }
        }
        Menu {
            title: qsTr("&amp;Edit")
        }
        Menu {
            title: qsTr("&amp;Help")
            MenuItem {
                text: qsTr("About...")
            }
        }
    }
</code></pre>
<p dir="auto">Of course I can set the height of the MenuItem manually but it doesn't work correctly for MenuBar (only the background has smaller size) and I think it's not the good approach.</p>
<p dir="auto">Other examples without OpenGL handling but with MenuBar usage in qml have normal height. Also it doesn't have separate styles or size adjustments - for example Qt Quick Controls - UI Forms - <a href="https://doc-snapshots.qt.io/qt5-5.11/qtquickcontrols-uiforms-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc-snapshots.qt.io/qt5-5.11/qtquickcontrols-uiforms-example.html</a></p>
]]></description><link>https://forum.qt.io/topic/109925/opengl-and-menubar-height</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 00:08:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/109925.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Dec 2019 12:22:59 GMT</pubDate><ttl>60</ttl></channel></rss>