本文整理汇总了Python中PySide.QtGui.QComboBox.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QComboBox.setObjectName方法的具体用法?Python QComboBox.setObjectName怎么用?Python QComboBox.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QComboBox
的用法示例。
在下文中一共展示了QComboBox.setObjectName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MainWindow
# 需要导入模块: from PySide.QtGui import QComboBox [as 别名]
# 或者: from PySide.QtGui.QComboBox import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
lbMinWidth = 65
# leMinWidth = 200
MainWindow.setObjectName("MainWindow")
MainWindow.resize(400, 310)
# self.centralwidget = QWidget(MainWindow)
self.mainSplitter = QSplitter(Qt.Horizontal, MainWindow)
self.mainSplitter.setObjectName("centralwidget")
self.mainSplitter.setProperty("childrenCollapsible", False)
MainWindow.setCentralWidget(self.mainSplitter)
self.leftSplitter = QSplitter(Qt.Vertical, self.mainSplitter)
self.leftSplitter.setProperty("childrenCollapsible", False)
##### login_gbox
self.login_gbox = QGroupBox(self.leftSplitter)
self.login_gbox.setFlat(True)
self.login_gbox.setObjectName("login_gbox")
login_gbox_layout = QVBoxLayout(self.login_gbox)
login_gbox_csf_layout = QHBoxLayout()
login_gbox_account_layout = QHBoxLayout()
login_gbox_connect_layout = QHBoxLayout()
login_gbox_layout.addLayout(login_gbox_csf_layout)
login_gbox_layout.addLayout(login_gbox_account_layout)
login_gbox_layout.addLayout(login_gbox_connect_layout)
self.lb_client_secrets_file_path = QLabel(self.login_gbox)
self.lb_client_secrets_file_path.setObjectName("lb_client_secrets_file_path")
self.lb_client_secrets_file_path.setMinimumWidth(lbMinWidth)
self.client_secrets_file_path_le = QLineEdit(self.login_gbox)
self.client_secrets_file_path_le.setObjectName("client_secrets_file_path_le")
self.client_secret_file_path_tBtn = QToolButton(self.login_gbox)
self.client_secret_file_path_tBtn.setObjectName("client_secret_file_path_tBtn")
login_gbox_csf_layout.addWidget(self.lb_client_secrets_file_path)
login_gbox_csf_layout.addWidget(self.client_secrets_file_path_le)
login_gbox_csf_layout.addWidget(self.client_secret_file_path_tBtn)
self.lb_account = QLabel(self.login_gbox)
self.lb_account.setMaximumWidth(lbMinWidth)
self.lb_account.setObjectName("lb_account")
self.remove_account_btn = QToolButton(self.login_gbox)
self.remove_account_btn.setObjectName("remove_account_btn")
self.remove_account_btn.setMinimumWidth(20)
self.remove_account_btn.setEnabled(False)
self.add_account_btn = QToolButton(self.login_gbox)
self.add_account_btn.setObjectName("add_account_btn")
self.add_account_btn.setMinimumWidth(20)
self.accounts_cb = QComboBox(self.login_gbox)
self.accounts_cb.setObjectName("accounts_cb")
login_gbox_account_layout.addWidget(self.lb_account)
login_gbox_account_layout.addWidget(self.remove_account_btn)
login_gbox_account_layout.addWidget(self.add_account_btn)
login_gbox_account_layout.addWidget(self.accounts_cb)
self.lb_decryption_key = QLabel(self.login_gbox)
self.lb_decryption_key.setObjectName("lb_decryption_key")
self.lb_decryption_key.setMinimumWidth(lbMinWidth)
self.lb_decryption_key.hide()
self.decryption_key_le = QLineEdit(self.login_gbox)
self.decryption_key_le.setEchoMode(QLineEdit.Password)
self.decryption_key_le.setObjectName("decryption_key_le")
self.decryption_key_le.hide()
self.connect_btn = QPushButton(self.login_gbox)
self.connect_btn.setEnabled(False)
self.connect_btn.setObjectName("connect_btn")
login_gbox_connect_layout.addWidget(self.lb_decryption_key)
login_gbox_connect_layout.addWidget(self.decryption_key_le)
login_gbox_connect_layout.addWidget(self.connect_btn)
#### search_gbox
self.search_gbox = QGroupBox(self.leftSplitter)
self.search_gbox.setFlat(True)
self.search_gbox.setObjectName("search_gbox")
self.search_gbox.hide()
search_gbox_layout = QVBoxLayout(self.search_gbox)
search_gbox_mailbox_layout = QVBoxLayout()
search_gbox_date_layout = QHBoxLayout()
search_gbox_from_layout = QHBoxLayout()
search_gbox_to_layout = QHBoxLayout()
search_gbox_subject_layout = QHBoxLayout()
search_gbox_threads_layout = QHBoxLayout()
search_gbox_paramaters_layout = QHBoxLayout()
search_gbox_layout.addLayout(search_gbox_mailbox_layout)
search_gbox_layout.addLayout(search_gbox_date_layout)
#.........这里部分代码省略.........
示例2: Ui_MainWindow
# 需要导入模块: from PySide.QtGui import QComboBox [as 别名]
# 或者: from PySide.QtGui.QComboBox import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(810, 492)
lbMinWidth = 65
lbMinWidthLogin = 110
# leMinWidth = 200
# self.centralwidget = QWidget(MainWindow)
self.mainSplitter = QSplitter(Qt.Horizontal, MainWindow)
self.mainSplitter.setObjectName("centralwidget")
self.mainSplitter.setProperty("childrenCollapsible", False)
MainWindow.setCentralWidget(self.mainSplitter)
self.leftSplitter = QSplitter(Qt.Vertical, self.mainSplitter)
self.leftSplitter.setProperty("childrenCollapsible", False)
# login_gbox
self.login_gbox = QGroupBox(self.leftSplitter)
self.login_gbox.setFlat(True)
self.login_gbox.setObjectName("login_gbox")
login_gbox_layout = QVBoxLayout(self.login_gbox)
login_gbox_presets_layout = QHBoxLayout()
login_gbox_server_layout = QHBoxLayout()
login_gbox_ssl_layout = QHBoxLayout()
login_gbox_address_layout = QHBoxLayout()
login_gbox_pass_layout = QHBoxLayout()
login_gbox_connect_layout = QHBoxLayout()
login_gbox_layout.addLayout(login_gbox_presets_layout)
login_gbox_layout.addLayout(login_gbox_server_layout)
login_gbox_layout.addLayout(login_gbox_ssl_layout)
login_gbox_layout.addLayout(login_gbox_address_layout)
login_gbox_layout.addLayout(login_gbox_pass_layout)
login_gbox_layout.addLayout(login_gbox_connect_layout)
self.lb_presets = QLabel(self.login_gbox)
self.lb_presets.setObjectName("lb_presets")
self.lb_presets.setMinimumWidth(lbMinWidthLogin)
self.lb_presets.setMaximumWidth(lbMinWidthLogin)
self.presets_cbox = QComboBox(self.login_gbox)
self.presets_cbox.setObjectName("presets_cbox")
self.add_preset_btn = QPushButton(self.login_gbox)
self.add_preset_btn.setObjectName("add_preset_btn")
self.add_preset_btn.setMaximumWidth(30)
self.remove_preset_btn = QPushButton(self.login_gbox)
self.remove_preset_btn.setObjectName("remove_preset_btn")
self.remove_preset_btn.setMaximumWidth(20)
login_gbox_presets_layout.addWidget(self.lb_presets)
login_gbox_presets_layout.addWidget(self.presets_cbox)
login_gbox_presets_layout.addWidget(self.add_preset_btn)
login_gbox_presets_layout.addWidget(self.remove_preset_btn)
self.lb_imap_server = QLabel(self.login_gbox)
self.lb_imap_server.setObjectName("lb_imap_server")
self.lb_imap_server.setMinimumWidth(lbMinWidthLogin)
self.imap_server_le = QLineEdit(self.login_gbox)
self.imap_server_le.setObjectName("imap_server_le")
login_gbox_server_layout.addWidget(self.lb_imap_server)
login_gbox_server_layout.addWidget(self.imap_server_le)
self.lb_ssl = QLabel(self.login_gbox)
self.lb_ssl.setObjectName("lb_ssl")
self.lb_ssl.setMinimumWidth(lbMinWidthLogin)
self.lb_ssl.setMaximumWidth(lbMinWidthLogin)
self.ssl_cb = QCheckBox(self.login_gbox)
self.ssl_cb.setEnabled(False)
self.ssl_cb.setCheckable(True)
self.ssl_cb.setChecked(True)
self.ssl_cb.setObjectName("ssl_cb")
login_gbox_ssl_layout.addWidget(self.lb_ssl)
login_gbox_ssl_layout.addWidget(self.ssl_cb)
self.lb_adress = QLabel(self.login_gbox)
self.lb_adress.setObjectName("lb_adress")
self.lb_adress.setMinimumWidth(lbMinWidthLogin)
self.adress_le = QLineEdit(self.login_gbox)
self.adress_le.setInputMethodHints(Qt.ImhNone)
self.adress_le.setObjectName("adress_le")
login_gbox_address_layout.addWidget(self.lb_adress)
login_gbox_address_layout.addWidget(self.adress_le)
self.lb_pass = QLabel(self.login_gbox)
self.lb_pass.setObjectName("lb_pass")
self.lb_pass.setMinimumWidth(lbMinWidthLogin)
self.pass_le = QLineEdit(self.login_gbox)
self.pass_le.setText("")
self.pass_le.setEchoMode(QLineEdit.Password)
self.pass_le.setObjectName("pass_le")
login_gbox_pass_layout.addWidget(self.lb_pass)
login_gbox_pass_layout.addWidget(self.pass_le)
self.connect_btn = QPushButton(self.login_gbox)
self.connect_btn.setObjectName("connect_btn")
login_gbox_connect_layout.addStretch()
login_gbox_connect_layout.addWidget(self.connect_btn)
# search_gbox
#.........这里部分代码省略.........
示例3: Ui_MainWindow
# 需要导入模块: from PySide.QtGui import QComboBox [as 别名]
# 或者: from PySide.QtGui.QComboBox import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setFixedSize(800, 600)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.FilterLbl = QLabel(self.centralwidget)
self.FilterLbl.setGeometry(QtCore.QRect(30, 150, 60, 15))
self.FilterLbl.setObjectName("FilterLbl")
self.FilterCB = QComboBox(self.centralwidget)
self.FilterCB.setGeometry(QtCore.QRect(450, 150, 100, 22))
self.FilterCB.setObjectName("FilterCB")
self.FilterCB.addItem("")
self.FilterCB.addItem("")
self.FilterCB.addItem("")
self.FilterCB.addItem("")
self.FilterTF = QLineEdit(self.centralwidget)
self.FilterTF.setGeometry(QtCore.QRect(100, 150, 320, 20))
self.tableView = QTableWidget(self.centralwidget)
self.tableView.setGeometry(QtCore.QRect(10, 180, 781, 511))
self.tableView.setObjectName("tableView")
self.tableView.setColumnCount(4)
self.tableView.setRowCount(0)
item = QTableWidgetItem("Cena za kg/l")
self.tableView.setHorizontalHeaderItem(0, item)
item = QTableWidgetItem("Cena ze kus")
self.tableView.setHorizontalHeaderItem(1, item)
item = QTableWidgetItem(u"Gramaž")
self.tableView.setHorizontalHeaderItem(2, item)
item = QTableWidgetItem("Popis")
item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
font = QtGui.QFont()
font.setPointSize(8)
item.setFont(font)
self.tableView.setHorizontalHeaderItem(3, item)
self.tableView.horizontalHeader().setStretchLastSection(True)
self.SaveBtn = QPushButton(self.centralwidget)
self.SaveBtn.setGeometry(QtCore.QRect(30, 10, 100, 23))
self.SaveBtn.setObjectName("SaveBtn")
self.PrintSelectedToFileBtn = QPushButton(self.centralwidget)
self.PrintSelectedToFileBtn.setGeometry(QtCore.QRect(225, 10, 100, 23))
self.PrintSelectedToFileBtn.setObjectName("PrintSelectedToFileBtn")
self.PriceForUnitTF = QLineEdit(self.centralwidget)
self.PriceForUnitTF.setGeometry(QtCore.QRect(100, 70, 113, 20))
self.PriceForUnitTF.setObjectName("PriceForUnitTF")
self.PriceForUnitLbl = QLabel(self.centralwidget)
self.PriceForUnitLbl.setGeometry(QtCore.QRect(30, 70, 60, 13))
self.PriceForUnitLbl.setObjectName("PriceForUnitLbl")
self.ArtikelTF = QLineEdit(self.centralwidget)
self.ArtikelTF.setGeometry(QtCore.QRect(100, 100, 113, 20))
self.ArtikelTF.setObjectName("ArtikelTF")
self.ArtikelLbl = QLabel(self.centralwidget)
self.ArtikelLbl.setGeometry(QtCore.QRect(30, 100, 46, 13))
self.ArtikelLbl.setObjectName("ArtikelLbl")
self.DescriptionLbl = QLabel(self.centralwidget)
self.DescriptionLbl.setGeometry(QtCore.QRect(455, 70, 75, 13))
self.DescriptionLbl.setObjectName("DescriptionLbl")
self.UnitLbl = QLabel(self.centralwidget)
self.UnitLbl.setGeometry(QtCore.QRect(250, 70, 60, 15))
self.UnitLbl.setObjectName("UnitLbl")
self.WeightLbl = QLabel(self.centralwidget)
self.WeightLbl.setGeometry(QtCore.QRect(250, 100, 60, 13))
self.WeightLbl.setObjectName("UnitLbl")
self.WeightTF = QLineEdit(self.centralwidget)
self.WeightTF.setGeometry(QtCore.QRect(320, 100, 100, 20))
self.WeightTF.setObjectName("WeightTF")
self.UnitCB = QComboBox(self.centralwidget)
self.UnitCB.setGeometry(QtCore.QRect(320, 70, 100, 22))
self.UnitCB.setObjectName("UnitCB")
self.UnitCB.addItem("")
self.UnitCB.addItem("")
self.DescriptionTE = QPlainTextEdit(self.centralwidget)
self.DescriptionTE.setGeometry(QtCore.QRect(540, 30, 241, 61))
self.DescriptionTE.setObjectName("DescriptionTE")
self.PrintToFileBtn = QPushButton(self.centralwidget)
self.PrintToFileBtn.setGeometry(QtCore.QRect(140, 10, 75, 23))
self.PrintToFileBtn.setObjectName("PrintToFileBtn")
self.AddRecordBtn = QPushButton(self.centralwidget)
self.AddRecordBtn.setGeometry(QtCore.QRect(450, 100, 75, 23))
self.AddRecordBtn.setObjectName("AddRecordBtn")
self.SaveChangeBtn = QPushButton(self.centralwidget)
self.SaveChangeBtn.setGeometry(QtCore.QRect(550, 100, 75, 23))
self.SaveChangeBtn.setObjectName("SaveChangeBtn")
self.DeleteRecordBtn = QPushButton(self.centralwidget)
self.DeleteRecordBtn.setGeometry(QtCore.QRect(650, 100, 75, 23))
self.DeleteRecordBtn.setObjectName("DeleteRecordBtn")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
self.FilterTF.textChanged.connect(self.on_lineEdit_textChanged)
self.FilterCB.currentIndexChanged.connect(self.on_comboBox_currentIndexChanged)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
#.........这里部分代码省略.........
示例4: __init__
# 需要导入模块: from PySide.QtGui import QComboBox [as 别名]
# 或者: from PySide.QtGui.QComboBox import setObjectName [as 别名]
def __init__(self, *args, **kwargs ):
QMainWindow.__init__( self, *args, **kwargs )
self.installEventFilter( self )
self.setWindowTitle( Window_global.title )
mainWidget = QWidget()
self.setCentralWidget( mainWidget )
vLayout = QVBoxLayout( mainWidget )
hLayoutListWidget = QHBoxLayout()
widgetPutList = UI_objectList()
widgetBaseList = UI_objectList()
widgetPutList.label.setText( 'Put Object List' )
widgetBaseList.label.setText( 'Ground Object List' )
buttonPut = QPushButton( 'Put Object' )
widgetPutList.listWidget.setObjectName( Window_global.listWidgetPutName )
widgetBaseList.listWidget.setObjectName( Window_global.listWidgetGroundName )
widgetGroupList = UI_objectList()
widgetGroupList.label.setText( 'Duplicate Group List' )
widgetGroupList.listWidget.setObjectName( Window_global.duGroupListName )
widgetGroupList.listWidget.setSelectionMode( QAbstractItemView.SingleSelection )
hLayoutListWidget.addWidget( widgetPutList )
hLayoutListWidget.addWidget( widgetBaseList )
randomGroupBox = QGroupBox( 'Random' )
vLayoutRandom = QVBoxLayout( randomGroupBox )
rotateValidator = QDoubleValidator(-1000000, 1000000, 2, self )
scaleValidator = QDoubleValidator( 0.0, 100, 2, self )
randomOptionR = UI_randomOption2( 'Rotate', rotateValidator, -45, 45 )
randomOptionS = UI_randomOption2( 'Scale', scaleValidator, 0.8, 1.2 )
randomOptionRA = UI_randomOption( 'Rotate All', rotateValidator, -45, 45 )
randomOptionSA = UI_randomOption( 'Scale All', scaleValidator, 0.8, 1.2 )
randomOptionR.setObjectName( Window_global.randomOptionRotName )
randomOptionS.setObjectName( Window_global.randomOptionScaleName )
randomOptionRA.setObjectName( Window_global.randomOptionRotAName )
randomOptionSA.setObjectName( Window_global.randomOptionScaleAName )
vLayoutRandom.addWidget( randomOptionR )
vLayoutRandom.addWidget( randomOptionS )
vLayoutRandom.addWidget( randomOptionRA )
vLayoutRandom.addWidget( randomOptionSA )
offsetGroupBox = QGroupBox( 'Offset' )
vLayoutOffset = QVBoxLayout( offsetGroupBox )
componentCheck = QCheckBox( "Component check" )
offsetSlider1 = UI_OffsetSlider( "Offset By Object", -1, 1, 0 )
offsetSlider2 = UI_OffsetSlider( "Offset By Ground", -100, 100, 0 )
componentCheck.setObjectName( Window_global.componentCheckName )
offsetSlider1.setObjectName( Window_global.offsetByObjectName )
offsetSlider2.setObjectName( Window_global.offsetByGroundName )
vLayoutOffset.addWidget( componentCheck )
vLayoutOffset.addWidget( offsetSlider1 )
vLayoutOffset.addWidget( offsetSlider2 )
orientGroupBox = QGroupBox( 'Orient Option' )
vLayoutOrient = QVBoxLayout( orientGroupBox )
orientNormalCheck = QCheckBox("Ground Normal Affects")
hLayoutCombobox = QHBoxLayout()
orientTypeText = QLabel( 'Orient Edit Type : ' )
orientTypeComboBox = QComboBox()
orientTypeComboBox.addItem( 'All' )
orientTypeComboBox.addItem( 'Only Y' )
hLayoutCombobox.addWidget( orientTypeText )
hLayoutCombobox.addWidget( orientTypeComboBox )
vLayoutOrient.addWidget( orientNormalCheck )
vLayoutOrient.addLayout( hLayoutCombobox )
orientNormalCheck.setObjectName( Window_global.checkNormalOrientName )
orientTypeComboBox.setObjectName( Window_global.orientEditModeName )
vLayout.addLayout( hLayoutListWidget )
vLayout.addWidget( widgetGroupList )
vLayout.addWidget( randomGroupBox )
vLayout.addWidget( offsetGroupBox )
vLayout.addWidget( orientGroupBox )
vLayout.addWidget( buttonPut )
Window_global.loadInfo()
QtCore.QObject.connect( buttonPut, QtCore.SIGNAL( 'clicked()' ), Window_cmd.setTool_putObjectOnGround )