Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. The dialog has no icon

The dialog has no icon

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 874 Views
  • 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.
  • B Offline
    B Offline
    BriFuture
    wrote on last edited by
    #1

    QML Application: the dialog and message dialog has different window icon:

    7719aaf5-3f23-4fa1-8970-7e88c6f72d90-image.png

    As it shows, in the left side, the dialog which is constructed from import QtQuick.Dialogs 1.3 has not window Icon, while the message dialog in the right side got the icon that Application has. And I want to get the right icon in dialog, so what can achieve that?

    Codes are here:

        Dialog {
            title: "This is a dialog"
            Text { text: "This is a dialog" }
            modality: Qt.NonModal
            Component.onCompleted: visible = true
        }
        MessageDialog {
            title: "This is a message dialog"
            modality: Qt.NonModal
            visible: true
            text: "It's so cool that you are using Qt Quick."
            onAccepted: {
                console.log("And of course you could only agree.")
                Qt.quit()
            }
            Component.onCompleted: visible = true
        }
    
    1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by
      #2

      Your question is possibly a duplicate of;

      https://forum.qt.io/topic/54440/icon-dialog

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BriFuture
        wrote on last edited by
        #3

        I think it maybe similar situation that the post described.
        I did set application window by

        app.setWindowIcon("qrc:/icon.ico")
        

        but in the .pro file the RC_ICON is set as well.
        The icon did not show on Dialog component but MessageDialog did.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved