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

Inconsistent Behavior of QML Buttons on macOS Dark Theme: Text Inside Button Isn't Visible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.2.9
    • None
    • macOS

    Description

      Overview

      When using the provided QML code snippet in a Qt application on macOS dark theme, the text inside the button is not visible, resulting in poor usability. This inconsistent behavior deviates from the expected appearance of buttons, negatively impacting the user experience. Additionally, it is worth noting that when changing focus to other applications, the text inside the button becomes visible.

      Steps to Reproduce:

      1. Launch a Qt application that includes the following QML code snippet on a macOS system with the dark theme enabled:
        import QtQuick
        import QtQuick.Window
        import QtQuick.Controls
        
        Window {
            id: window
            width: 640
            height: 480
            visible: true
            title: qsTr("Hello World")    
            Button {
                id: createButton
                text: "click"
            }
        }
         
      1. Observe the appearance of the "click" button, specifically the visibility of the text inside.

      Expected Outcome: The text inside the QML button should be clearly visible, irrespective of the system's theme.

      Actual Outcome: On macOS dark theme, the text inside the QML button is not visible, blending in with the button's background or lacking sufficient contrast. Consequently, users encounter difficulties reading the button labels. However, it is worth noting that when changing focus to other applications and then returning to the Qt application, the text inside the button becomes visible.

      Additional Information:

      1. This issue is specific to macOS dark theme and does not occur on other platforms or themes.
      2. The problem persists even after restarting the application or the system.
      3. The visibility of text inside the button improves when changing focus to other applications and then returning to the Qt application.
      4. Screenshots depicting the issue are attached for reference.

      Attachments

        Issue Links

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

          Activity

            People

              axelspoerl Axel Spoerl
              alrizwan Alber Rizwan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes