View Single Post
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#1
Hi everyone, i have searched everywhere, tried irc and really not getting anywhere.

I'm trying to implement a very simple menu in pyqt (for the n900).
It just needs one button that runs a function.

IMy code probably looks a bit confused by now as i have tried lots of things... i've got to a point with no errors, but also no menu when i click the title bar.

Any help would be greatly appreciated.

Code:
self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
        self.menubar.setObjectName("menubar")

        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)

        self.actionupdateall = QtGui.QAction(MainWindow)
        self.actionupdateall.setObjectName("actionupdateall")
        
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionupdateall)
        self.menubar.addAction(self.menuFile.menuAction())

        self.menubar.addAction(self.menuFile.menuAction())
        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
(P.s. sorry if it makes no sense in the code - but really confused)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -