Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:16:25+00:00 2026-06-17T23:16:25+00:00

I have developed an app with system Tray having menu in Python 2.6.4 and

  • 0

I have developed an app with system Tray having menu in Python 2.6.4 and PyQt4.

Every client system has python installed locally, and accessing PyQt4 from network location.

I set SystemTray and required icons for menu items as below.
App folder has icons folder from where i am using. so i used os.getcwd()

i kept this app folder in a network so that everyone can access.

self.mnuItem_1 = QtGui.QAction(QtGui.QIcon(r'%s\icons\icon1.ico' % (os.getcwd())), "Menu Item 1", self)
self.mnuItem_2 = QtGui.QAction(QtGui.QIcon(r'%s\icons\icon1.ico' % (os.getcwd())), "Menu Item 1", self)

self.trayIconMenu = QtGui.QMenu(self)
self.trayIconMenu.addAction(self.mnuItem_1)
self.trayIconMenu.addAction(self.mnuItem_2)
self.trayIcon = QtGui.QSystemTrayIcon(self)
self.trayIcon.setContextMenu(self.trayIconMenu)
TrayIcon = (r'%s\ShowTime_Addons\Media\showtimeIcon.ico' % (os.getcwd()))
self.trayIcon.setIcon(QtGui.QIcon(TrayIcon))
self.trayIcon.setToolTip('Showtime')
self.trayIcon.show()

In some systems i could able to see the icons, but in some systems icons are not shown.

For testing i placed .png and used and it worked.

self.mnuItem_1 = QtGui.QAction(QtGui.QIcon(r'%s\icons\icon1.png' % (os.getcwd())), "Menu Item 1", self)
self.mnuItem_2 = QtGui.QAction(QtGui.QIcon(r'%s\icons\icon1.png' % (os.getcwd())), "Menu Item 1", self)

So came to an understanding that the issue is not with the path but something else.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:16:26+00:00Added an answer on June 17, 2026 at 11:16 pm

    I found out a solution for this scenario

    One approach is to set the paths in qt.config file and place this in the location of your executable.(In my case its C:\Python26)

    As i discribed in my Question that i am accessing PyQt4 from Network Location say \\somesystem\Share\PyQt4

    We will find a qt.config file in \\somesystem\Share\PyQt4
    Take it and put this below lines in qt.conf

    [Paths]
    Prefix = //somesystem/Share/PyQt4
    Binaries = //somesystem/Share/PyQt4
    

    Everything works fine, even sqldrivers will be loaded. No Need of using app.addLibraryPath

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a app developed in PyQt4. It has icons set for windows and
I have an AIR app that I have developed for a client. It has
I have developed a system app for my rom which includes some native libraries.
I have developed an app that in testing has worked fine but when it
We have just developed an iPhone app that has a feature that relies on
i have developed an app which executes sql jobs. When I click on execute
I have developed my app in android 2.2, and put it on google market
I have developed my app using core data. It works fine in the simulator.
I have developed my app for tablet. Now I need to convert it to
I have developed a C# app that overrides the PreviewMouseUp, PreviewMouseMove, and PreviewMouseDown events

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.