Does anyone know if it's possible to pass a pointer to the mainwindow of an application (that is, the application's specific subclass of QMainWindow) into a plugin then use the pointer to call methods in the MainWindow? For example, if I define a method in my MainWindow called drawImage(), can I call this from a plugin?

I am getting really confused and have been trying to get my code to work for days now. Rather than go into detail about all the things I have tried, I thought I would ask the general question first, then get to the specifics based on the response (if any).