Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Multiple message box
Qt 6.12 LTS is out! See what's new in the release blog

Multiple message box

Scheduled Pinned Locked Moved Solved QML and Qt Quick
13 Posts 2 Posters 3.0k Views 1 Watching
  • 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.
  • p3c0P Offline
    p3c0P Offline
    p3c0
    Moderators
    wrote on last edited by
    #2

    @karti-gesar Can you show us what you tried ?

    157

    1 Reply Last reply
    0
    • K Offline
      K Offline
      karti gesar
      wrote on last edited by p3c0
      #3
       Button
          {
              id:btnConfig
                width:80
              height:30
              text: "Config"
              onClicked:
              {
                     if(plytxt.text!=txt_Player_id)
                  {
                  console.log("Incorrect playerid ")
      // messagebox
                  }
                  else if(usertxt.text!=txt_User_name)
                  {
                  console.log("Incorrect user")
      //messagebox
                  }
      }
      
      1 Reply Last reply
      0
      • p3c0P Offline
        p3c0P Offline
        p3c0
        Moderators
        wrote on last edited by
        #4

        http://doc.qt.io/qt-5/qml-qtquick-dialogs-messagedialog.html

        157

        1 Reply Last reply
        0
        • K Offline
          K Offline
          karti gesar
          wrote on last edited by
          #5

          MessageDialog {
          id: messageDialog
          title: "Alert"
          text: "Please Enter Correct PlayerId"
          onAccepted: {
          console.log(" ok")

              }
              Component.onCompleted: visible =true
          }
          

          this i used

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #6

            Any errors?

            157

            1 Reply Last reply
            0
            • K Offline
              K Offline
              karti gesar
              wrote on last edited by
              #7

              without pressing button messagebox appears

              1 Reply Last reply
              0
              • p3c0P Offline
                p3c0P Offline
                p3c0
                Moderators
                wrote on last edited by
                #8

                Due to this:
                Component.onCompleted: visible =true

                157

                1 Reply Last reply
                1
                • K Offline
                  K Offline
                  karti gesar
                  wrote on last edited by
                  #9

                  that line used

                  1 Reply Last reply
                  0
                  • p3c0P Offline
                    p3c0P Offline
                    p3c0
                    Moderators
                    wrote on last edited by
                    #10

                    dont use that line like that

                    157

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      karti gesar
                      wrote on last edited by
                      #11

                      in below line i have commented message box know there that line want to use ah

                      1 Reply Last reply
                      0
                      • p3c0P Offline
                        p3c0P Offline
                        p3c0
                        Moderators
                        wrote on last edited by
                        #12

                        open the MessageDialog when required

                        157

                        1 Reply Last reply
                        1
                        • K Offline
                          K Offline
                          karti gesar
                          wrote on last edited by
                          #13

                          when help of message box id i got it thank u for reply..

                          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
                          • Unsolved