本文整理汇总了Python中PySide.QtGui.QDialog.resize方法的典型用法代码示例。如果您正苦于以下问题:Python QDialog.resize方法的具体用法?Python QDialog.resize怎么用?Python QDialog.resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QDialog
的用法示例。
在下文中一共展示了QDialog.resize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deleteTab
# 需要导入模块: from PySide.QtGui import QDialog [as 别名]
# 或者: from PySide.QtGui.QDialog import resize [as 别名]
def deleteTab(self):
dialog = QDialog( self )
dialog.setWindowTitle( "Remove Tab" )
dialog.resize( 300, 50 )
mainLayout = QVBoxLayout(dialog)
description = QLabel( "'%s' ���� �����Ͻð� ���ϱ�?".decode('utf-8') % self.tabText( self.currentIndex() ) )
layoutButtons = QHBoxLayout()
buttonDelete = QPushButton( "�����".decode('utf-8') )
buttonCancel = QPushButton( "���".decode('utf-8') )
layoutButtons.addWidget( buttonDelete )
layoutButtons.addWidget( buttonCancel )
mainLayout.addWidget( description )
mainLayout.addLayout( layoutButtons )
dialog.show()
def cmd_delete():
self.removeTab( self.indexOf( self.currentWidget() ) )
dialog.close()
def cmd_cancel():
dialog.close()
QtCore.QObject.connect( buttonDelete, QtCore.SIGNAL('clicked()'), cmd_delete )
QtCore.QObject.connect( buttonCancel, QtCore.SIGNAL('clicked()'), cmd_cancel )
示例2: _showpostviewerdialog
# 需要导入模块: from PySide.QtGui import QDialog [as 别名]
# 或者: from PySide.QtGui.QDialog import resize [as 别名]
def _showpostviewerdialog(self, post):
d = QDialog(self)
d.resize(1024, 768)
l = QVBoxLayout()
w = PostViewerWidget(post, self._backend, self._masterobserver, self)
w.nextpostrequested.connect(self._putnextpost)
w.previouspostrequested.connect(self._putpreviouspost)
w.closing.connect(d.close)
l.addWidget(w)
d.setLayout(l)
d.setModal(False)
d.show()
示例3: _create_control
# 需要导入模块: from PySide.QtGui import QDialog [as 别名]
# 或者: from PySide.QtGui.QDialog import resize [as 别名]
def _create_control ( self, parent ):
dlg = QDialog( parent )
if self.size != ( -1, -1 ):
dlg.resize( *self.size )
# FIXME v3: Decide what to do with the resizable facet (ie. set the
# size policy):
dlg.setWindowTitle( self.title )
return dlg
#-- EOF ------------------------------------------------------------------------
示例4: addTab
# 需要导入模块: from PySide.QtGui import QDialog [as 别名]
# 或者: from PySide.QtGui.QDialog import resize [as 别名]
def addTab(self):
dialog = QDialog( self )
dialog.setWindowTitle( 'Add Tab' )
dialog.resize( 300, 50 )
mainLayout = QVBoxLayout( dialog )
tabNameLayout = QHBoxLayout()
labelTabName = QLabel( 'Tab Name : ' )
lineEditTabName = QLineEdit()
tabNameLayout.addWidget( labelTabName )
tabNameLayout.addWidget( lineEditTabName )
buttonsLayout = QHBoxLayout()
buttonCreate = QPushButton( "Create" )
buttonCancel = QPushButton( "Cancel")
buttonsLayout.addWidget( buttonCreate )
buttonsLayout.addWidget( buttonCancel )
mainLayout.addLayout( tabNameLayout )
mainLayout.addLayout( buttonsLayout )
dialog.show()
def cmd_create():
tabName = lineEditTabName.text()
if not tabName:
msgbox = QMessageBox( self )
msgbox.setText( "�̸��� �������ּ���".decode( 'utf-8' ) )
msgbox.exec_()
return
self.tabWidget.addTab( tabName )
dialog.close()
def cmd_cancel():
dialog.close()
QtCore.QObject.connect( lineEditTabName, QtCore.SIGNAL( 'returnPressed()' ), cmd_create )
QtCore.QObject.connect( buttonCreate, QtCore.SIGNAL( 'clicked()' ), cmd_create )
QtCore.QObject.connect( buttonCancel, QtCore.SIGNAL( 'clicked()' ), cmd_cancel )