LoginSignupPopup.ui.qml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import QtQuick 2.4
  2. import QtQuick.Controls 2.3
  3. import QtQuick.Layouts 1.3
  4. Popup {
  5. id: popup
  6. height: 450
  7. dim: true
  8. clip: false
  9. width: 400
  10. modal: true
  11. focus: true
  12. closePolicy: Popup.NoAutoClose
  13. anchors.centerIn: Overlay.overlay
  14. Connections {
  15. target: _qmlHandler
  16. onLoginSignupPopupClose: {
  17. popup.close()
  18. }
  19. onLoginSignupPopupOpen: {
  20. popup.open()
  21. }
  22. }
  23. Page {
  24. anchors.fill: parent
  25. header: TabBar {
  26. id: header
  27. currentIndex: swipeView.currentIndex
  28. contentHeight: 50
  29. TabButton {
  30. text: qsTr("Login")
  31. }
  32. TabButton {
  33. text: qsTr("Signup")
  34. }
  35. }
  36. SwipeView {
  37. id: swipeView
  38. anchors.fill: parent
  39. currentIndex: header.currentIndex
  40. clip: true
  41. LoginForm {
  42. }
  43. SignupForm {
  44. }
  45. }
  46. }
  47. Component.onCompleted: {
  48. swipeView.interactive = false
  49. }
  50. }