本文整理匯總了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_()
示例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)
示例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_ ()
示例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)