Donggyu1998

Untitled

Jun 10th, 2021
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import QtQuick 2.10
  2. import QtQuick.Window 2.10
  3. import QtQuick.Controls 2.3
  4.  
  5. ApplicationWindow{
  6. visible: true;
  7. width: 1280;
  8. height: 720;
  9.  
  10. Dialog {
  11. id: dialog
  12. x:(parent.width-width)/2
  13. y:(parent.height-height)/2
  14. implicitWidth: 500;
  15. implicitHeight: 300;
  16. title: "Title"
  17. modal: true;
  18. standardButtons: Dialog.Ok | Dialog.Cancel
  19.  
  20. onAccepted: console.log("Ok clicked")
  21. onRejected: console.log("Cancel clicked")
  22. }
  23.  
  24. Button{
  25. text: "open";
  26. onClicked: {
  27. dialog.open();
  28. }
  29. }
  30.  
  31. }
Add Comment
Please, Sign In to add comment