当前位置: 首页>>代码示例>>Python>>正文


Python QDialog.resize方法代码示例

本文整理汇总了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 )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:32,代码来源:createRenderLayer.py

示例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()
开发者ID:Hydrael,项目名称:4ca,代码行数:14,代码来源:mainwindow.py

示例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 ------------------------------------------------------------------------
开发者ID:davidmorrill,项目名称:facets,代码行数:15,代码来源:dialog.py

示例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 )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:44,代码来源:createRenderLayer.py


注:本文中的PySide.QtGui.QDialog.resize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。