Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. popup dialog in qml
QtWS25 Last Chance

popup dialog in qml

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 7.0k 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.
  • D Offline
    D Offline
    DivyaMuthyala
    wrote on last edited by
    #1

    Hi,

    I am new to qml and i need a popup dialog with browse button using qml code. I need a dialog as popup with browse button option and after click browse button file browsing functionality should happen,

    Give me solution to create a popup dialog.

    thanks in advance.

    raven-worxR 1 Reply Last reply
    0
    • D DivyaMuthyala

      Hi,

      I am new to qml and i need a popup dialog with browse button using qml code. I need a dialog as popup with browse button option and after click browse button file browsing functionality should happen,

      Give me solution to create a popup dialog.

      thanks in advance.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @DivyaMuthyala
      your search seems to be broken -> QML Popup

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • D Offline
        D Offline
        DivyaMuthyala
        wrote on last edited by
        #3

        Hi ,

        Yes, but I required one lineedit and one button, and when we click the button with text browse and when we click that button file browsing should happen.

        Please share me code for this requirement.

        Thanks in advance

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DivyaMuthyala
          wrote on last edited by
          #4

          Hi,

          Please give me solution for above post.

          Thanks in advance.

          raven-worxR 1 Reply Last reply
          0
          • D DivyaMuthyala

            Hi,

            Please give me solution for above post.

            Thanks in advance.

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @DivyaMuthyala
            sorry i wont post the whole code here, but give some hints how to start, since those are actually pretty easy QML basics to achieve what you want.

            1. create the QML Popup type
            2. place a line edit/text element and a button/Rectangle
            3. on the button click open a file dialog
            4. set the selected path to the line edit (see file dialogs accepted signal)

            the docs should quickly show how to use the elements and help you get what you want

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            2
            • D Offline
              D Offline
              DivyaMuthyala
              wrote on last edited by
              #6

              Hi raven-worx,

              Thanks for the reply, I am very new to qml.

              So I required that part of code, please share me code.
              thanks in advance.

              raven-worxR 1 Reply Last reply
              0
              • D DivyaMuthyala

                Hi raven-worx,

                Thanks for the reply, I am very new to qml.

                So I required that part of code, please share me code.
                thanks in advance.

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @DivyaMuthyala said in popup dialog in qml:

                Thanks for the reply, I am very new to qml.

                i don't want to be rude, but this is a perfect example to start learning QML

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                1
                • D Offline
                  D Offline
                  DivyaMuthyala
                  wrote on last edited by
                  #8

                  Hi raven-worx,

                  I have made my code, but here my doubt is it is coming like window with maximize minimize and close buttons, here i should not require those, how to avoid those?

                  1 Reply Last reply
                  0
                  • GTDevG Offline
                    GTDevG Offline
                    GTDev
                    wrote on last edited by GTDev
                    #9

                    Hi!

                    To use popups in your QML app, you can also have a look at V-Play Engine for Qt-based mobile apps and games.

                    It is possible to trigger native device dialogs on Android and iOS, for example with NativeDialog::confirm. For QML-based dialogs you can use the InputDialog features, or create a custom Dialog component, which comes with a ready-made styling that matches iOS dialogs.

                    Here's a short usage example:

                    import VPlayApps 1.0
                    import QtQuick 2.5
                    
                    App {
                    
                      // Buttons to trigger dialogs
                      Column {
                    
                        AppButton {
                          text: "Show Custom Dialog"
                          onClicked: customDialog.open()
                        }
                    
                        AppButton {
                          text: "Show Native Dialog"
                          onClicked: NativeDialog.confirm("Native Dialog", "Description", function(accepted) {
                             if(accepted) {
                               /* do something */
                             }
                          })
                    
                        }
                      }
                    
                      // Custom Dialog with Text
                      Dialog {
                        id: customDialog
                        title: "Custom Dialog"
                        negativeAction: false // hide "Cancel" button of dialog
                    
                        onAccepted: {
                          /* do something */
                          customDialog.close()
                        }
                    
                        AppText {
                          anchors.centerIn: parent
                          text: "This is a custom Dialog"
                        }
                      }
                    
                    }
                    

                    Cheers,
                    GT

                    Senior Developer at Felgo - https://felgo.com/qt

                    Develop mobile Apps for iOS & Android with Qt
                    Felgo is an official Qt Technology Partner

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      DivyaMuthyala
                      wrote on last edited by
                      #10

                      Hi,

                      Thanks for the reply.

                      Now I have created my own popup in qml as PopUp.qml, now i want to give this as input in dialog in other qml file.
                      Can you please help me.

                      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