Button Text not readable



  • As the title says the button text is not visible at all . When i click on it then only i am able to see it for a second .
    Screenshot :
    alt text

    Code :

    import QtQuick 2.6
    import QtQuick.Controls 2.0
    import QtQuick.Dialogs 1.2
    
    Item {
       id: root
       width: 580
       height: 400
       SystemPalette { id: palette }
       clip: true
    
        MessageDialog {
            id: quitDialog
            text: "Do you wish to quit?"
            visible: false
            icon : StandardIcon.Question
            modality: Qt.ApplicationModal
            standardButtons: StandardButton.Yes | StandardButton.No
            onAccepted: Qt.quit()
            Component.onCompleted: visible = true
            onYes : Qt.quit();
            onNo: console.log("Not quitting")
        }
    }
    
    

    Any ideas why this is happening ?



  • Hi ,

    Just tried ur code, the text is visible for me when i ran it.
    i tried with Qt 5.8 , Qt 5.9 Windows.

    0_1508514678483_popup_Qmldialog.PNG

    Can u list ur configuration?.

    Thanks,



  • @Pradeep-Kumar Hey , the thing is my system has dark theme ( i am using KDE ) but when i switch the theme to light theme , it shows text .
    alt text

    I am not really sure why this is happening

    My system if it helps :
    Linux mint 18 KDE .
    Qt 5.9 .



  • Hmmm k , didnt try with linux and the other themed settings,
    make be native look and feel i suppose.
    Will try with ur configuration some time.

    Thanks,



  • still i don't understand why this behaviour :/ . does it automatically takes system theme and set colors accordingly



  • need to check Qt classes for system settings and native look and feel,
    and of adopting those changes for App.

    Thanks,



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.