Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OpenGL and MenuBar height
Qt 6.11 is out! See what's new in the release blog

OpenGL and MenuBar height

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 318 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    g4Rneck
    wrote on last edited by
    #1

    I added the MenuBar to the application which uses OpenGL. Unfortunately it doesn't look as I expect:
    alt text
    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 - https://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html to the qml file

        MenuBar {
            Menu {
                title: qsTr("&File")
                MenuItem {
                    text: qsTr("E&xit")
                }
            }
            Menu {
                title: qsTr("&Edit")
            }
            Menu {
                title: qsTr("&Help")
                MenuItem {
                    text: qsTr("About...")
                }
            }
        }
    

    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.

    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 - https://doc-snapshots.qt.io/qt5-5.11/qtquickcontrols-uiforms-example.html

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved