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. Menu Item rendering problem
QtWS25 Last Chance

Menu Item rendering problem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 491 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.
  • S Offline
    S Offline
    skammers
    wrote on last edited by
    #1

    Hey!

    I've discovered a problem. On my computer, the rendering works perfect. Tried it on another computer and some of the texts looks weird. Added
    @
    renderType: Text.NativeRendering;
    @
    everywhere it is possible. This fixed the problem for the Text elements. The rendering of the menu was also corrupted. Added code there, and it works! What is still not working is the rendering of the shortcuts insde of the menuItem elements.

    @
    //File menu
    Menu {
    title: qsTr("File");
    style: MenuStyle {
    itemDelegate.label: Text {
    text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
    color: __currentTextColor
    font.pixelSize: __labelFontPixelSize
    renderType: Text.NativeRendering
    }
    }

            //New project
            MenuItem{
                id: newFile;
                text: qsTr("New...");
                shortcut: "Ctrl+N";
                onTriggered: {
                    if(madeList){
                        newProject.visible = true;
                    }
                }
            }
    

    @

    As you see, I got it to work under menu, but not under menuItem.

    What to do?

    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