MessageDialog QML Type does not accept common properties



  • Hi everybody!
    I am using this type for generating user confirming actions.
    This is the code I am writing:

    MessageDialog {
            id: messageDialog
            property string titleStr: ''
            property string textStr: ''
    
            title: titleStr
            text: textStr
            standardButtons: StandardButton.Yes | StandardButton.No
            icon: StandardIcon.Question
    
            onYes: {
                ...
            }
    
            onNo: {
                ...
            }
    } 
    

    It is not accepting the properties: title, text, standartButtons... they are in red with (M16) error, but it compiles and I can run it.

    Any reason?


Log in to reply
 

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