Important: Please read the Qt Code of Conduct -

Howto change the text "Exit" and "Options" in the menubar

  • Hello,

    now I open the window with showMaximized instead of showFullscreen, so that there is the menubar at the bottom (Options / Exit) and the system's bar at the top.

    How to change the captions "Exit" and "Options" ???

    Btw; I know that I can add child elements to them with signals, too; but I want to change these main things to German.

    Thank you

  • try to double click?

  • I think you misunderstood me.
    I know that the titles of the menu items can be changed by double clicking.
    But "Options" and "Exit" are main captions and "Options" has children called abc,xyz,... in my example.

    This is how they are changed when starting on my phone
    ! menubar is transformed really)!

    How to change the main captions "Options" and "Exit", I think they even don't belong to QMenuBar, especially "Exit" does not because it is seperated from Options' menu.

  • you want to change the Subtitle of "Option" and "exit" right?
    but it's failing with double click?

  • Yes, and I don't know what to do.

  • Don't know why it does not work for you but you always can modify the .ui file manually,

    I.e. in following example you have the something and something2 menus, you can modify their <string>something</string> values.
    <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
    <widget class="QMenu" name="menuSomething">
    <property name="title">
    <widget class="QMenu" name="menuSomething2">
    <property name="title">
    <addaction name="actionAsd"/>
    <addaction name="menuSomething"/>
    <addaction name="menuSomething2"/>

    Modifying action names is similar, change the "asd" to other:
    <action name="actionAsd">
    <property name="text">

  • I think you misunderstood me.
    I can modify the texts of the menu items but not of those called "Options" and "Exit" which are always on the bottom, this is what I tried to illustrate "here": .

    The string "Options" and "Exit" aren't even in the source code.

  • Screenshots might depict the situation more clearly.

    ! need to see this screenshot!)!

    And how to change this "Actions" ?!?!

  • I'm sorry for not getting that this is mobile app.

    Have you tried setting the locale for your main app window?

    Something like:
    mainWindow.setLocale( QLocale(QLocale::German, QLocale::Germany) );

  • I already have this in the designer.

    ! German, Germany)!

    The MainWindow as well as the QMenuBar has this in their local property each.

Log in to reply