Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Controls.Button do not underline accelerator key
Forum Updated to NodeBB v4.3 + New Features

Controls.Button do not underline accelerator key

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 271 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.
  • A Offline
    A Offline
    albayenes
    wrote on last edited by
    #1

    Hi everyone,

    Controls.Button does not underline a letter when I press the Alt key. It works, but the letter is not underlined. I use following code as example. How can I show the accelarator key when I press the Alt key on Button text?

    import QtQuick 2.6
    import QtQuick.Layouts 1.2
    import QtQuick.Controls 1.2 as Controls
    import org.kde.kirigami 2.13 as Kirigami
    import QtQuick.Controls.Styles.Plasma 2.0 as Styles
    
    // Base element, provides basic features needed for all kirigami applications
    Kirigami.ApplicationWindow {
        // ID provides unique identifier to reference this element
        id: root
    
        // Window title
        // i18nc is useful for adding context for translators, also lets strings be changed for different languages
        title: i18nc("@title:window", "Hello World")
    
        // Initial page to be loaded on app load
        pageStack.initialPage: Kirigami.Page {
    
            ColumnLayout {
                RowLayout {
                    Controls.Button {
                        text: "&Apply"
                        onClicked: {
                            console.log("Pressed Apply");
                        }
                    }
                }
            }
    
        }
    
    }
    
    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      Which OS? And Qt version?

      A 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        Which OS? And Qt version?

        A Offline
        A Offline
        albayenes
        wrote on last edited by
        #3

        @JoeCFD said in Controls.Button do not underline accelerator key:

        Which OS? And Qt version?

        Operating System: Manjaro Linux
        KDE Plasma Version: 5.25.5
        KDE Frameworks Version: 5.97.0
        Qt Version: 5.15.5
        Kernel Version: 5.15.65-1-MANJARO (64-bit)
        Graphics Platform: X11
        Processors: 20 × 12th Gen Intel® Core™ i9-12900H
        Memory: 15,4 GiB of RAM
        Graphics Processor: Mesa Intel® Graphics
        Manufacturer: HUAWEI
        Product Name: CREF-XX
        System Version: M1010

        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