本文整理汇总了Python中PyQt5.QtWidgets.QSlider.setMinimumHeight方法的典型用法代码示例。如果您正苦于以下问题:Python QSlider.setMinimumHeight方法的具体用法?Python QSlider.setMinimumHeight怎么用?Python QSlider.setMinimumHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QSlider
的用法示例。
在下文中一共展示了QSlider.setMinimumHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EditorGUI
# 需要导入模块: from PyQt5.QtWidgets import QSlider [as 别名]
# 或者: from PyQt5.QtWidgets.QSlider import setMinimumHeight [as 别名]
#.........这里部分代码省略.........
#transformation filter
self.imageselector2.imagebar.setTransformer(self.thumbtransformer)
self.imageselector2.setThumbs(cv2thumbs)
self.lastupdatethumbs = time.time()
def make_layout(self):
# layout
layout = QHBoxLayout()
#second left panel for image rotation
rotation_layout = QHBoxLayout()
self.btn = QPushButton(self.tr("-90"))
self.btn.clicked.connect(self.angle_sub90)
rotation_layout.addWidget(self.btn)
self.btn = QPushButton(self.tr("-1"))
self.btn.clicked.connect(self.angle_dec)
rotation_layout.addWidget(self.btn)
rotation_layout.addWidget(QLabel(self.tr('rotation')))
self.angle_label = QLabel("0 "+self.tr("degrees"))
rotation_layout.addWidget(self.angle_label)
self.btn = QPushButton(self.tr("+1"))
self.btn.clicked.connect(self.angle_inc)
rotation_layout.addWidget(self.btn)
self.btn = QPushButton(self.tr("+90"))
self.btn.clicked.connect(self.angle_add90)
rotation_layout.addWidget(self.btn)
#
crop_layout = QVBoxLayout()
self.croptop_slider = QSlider(Qt.Vertical) # スライダの向き
self.croptop_slider.setRange(0, 1000) # スライダの範囲
self.croptop_slider.setValue(1000) # 初期値
self.croptop_slider.valueChanged.connect(self.croptop_slider_on_draw)
self.croptop_slider.setMinimumHeight(240)
#print(self.croptop_slider.size())
crop_layout.addWidget(self.croptop_slider)
crop_layout.setAlignment(self.croptop_slider, Qt.AlignTop)
self.cropbottom_slider = QSlider(Qt.Vertical) # スライダの向き
self.cropbottom_slider.setRange(0, 1000) # スライダの範囲
self.cropbottom_slider.setValue(0) # 初期値 499 is top
self.cropbottom_slider.valueChanged.connect(self.cropbottom_slider_on_draw)
self.cropbottom_slider.setMinimumHeight(240)
crop_layout.addWidget(self.cropbottom_slider)
crop_layout.setAlignment(self.cropbottom_slider, Qt.AlignBottom)
perspective_left_layout = QVBoxLayout()
self.sliderTL = QSlider(Qt.Vertical) # スライダの向き
self.sliderTL.setRange(0, 1000) # スライダの範囲
self.sliderTL.setValue(1000) # 初期値
#sizepolicy = QSizePolicy()
#sizepolicy.setVerticalPolicy(QSizePolicy.Maximum)
#self.sliderTL.setSizePolicy(sizepolicy)
self.sliderTL.valueChanged.connect(self.sliderTL_on_draw)
self.sliderTL.setMinimumHeight(240)
perspective_left_layout.addWidget(self.sliderTL)
perspective_left_layout.setAlignment(self.sliderTL, Qt.AlignTop)
self.sliderBL = QSlider(Qt.Vertical) # スライダの向き
self.sliderBL.setRange(0, 1000) # スライダの範囲
self.sliderBL.setValue(0) # 初期値 499 is top
self.sliderBL.valueChanged.connect(self.sliderBL_on_draw)
self.sliderBL.setMinimumHeight(240)
perspective_left_layout.addWidget(self.sliderBL)
perspective_left_layout.setAlignment(self.sliderBL, Qt.AlignBottom)