popup dialog in qml
-
wrote on 29 Jun 2017, 09:06 last edited by
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.
-
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.
@DivyaMuthyala
your search seems to be broken -> QML Popup -
wrote on 3 Jul 2017, 11:10 last edited by
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
-
wrote on 4 Jul 2017, 04:57 last edited by
Hi,
Please give me solution for above post.
Thanks in advance.
-
Hi,
Please give me solution for above post.
Thanks in advance.
@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.- create the QML Popup type
- place a line edit/text element and a button/Rectangle
- on the button click open a file dialog
- 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
-
wrote on 4 Jul 2017, 07:14 last edited by
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. -
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.@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
-
wrote on 4 Jul 2017, 08:03 last edited by
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?
-
wrote on 4 Jul 2017, 09:53 last edited by GTDev 7 Apr 2017, 09:53
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 -
wrote on 4 Jul 2017, 10:27 last edited by
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.
10/10