當前位置: 首頁>>代碼示例>>Python>>正文


Python QtGui.QRadioButton方法代碼示例

本文整理匯總了Python中PySide.QtGui.QRadioButton方法的典型用法代碼示例。如果您正苦於以下問題:Python QtGui.QRadioButton方法的具體用法?Python QtGui.QRadioButton怎麽用?Python QtGui.QRadioButton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PySide.QtGui的用法示例。


在下文中一共展示了QtGui.QRadioButton方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_QRadioButton

# 需要導入模塊: from PySide import QtGui [as 別名]
# 或者: from PySide.QtGui import QRadioButton [as 別名]
def get_QRadioButton():
    """QRadioButton getter."""

    try:
        import PySide.QtGui as QtGui
        return QtGui.QRadioButton
    except ImportError:
        import PyQt5.QtWidgets as QtWidgets
        return QtWidgets.QRadioButton 
開發者ID:AirbusCyber,項目名稱:grap,代碼行數:11,代碼來源:QtShim.py

示例2: __init__

# 需要導入模塊: from PySide import QtGui [as 別名]
# 或者: from PySide.QtGui import QRadioButton [as 別名]
def __init__(self, *args, **kwargs):
            QtGui.QRadioButton.__init__(self)
            Custom.__init__(self, *args, **kwargs) 
開發者ID:mwisslead,項目名稱:vfp2py,代碼行數:5,代碼來源:vfpfunc.py

示例3: setupUi

# 需要導入模塊: from PySide import QtGui [as 別名]
# 或者: from PySide.QtGui import QRadioButton [as 別名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(186, 154)
        Form.setMaximumSize(QtCore.QSize(200, 16777215))
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 7, 0, 1, 2)
        self.linkCombo = QtGui.QComboBox(Form)
        self.linkCombo.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
        self.linkCombo.setObjectName("linkCombo")
        self.gridLayout.addWidget(self.linkCombo, 7, 2, 1, 2)
        self.autoPercentSpin = QtGui.QSpinBox(Form)
        self.autoPercentSpin.setEnabled(True)
        self.autoPercentSpin.setMinimum(1)
        self.autoPercentSpin.setMaximum(100)
        self.autoPercentSpin.setSingleStep(1)
        self.autoPercentSpin.setProperty("value", 100)
        self.autoPercentSpin.setObjectName("autoPercentSpin")
        self.gridLayout.addWidget(self.autoPercentSpin, 2, 2, 1, 2)
        self.autoRadio = QtGui.QRadioButton(Form)
        self.autoRadio.setChecked(True)
        self.autoRadio.setObjectName("autoRadio")
        self.gridLayout.addWidget(self.autoRadio, 2, 0, 1, 2)
        self.manualRadio = QtGui.QRadioButton(Form)
        self.manualRadio.setObjectName("manualRadio")
        self.gridLayout.addWidget(self.manualRadio, 1, 0, 1, 2)
        self.minText = QtGui.QLineEdit(Form)
        self.minText.setObjectName("minText")
        self.gridLayout.addWidget(self.minText, 1, 2, 1, 1)
        self.maxText = QtGui.QLineEdit(Form)
        self.maxText.setObjectName("maxText")
        self.gridLayout.addWidget(self.maxText, 1, 3, 1, 1)
        self.invertCheck = QtGui.QCheckBox(Form)
        self.invertCheck.setObjectName("invertCheck")
        self.gridLayout.addWidget(self.invertCheck, 5, 0, 1, 4)
        self.mouseCheck = QtGui.QCheckBox(Form)
        self.mouseCheck.setChecked(True)
        self.mouseCheck.setObjectName("mouseCheck")
        self.gridLayout.addWidget(self.mouseCheck, 6, 0, 1, 4)
        self.visibleOnlyCheck = QtGui.QCheckBox(Form)
        self.visibleOnlyCheck.setObjectName("visibleOnlyCheck")
        self.gridLayout.addWidget(self.visibleOnlyCheck, 3, 2, 1, 2)
        self.autoPanCheck = QtGui.QCheckBox(Form)
        self.autoPanCheck.setObjectName("autoPanCheck")
        self.gridLayout.addWidget(self.autoPanCheck, 4, 2, 1, 2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
開發者ID:SrikanthVelpuri,項目名稱:tf-pose,代碼行數:54,代碼來源:axisCtrlTemplate_pyside.py

示例4: __init__

# 需要導入模塊: from PySide import QtGui [as 別名]
# 或者: from PySide.QtGui import QRadioButton [as 別名]
def __init__(self,vobj,fun,fun2,fun4,fun5, *args):
		QtGui.QWidget.__init__(self, *args)
		self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
		self.vobj=vobj
		self.fun=fun
		self.fun2=fun2
		self.fun4=fun4
		self.fun5=fun5
		self.vollabel = QtGui.QLabel(self.vobj.Object.Label)
		self.volvalue = QtGui.QLineEdit()
		self.checkBox = QtGui.QCheckBox()
		self.radioButton = QtGui.QRadioButton()
		self.pushButton = QtGui.QPushButton()
		self.pushButton.clicked.connect(self.on_pushButton_clicked)
		layout = QtGui.QGridLayout()
		layout.addWidget(self.vollabel, 0, 1)
		#layout.addWidget(self.volvalue, 0, 1)
		#layout.addWidget(self.checkBox, 1, 2)
		#layout.addWidget(self.radioButton, 1, 0)

		layout.addWidget(self.pushButton, 1,1)
		if fun2:
			self.pushButton2 = QtGui.QPushButton()
			self.pushButton2.clicked.connect(self.on_pushButton_clicked2)
			layout.addWidget(self.pushButton2, 2,1)
		if False:
			self.pushButton3 = QtGui.QPushButton()
			self.pushButton3.clicked.connect(self.on_pushButton_clicked3)
			layout.addWidget(self.pushButton3, 3,1)

		if True:
			self.pushButton4 = QtGui.QPushButton()
			self.pushButton4.clicked.connect(self.on_pushButton_clicked4)
			layout.addWidget(self.pushButton4, 4,1)

			self.pushButton5 = QtGui.QPushButton()
			self.pushButton5.clicked.connect(self.on_pushButton_clicked5)
			layout.addWidget(self.pushButton5, 5,1)

			self.pushButton6 = QtGui.QPushButton()
			self.pushButton6.clicked.connect(self.on_pushButton_clicked6)
			layout.addWidget(self.pushButton6, 6,1)

		dial = QtGui.QDial()
		dial.setNotchesVisible(True)
		self.dial=dial
		dial.setMaximum(100)
		dial.valueChanged.connect(self.dialer);
		layout.addWidget(dial,7,1)



		if 0:
			# close control dialog
			self.pushButton3 = QtGui.QPushButton()
			self.pushButton3.clicked.connect(self.on_pushButton_clicked)
			layout.addWidget(self.pushButton3, 3,1)
		
		self.setLayout(layout)
		self.setWindowTitle("Animation Manager Control Panel") 
開發者ID:microelly2,項目名稱:Animation,代碼行數:62,代碼來源:Animation.py

示例5: Settings

# 需要導入模塊: from PySide import QtGui [as 別名]
# 或者: from PySide.QtGui import QRadioButton [as 別名]
def Settings(model, gui):    

    class SettingsControl(QtGui.QDialog):
        ''' Class for the Settings Control GUI '''

        def __init__(self):
            QtGui.QDialog.__init__(self)
            self.setModal(False)
            self.setWindowTitle("FMU Settings")            
                        
            _mainGrid = QtGui.QGridLayout(self)

            _ImportFMU = QtGui.QGroupBox("Importing FMUs", self)
            _mainGrid.addWidget(_ImportFMU, 0, 0, 1, 3)
            _ImportFMULayout = QtGui.QGridLayout()
            _ImportFMU.setLayout(_ImportFMULayout)
            _ImportFMULayout.addWidget(QtGui.QLabel("Default FMI type:"), 0, 0)
            
            self.me = QtGui.QRadioButton("Model Exchange", self)            
            _ImportFMULayout.addWidget(self.me, 0, 1)
            self.me.toggled.connect(self.changeToME)
            self.cs = QtGui.QRadioButton("CoSimulation", self)
            _ImportFMULayout.addWidget(self.cs, 0, 2)
            self.cs.toggled.connect(self.changeToCS)
            
            _ImportFMULayout.addWidget(QtGui.QLabel("The default FMI type will be used, if an FMU containing"), 1, 0, 1, 3)
            _ImportFMULayout.addWidget(QtGui.QLabel("both Model Exchange and CoSimulation models is opened."), 2, 0, 1, 3)

            self.closeButton = QtGui.QPushButton("Close", self)
            _mainGrid.addWidget(self.closeButton, 1, 1)
            self.closeButton.clicked.connect(self.close)
            
            if not gui.config['Plugins']['FMU'].has_key('importType'):
                gui.config['Plugins']['FMU']['importType'] = 'me'
                gui.config.write() 
                
            if gui.config['Plugins']['FMU']['importType'] == 'me':
                self.me.setChecked(True)
            else:
                self.cs.setChecked(True)
            
           
        def changeToCS(self):
            gui.config['Plugins']['FMU']['importType'] = 'cs'
            gui.config.write()           
        
        def changeToME(self):
            gui.config['Plugins']['FMU']['importType'] = 'me'
            gui.config.write()
                

    # Code of function
    gui.FMUSettingscontrol = SettingsControl()
    gui.FMUSettingscontrol.show() 
開發者ID:PySimulator,項目名稱:PySimulator,代碼行數:56,代碼來源:FMU.py


注:本文中的PySide.QtGui.QRadioButton方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。