Delete question mark in QML Dialog titlebar



  • I am using Qt 5.7. In my QML project I have several dialogs. In the titlebar of this dialogs there is a question mark under Windows. Under Mac there is no question mark. Is there a possibility to remove this question marks? Or alternatively is there a Signal to connect a Slot when the question mark is clicked?
    My Dialog is something like this:

    Dialog {
        property string appVersion: ""
        property color buttonColor: "#000000"
        property string branding: ""
    
        id: dlgAppInfo
        visible: true;
        modality: Qt.ApplicationModal
        width: 520
        height: 300
    
        signal signalClose()
        signal signalUpdate(bool silent)
    
        onVisibleChanged: {
            signalClose()
        }
    
        contentItem: Rectangle {
            x: 20
            y: 20
    
    //My components
    }
    }
    

    Edit: Added code tags -- @Wieland



  • Hi! Not sure what question mark you're speaking of. Maybe it goes away when you set the title property of the Dialog?



  • 0_1487339487165_Unbenannt.PNG

    Here is a screenshot of such a Dialog. I have marked the question mark. The title property is set.



  • @Locate The image upload feature on our forum is broken (the image might be visible to you but not to anyone else). Please use an image hoster (e.g. https://postimage.io) and embed the file here with ![alternate text](url).



  • Here is a link for the Image https://s3.postimg.org/dkjhdm0ab/Unbenannt.png

    alt text



  • I don't think one can customize that for a Dialog. What you could do is to use a Window QML Type as the foundation for your own dialog item. You can customize almost everything with Window. You can change the buttons in the title by modifying the flags property. A list with all window flags can be found here: flags Qt::WindowFlags. And there's also the Window Flags Example.


Log in to reply
 

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