By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,271 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,271 IT Pros & Developers. It's quick & easy.

File copying from a menu

P: n/a
I'm attempting to have a file copied from a menu selection. The menu
already exists, but it won't even create the menu item. If anyone has any
ideas, please let me know.
Aug 26 '08 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Brandon wrote:
I'm attempting to have a file copied from a menu selection. The menu
already exists, but it won't even create the menu item. If anyone has any
ideas, please let me know.
try cutting down your code to a minimal example that illustrates the
problem, and post that code (that'll also allow us to figure out what
library you're using to create the menu...).

</F

Aug 26 '08 #2

P: n/a
Ok, below is a portion of the code that first (near as I can tell because I
had nothign to do with desgining the program) sets up the menu
(setupMenuBar) and then adds the commands to be used with the items:

def setupMenuBar(self):
menubar = self.menuBar()
file_ = menubar.addMenu("&File")
file_.addAction(self.importEx)
file_.addAction(self.exitAct)

def createActions(self):
fileMenu = QtGui.QMenu(self.tr("&File"), self)

self.importEx = QtGui.QAction(self.tr("&Import Excel Document"),
self)
self.importEx.setShortcut(self.tr("Ctrl+E"))
self.importEx.setStatusTip(self.tr("Import Excel Document"))
self.connect(self.importEx, QtCore.SIGNAL("triggered()"),
self.importExcel)

self.exitAct = QtGui.QAction(self.tr("E&xit"), self)
self.exitAct.setShortcut(self.tr("Ctrl+Q"))
self.exitAct.setStatusTip(self.tr("Exit the application"))
self.connect(self.exitAct, QtCore.SIGNAL("triggered()"), self,
QtCore.SLOT("close()"))

"Fredrik Lundh" <fr*****@pythonware.comwrote in message
news:ma*************************************@pytho n.org...
Brandon wrote:
>I'm attempting to have a file copied from a menu selection. The menu
already exists, but it won't even create the menu item. If anyone has
any ideas, please let me know.

try cutting down your code to a minimal example that illustrates the
problem, and post that code (that'll also allow us to figure out what
library you're using to create the menu...).

</F

Aug 26 '08 #3

P: n/a
Turns out I was missing a few lines of code here-and-there, but now it's
visible and working. Thanks to anyone who was looking into this for me.
"Fredrik Lundh" <fr*****@pythonware.comwrote in message
news:ma*************************************@pytho n.org...
Brandon wrote:
>I'm attempting to have a file copied from a menu selection. The menu
already exists, but it won't even create the menu item. If anyone has
any ideas, please let me know.

try cutting down your code to a minimal example that illustrates the
problem, and post that code (that'll also allow us to figure out what
library you're using to create the menu...).

</F

Aug 26 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.