You can set an event filter on QObject instances.
Therefore, if you want to be notified of changes in WindowsTitle, you can install an eventfilter that captures QEvent :: WindowTitleChange events.
For instance:
class WindowsTitleWatcher : public QObject { Q_OBJECT public: WindowsTitleWatcher(QObject *parent) : QObject(parent) { } signals: void titleChanged(const QString& title); protected: bool eventFilter(QObject *obj, QEvent *event){ if(event->type()==QEvent::WindowTitleChange) { QWidget *const window = qobject_cast<QWidget *>(obj); if(window) emit titleChanged(window->windowTitle()); } return QObject::eventFilter(obj, event); } };
source share