Multiple message box
Moved
Solved
QML and Qt Quick
-
Hi all...suppose i have two textarea and one button
when i press button textarea should not be empty ..if empty it should alert with mesage box ..how to use -
@karti-gesar Can you show us what you tried ?
-
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 } }
-
-
MessageDialog {
id: messageDialog
title: "Alert"
text: "Please Enter Correct PlayerId"
onAccepted: {
console.log(" ok")} Component.onCompleted: visible =true }
this i used
-
Any errors?
-
without pressing button messagebox appears
-
Due to this:
Component.onCompleted: visible =true
-
that line used
-
dont use that line like that
-
in below line i have commented message box know there that line want to use ah
-
when help of message box id i got it thank u for reply..