Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84726

MenuBar font assignment causes text elision on Menu titles

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.14.2
    • Quick: Controls 2
    • None
    • Windows

      If the font.family assignment is used on Windows then the Menu texts are written with elision, e. g. "Sub…". Showing width, implicitWidth, and contentWidth of the MenuBar stays the same, also the font looks the same with and without the assignment. With the assignment just the written text is truncated and elided, which is bad for a menu.

       

      import QtQuick 2.9
      import QtQuick.Controls 2.13
      import QtQuick.Layouts 1.12
      
      ApplicationWindow {
       id: root
       visible: true
       title: qsTr("Demo")
       menuBar: MenuBar {
        font.family: Qt.platform.os != "windows" ? "Liberation Sans" : Qt.application.font
        Menu
        { title: qsTr("Submenu") }
       }
      }
      

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            rebemlix Rolf Eike Beer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes