YAPPO
YAPPO

Reputation: 173

Dynamic connecting/disconnecting signals and slots

My program has two states and it can switch between them for some reasons. In these states the program needs to receive different signals, which means it has to connect and disconnect certain signals during the run.

How bad is such approach?

Upvotes: 2

Views: 1067

Answers (1)

Nicholas Smith
Nicholas Smith

Reputation: 11754

It's a fine approach, I've used it before without issues. Depending on what you're actually doing a QSignalMapper might be of use for you.

Upvotes: 1

Related Questions