'Create a QMainWindow instance containing this plugin.
Note: this method is currently not used in Spyder core plugins'

def create_mainwindow(self):

    self.mainwindow = mainwindow = QMainWindow()
    mainwindow.setAttribute(Qt.WA_DeleteOnClose)
    icon = self.get_plugin_icon()
    if is_text_string(icon):
        icon = self.get_icon(icon)
    mainwindow.setWindowIcon(icon)
    mainwindow.setWindowTitle(self.get_plugin_title())
    mainwindow.setCentralWidget(self)
    self.refresh_plugin()
    return mainwindow
