473,503 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1166
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
3022
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
3654
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
1525
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
6696
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
2937
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
2781
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
2514
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
1372
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
1984
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...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.