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. Reimplement QPushButton released() signal
Qt 6.11 is out! See what's new in the release blog

Reimplement QPushButton released() signal

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 936 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.
  • R Offline
    R Offline
    rfringuello89
    wrote on last edited by
    #1

    Hi, I'd like to reimplement the released() signal of a push button in order to pass a QString to the slot.

    Is it possible to do it in a simple way?

    My current solution is to use another signal emitted inside the slot passing the QString from this single to the final slot.

    I mean:
    released() --->>> slot1()
    slot1() ---EMITS>>> customSignal(QString) --->>> finalSlot(QString)

    I want the following
    released(QString) --->>> finalSlot(QString)

    Thanks a lot

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rfringuello89
      wrote on last edited by
      #2

      I have already seen this:
      "https://qt-project.org/forums/viewthread/5913":https://qt-project.org/forums/viewthread/5913

      and it is not really different from my solution.. I think mine is "faster".

      Other ideas?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You can also catch the QEvent::KeyRelase, reimplement the keyReleaseEvent method

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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