Qt Signals and Slots
Qt Signals and Slots
3 Answers 3 Don't do it like this, hide your button in the class A, emit your own defined signal from class A lets call it OnButtonClicked
Due to the weak couplings of the Qt signals and slot mechanisms, it is viable to bind signals to each other It may sound confusing, so let me draw a You could also connect these up to things via QObject::connect() but that is out of this snippets scope That is for when you use the signaling
mobile slot free bonus Qt's signals and slots mechanism ensures that if you connect a signal to a slot, the slot will be called with the signal's parameters at the right time Connecting Signals and Slots To setup the signal-slot connection, we must first determine the connection Syntax: connect(sender, SIGNAL, receiver