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


Python KPushButton.setMaximumSize方法代碼示例

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


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

示例1: MainFrame

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setMaximumSize [as 別名]
class MainFrame(KVBox):
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.connect(self.button, SIGNAL("clicked()"), self.showDialog)

    def showDialog(self):
        dlg = KAboutApplicationDialog(aboutData, self.parent())
        dlg.exec_()
開發者ID:stlsaint,項目名稱:python-snippets,代碼行數:17,代碼來源:kaboutapplicationdialog.py

示例2: MainFrame

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setMaximumSize [as 別名]
class MainFrame(KVBox):

    """Class showing the use of KAboutKdeDialog."""

    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.helpmenu = KHelpMenu(parent, "", False)
        self.button.clicked.connect(self.helpmenu.aboutKDE)
開發者ID:KDE,項目名稱:pykde4,代碼行數:17,代碼來源:kaboutkdedialog.py

示例3: MainFrame

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setMaximumSize [as 別名]
class MainFrame(KVBox):

    """Example class showing how KAboutApplicationDialog works."""

    def __init__(self, parent):

        super(MainFrame, self).__init__(parent)
        
        self.help = QLabel (helpText, self)
        self.layout ().setAlignment (self.help, Qt.AlignHCenter)
        
        hBox = KHBox (self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize (250, 30)
       
        self.button.clicked.connect(self.showDialog)

    def showDialog(self):
        dlg = KAboutApplicationDialog (aboutData, self.parent ())
        dlg.exec_ ()      
開發者ID:KDE,項目名稱:pykde4,代碼行數:22,代碼來源:kaboutapplicationdialog.py

示例4: MainFrame

# 需要導入模塊: from PyKDE4.kdeui import KPushButton [as 別名]
# 或者: from PyKDE4.kdeui.KPushButton import setMaximumSize [as 別名]
class MainFrame(KVBox):
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.connect(self.button, SIGNAL("clicked()"), self.showDialog)

        self.colorPatch = KColorPatch(hBox)
        self.colorPatch.setColor(Qt.red)
        self.colorPatch.setMaximumSize(40, 40)

    def showDialog(self):
        color = QColor()
        result = KColorDialog.getColor(color, self)
        self.colorPatch.setColor(color)
開發者ID:KDE,項目名稱:pykde4,代碼行數:22,代碼來源:kcolordialog.py


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