本文整理汇总了Python中PySide.QtGui.QSlider.setOrientation方法的典型用法代码示例。如果您正苦于以下问题:Python QSlider.setOrientation方法的具体用法?Python QSlider.setOrientation怎么用?Python QSlider.setOrientation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QSlider
的用法示例。
在下文中一共展示了QSlider.setOrientation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide.QtGui import QSlider [as 别名]
# 或者: from PySide.QtGui.QSlider import setOrientation [as 别名]
def __init__(self, *args, **kwargs ):
self.minimum = 1
self.maximum = 100
self.lineEditMaximum = 10000
QMainWindow.__init__( self, *args, **kwargs )
self.installEventFilter( self )
#self.setWindowFlags( QtCore.Qt.Drawer )
self.setWindowTitle( Window_global.title )
widgetMain = QWidget()
layoutVertical = QVBoxLayout( widgetMain )
self.setCentralWidget( widgetMain )
layoutSlider = QHBoxLayout()
lineEdit = QLineEdit(); lineEdit.setFixedWidth( 100 )
lineEdit.setText( str( 1 ) )
validator = QIntValidator(self.minimum, self.lineEditMaximum, self)
lineEdit.setValidator( validator )
slider = QSlider(); slider.setOrientation( QtCore.Qt.Horizontal )
slider.setMinimum( self.minimum )
slider.setMaximum( self.maximum )
layoutSlider.addWidget( lineEdit )
layoutSlider.addWidget( slider )
layoutAngle = QVBoxLayout()
checkBox = QCheckBox( 'Connect Angle By Tangent' )
layoutVector = QHBoxLayout()
leVx = QLineEdit(); leVx.setText( str( 1.000 ) ); leVx.setEnabled( False )
leVx.setValidator( QDoubleValidator( -100, 100, 5, self ) )
leVy = QLineEdit(); leVy.setText( str( 0.000 ) ); leVy.setEnabled( False )
leVy.setValidator( QDoubleValidator( -100, 100, 5, self ) )
leVz = QLineEdit(); leVz.setText( str( 0.000 ) ); leVz.setEnabled( False )
leVz.setValidator( QDoubleValidator( -100, 100, 5, self ) )
layoutAngle.addWidget( checkBox )
layoutAngle.addLayout( layoutVector )
layoutVector.addWidget( leVx ); layoutVector.addWidget( leVy ); layoutVector.addWidget( leVz )
button = QPushButton( 'Create' )
layoutVertical.addLayout( layoutSlider )
layoutVertical.addLayout( layoutAngle )
layoutVertical.addWidget( button )
QtCore.QObject.connect( slider, QtCore.SIGNAL('valueChanged(int)'), self.sliderValueChanged )
QtCore.QObject.connect( lineEdit, QtCore.SIGNAL('textEdited(QString)'), self.lineEditValueChanged )
QtCore.QObject.connect( button, QtCore.SIGNAL('clicked()'), Functions.createPointOnCurve )
QtCore.QObject.connect( checkBox, QtCore.SIGNAL( 'clicked()'), Functions.setAngleEnabled )
self.slider = slider
self.lineEdit = lineEdit
Window_global.slider = slider
Window_global.button = button
Window_global.checkBox = checkBox
Window_global.leVx = leVx
Window_global.leVy = leVy
Window_global.leVz = leVz