I need a QDialog to send a signal to redraw the main window.
But to connect, you need an object to connect.
Therefore, I have to create each dialog with a new one and explicitly put connect () every time.
I really need to just send MainWindow :: Redraw () from any function and have one connection () inside Mainwindow to receive them.
But you cannot make the signal static, and dialogs are clearly not inherited from MainWindow.
Editing:
Thank you - I do not want to bypass the signal / slots. I want to get around using the singleton main application pointer, for example afxGetApp (). But I donβt understand how easy it is to send a signal and start it (or down?) In mainwindow, where I will catch it. I portrayed signals / slots as exceptions
source share