Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved Delete question mark in QML Dialog titlebar

    QML and Qt Quick
    2
    6
    2272
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Locate last edited by A Former User

      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

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User last edited by

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

        1 Reply Last reply Reply Quote 0
        • L
          Locate last edited by

          0_1487339487165_Unbenannt.PNG

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

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @Locate last edited by

            @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).

            1 Reply Last reply Reply Quote 0
            • L
              Locate last edited by Locate

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

              alt text

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post