View Single Post
Posts: 272 | Thanked: 52 times | Joined on Jan 2010
#11
I finally managed to get a top menu bar to appear, not sure i've put the code in the correct place though, I put it at the bottom and the code is:

Code:
if __name__ == "__main__":
	app=QtGui.QApplication(sys.argv)
	mainWindow = myProgram()
	mainWindow.show()
	
	menubar = QtGui.QMenuBar(mainWindow)
	menubar.setGeometry(QtCore.QRect(0,0,800,21))
	menubar.setObjectName("menubar")
	
	menufile=QtGui.QMenu(menubar)
	menufile.setObjectName("menufile")
	
	mainWindow.setMenuBar(menubar)
	
	actionupdateall = QtGui.QAction(mainWindow)
	actionupdateall.setObjectName("actionupdateall")
	actionupdateall.setText("Settings")
	
	menufile.addSeparator()
	menufile.addAction(actionupdateall)
	menubar.addAction(menufile.menuAction())
	menufile.setTitle(QtGui.QApplication.translate("mainWindow","File",None,QtGui.QApplication.UnicodeUTF8))
	
	sys.exit(app.exec_())
As I said not sure its in the correct place all, i'm thinking maybe class could be created and I could have this in another file - at the min, everything is in one :-[

I was looking in gpodder though, when you click the 'settings' button in that, another menu pops up from the bottom, is that something to do with the status bar?

Is there anywhere which describes each of the different things you can do? As a python beginner I am finding it tough to find good easy to follow examples online