By default, QDialog windows have a question mark pushbutton in the upper-right corner. When I press it, the mouse cursor is changed to the \'Forbidden\' cursor,
It is not a button documented by Qt. You can detect this by catching events and checking event type:
http://qt-project.org/doc/qt-5/qevent.html#Type-enum
There are different types as QEvent::EnterWhatsThisMode QEvent::WhatsThisClicked and so on. I achieved something similar to what are you looking for using event filter in mainwindow.
if(event->type() == QEvent::EnterWhatsThisMode)
qDebug() << "click";
I saw "click" when I clicked on ? button.