Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Button Click Signal to make a pop- up window
Forum Updated to NodeBB v4.3 + New Features

Button Click Signal to make a pop- up window

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 4.5k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hashtagNoob
    wrote on last edited by
    #1

    Hi,

    I saw a couple of topics about this but I didn't exactly understand so I'm making this one to ask.

    I'm using Qt Quick and as suggested in the tutorial I made different .qml for every button.

    I want when the button is clicked to make a window pop- up. What should I write after @ onClicked: @

    in the mouseArea.

    Also how to make a second window (the pop- up one), what should I add to the project so I can design it like the main one. I read that I have to make a class that inherits with QWidget but I need a bit more information. A short example would be great.

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      You could use "Dialog":http://qt-project.org/doc/qt-5/qml-qtquick-dialogs-dialog.html component as a Popup Window. Use "open()":http://qt-project.org/doc/qt-5/qml-qtquick-dialogs-dialog.html#open-method to show it.

      bq. I want when the button is clicked to make a window pop- up. What should I write after onClicked:

      You can access the Dialog component by it's id. So for eg.
      @
      onClicked: mydialog.open()
      @

      bq. I read that I have to make a class that inherits with QWidget but I need a bit more information.

      If using QML it's better to stick to QML components to avoid unnecessary complexity.

      157

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hashtagNoob
        wrote on last edited by
        #3

        Yes now I understand, thank you.

        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