(self, parent=None)
主内容区，包括推荐歌单等。
主内容区，包括推荐歌单等。
主内容区，包括推荐歌单等。
def __init__(self, parent=None):
        """主内容区，包括推荐歌单等。"""
        super(MainContent, self).__init__()
        self.parent = parent
        self.setObjectName("MainContent")

        # 连接导航栏的按钮。
        # self.parent.navigation.navigationListFunction = self.navigationListFunction
        with open("QSS/mainContent.qss", 'r', encoding='utf-8') as f:
            self.style = f.read()
            self.setStyleSheet(self.style)

        self.tab = QTabWidget()
        self.tab.setObjectName("contentsTab")

        self.mainLayout = QVBoxLayout()
        self.mainLayout.setSpacing(0)
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.mainLayout.addWidget(self.tab)

        self.frame.setLayout(self.mainLayout)
def __init__ ( self , parent = None ) : super ( MainContent , self ) . __init__ ( ) self . parent = parent self . setObjectName ( "MainContent" ) # 连接导航栏的按钮。 # self.parent.navigation.navigationListFunction = self.navigationListFunction with open ( "QSS/mainContent.qss" , 'r' , encoding = 'utf-8' ) as f : self . style = f . read ( ) self . setStyleSheet ( self . style ) self . tab = QTabWidget ( ) self . tab . setObjectName ( "contentsTab" ) self . mainLayout = QVBoxLayout ( ) self . mainLayout . setSpacing ( 0 ) self . mainLayout . setContentsMargins ( 0 , 0 , 0 , 0 ) self . mainLayout . addWidget ( self . tab ) self . frame . setLayout ( self . mainLayout )