submenus.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Laborejo 作者: hilbrichtsoftware 项目源码 文件源码
def __init__(self, mainWindow):
        super().__init__(mainWindow, "")

        self.mainWindow = mainWindow

        self.layout.insertRow(0, QtWidgets.QLabel("Edit Grid"))
        self.duration = CombinedTickWidget()
        self.duration.setValue(constantsAndConfigs.gridRhythm)
        self.layout.addRow("duration in ticks", self.duration)

        self.opacity = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.opacity.setMinimum(0)
        self.opacity.setMaximum(50)
        self.opacityLabel = QtWidgets.QLabel("opacity: {}%".format(int(constantsAndConfigs.gridOpacity * 100)))
        self.layout.addRow(self.opacityLabel, self.opacity)
        self.opacity.valueChanged.connect(lambda: self.opacityLabel.setText("opacity: {}%".format(self.opacity.value())))
        self.opacity.setValue(int(constantsAndConfigs.gridOpacity * 100))
        self.opacity.valueChanged.connect(lambda: self.mainWindow.scoreView.scoreScene.grid.setOpacity(self.opacity.value() / 100)) #only react to changes after the initial value was set.
        self.__call__()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号