1
from qt import Qt, QFrame, QHBoxLayout, QVBoxLayout, QLabel, SIGNAL
2
from kdeui import KPassivePopup, KTextEdit, KPushButton
3
from kdecore import KGlobal, KIcon
6
labelText = 'KPassivePopup'
7
docParts = ('kdeui', 'KPassivePopup')
8
helpText = ('Examples of the KPassivePopup widget.')
11
class MainFrame(QFrame):
12
def __init__(self, parent=None):
13
QFrame.__init__(self, parent)
14
self.help = KTextEdit(helpText, '', self)
15
self.button = KPushButton('Show Passive Popups', self)
17
layout = QVBoxLayout(self, 4)
18
layout.addWidget(self.help, 10)
19
buttonLayout = QHBoxLayout(layout, 4)
20
buttonLayout.addWidget(self.button, 1)
21
buttonLayout.addStretch(10)
25
self.connect(self.button, SIGNAL('clicked()'), self.showPopups)
29
## no support for all of the 3.5 calls
30
pop = KPassivePopup.message('Hello, <i>KPassivePopup</i>', self)
36
pos.setY(pos.y() + pop.height() + 10)
38
ico = KGlobal.instance().iconLoader().loadIcon('help', KIcon.NoGroup,
40
pop = KPassivePopup.message('<b>Hello</b>', 'With Icons', ico, self)