Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How Can I add pressed() signal to Qdialog ?

How Can I add pressed() signal to Qdialog ?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.1k Views
  • 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.
  • Z Offline
    Z Offline
    zeroptr
    wrote on last edited by
    #1

    Hi All,

    How can I add pressed() signal to Qdialog ?

    is there any way?

    Linux Mint 20.04 64 Bit QT6.0.1

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      What you mean?
      You want a completely empty dialog where it will signal Pressed if u click anywhere?

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zeroptr
        wrote on last edited by
        #3

        No of course it's not completely empty.. There are many widgets on the Qdialog buttons progressbars etc.. But I want to catch if user press on dialog on an empty space..

        Linux Mint 20.04 64 Bit QT6.0.1

        mrjjM 1 Reply Last reply
        0
        • Z zeroptr

          No of course it's not completely empty.. There are many widgets on the Qdialog buttons progressbars etc.. But I want to catch if user press on dialog on an empty space..

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @zeroptr
          Ahh
          well you can override
          mousePressEvent
          to catch such clicking

          void yourdiaog::mousePressEvent(QMouseEvent *event)

          1 Reply Last reply
          1
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            oh
            and if u want a signal
            just define it
            and then
            emit DialogPressed()

            if you want to connect to this signal from "outside"

            1 Reply Last reply
            1
            • Z Offline
              Z Offline
              zeroptr
              wrote on last edited by
              #6

              :mousePressEvent(QMouseEvent *event) solved the issue thanks...

              Linux Mint 20.04 64 Bit QT6.0.1

              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