Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to get event properties
QtWS25 Last Chance

How to get event properties

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 763 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.
  • M Offline
    M Offline
    mvenkat061
    wrote on last edited by
    #1

    Hi all,

    How to get event properties in slot i, e how to get signal properties in slot function like on which object signal are generated and its Id, state and window id.

    ex": if i click button how to get properties of button like button Id, mainwindow Id, state...etc..

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Use "QObject::sender()":http://qt-project.org/doc/qt-5/qobject.html#sender and "qobject_cast":http://qt-project.org/doc/qt-5/qobject.html#qobject_cast in a slot to get a pointer to the sender.

      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