(self)
布局。
布局。
布局。
def setLayouts(self):
        """布局。"""
        self.mainLayout = QHBoxLayout()
        self.mainLayout.setContentsMargins(0, 0, 0, 0)

        self.musicInfo = QVBoxLayout()
        self.mainLayout.setContentsMargins(0, 0, 0, 0)

        self.musicInfo.addWidget(self.musicName)
        self.musicInfo.addWidget(self.musicAuthor)

        self.mainLayout.addWidget(self.musicPic)
        self.mainLayout.addLayout(self.musicInfo)

        self.mainLayout.setStretch(0, 1)
        self.mainLayout.setStretch(1, 2)

        self.setLayout(self.mainLayout)
def setLayouts ( self ) : self . mainLayout = QHBoxLayout ( ) self . mainLayout . setContentsMargins ( 0 , 0 , 0 , 0 ) self . musicInfo = QVBoxLayout ( ) self . mainLayout . setContentsMargins ( 0 , 0 , 0 , 0 ) self . musicInfo . addWidget ( self . musicName ) self . musicInfo . addWidget ( self . musicAuthor ) self . mainLayout . addWidget ( self . musicPic ) self . mainLayout . addLayout ( self . musicInfo ) self . mainLayout . setStretch ( 0 , 1 ) self . mainLayout . setStretch ( 1 , 2 ) self . setLayout ( self . mainLayout )