I wanted to read the styleSheet from the top level (QMainWindow). It works fine when I run the app, but during the designer phase my widget can't seem to find the top window through the method: window()

Is there a way to get around this whilst in the designer?