Solved 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? -
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

. -
Here is a link for the Image https://s3.postimg.org/dkjhdm0ab/Unbenannt.png
-
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.