472,358 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,358 software developers and data experts.

File copying from a menu

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
3 1101
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tjerk Wolterink | last post by:
Hello i have xml code like this: <page:page xmlns:page="namespacefor page"> <page:section> <page:header> <b>Hello</b>There </page:header> <page:content> --- HTML CODE like: <i>Y</i>es i...
4
by: Robert Iver | last post by:
Hello everyone, I am trying to create an application that utilizes a SQL Mobile database. I have included that database in my main project, and it compiles and debugs just fine. I then...
1
by: Al | last post by:
I'm looking for a sample to save File from clipboard into specified folder on HD. I found many samples for copying text, image etc. But no file copying code so far. Thank you Al
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
1
by: Andrue Cope | last post by:
Hi, I'm implementing a plug-in interface and I want to allow plug-ins to add menu items to the host application's menu bar. I've given them a public method that is passed a ToolStripMenuItem but...
2
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only...
6
by: Neil | last post by:
I have a form that has its own custom menu bar in Access 2000. I'd like to make a copy of the menu bar and use it with another form. How can I do this? Thanks.
1
by: Fendi Baba | last post by:
Is it possible to create a solution file using Web Developer Express 2008 or am I left to only copying the files to the server manually? Thanks for the tips.
9
by: tdahsu | last post by:
All, I have the following code: for fileTarget in dircache.listdir("directory"): (dirName, fileName) = os.path.split(fileTarget) f = open(fileTarget).readlines() copying = False for i in...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.