I am trying to make a small and simple application using pykde and pyqt.. I have figured out how to create a statusbar and menubar, but when I add something "in the middle" it gets placed underneath the menubar.. I use a KListView as an example here but it doesn't matter what widget I use.
I want the widget to be placed below the menubar, not underneath it.
The code (not all of the code is shown):
Code:
class MainWindow(KMainWindow):
def __init__(self):
KMainWindow.__init__(self)
self.view = KListView(self)
self.view.addColumn("this text is not visible")
self.view.resize(300, 250)
self.view.show()
self.setCaption(i18n("Simple example"))
self.file = QPopupMenu()
self.file.insertItem(i18n("&Exit"), self.slotExit)
self.menu = self.menuBar()
self.menu.insertItem(i18n("&File"), self.file)
self.menu.insertItem(i18n("&Help"), KHelpMenu(self, aboutData, 0).menu())
#self.tb = self.toolBar()
#self.tb.insertButton(Icon("exit.xpm"), MainWindow.TOOLBAR_EXIT, 1, i18n("Exit"))
#self.connect(self.toolBar(), SIGNAL("clicked(int)"), self.slotToolbarClicked)
self.statusbar = self.statusBar()
self.statusbar.insertItem(i18n("Test statusbar"), ID_WELCOME, 1)
#def closeEvent(self, QCloseEvent):
# QCloseEvent.accept()
#
# Slots
#
def slotExit(self):
self.close()
# main
app = KApplication()
mw = MainWindow()
mw.resize(500, 400)
mw.show()
app.exec_loop()