My thinking was that if it's really a "plugin", it shouldn't be accessing anything from the class (yes, it needs to connect to the barcodeDecoded function, but that doesn't need to pointer; that's the magic of Qt's slots/signals.) At least, none of the current plugins require anything from the MainWindow class...