Separate main window and Qt buffer