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 7643747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:31:21+00:00 2026-05-31T09:31:21+00:00

im developing QT application, and im using few icons this is my resource.qrc file

  • 0

im developing QT application, and im using few icons

this is my resource.qrc file

<RCC>
    <qresource prefix="/new/prefix1">
        <file>army-officer-icon.png</file>
        <file>uac.png</file>
    </qresource>
</RCC>

then i ofcourse include it in my .pro file

RESOURCES += \
    resource.qrc

and here is the code which takes care of icons:

//this code is part of the mainwindow.cpp
QSystemTrayIcon *trayIcon;
trayIcon = new QSystemTrayIcon(this);
trayIcon->setContextMenu(trayIconMenu);
trayIcon->setIcon(QIcon(":/new/prefix1/army-officer-icon.png"));
trayIcon->show();



//this code is part of the ui_mainwindow.h (generated by QT)
        QLabel *label_5;
        label_5 = new QLabel(centralWidget);
        label_5->setObjectName(QString::fromUtf8("label_5"));
        label_5->setGeometry(QRect(40, 302, 46, 21));
        label_5->setPixmap(QPixmap(QString::fromUtf8(":/new/prefix1/uac.png")));
        label_5->show();

So, this looks reasonable, right ?

===windows 7, developing station, QT installed

also the result effect is as i expected
windows 7 - developing station, where qt is installed

i can see both icons :: tray icon & uac shield = awesome

but when i move to the other workstation, somethings strange happens

===windows XP, user work station, QT NOT installed

other workstation, qt not installed

as u can see, the trayicon still has its own icon, but the “uac shield icon” dissapears… its very disturbing, and i really dont get it since both icons are *.png formats, i browsed a lot, and maybe it has connection with qt image plugins (althought i think that i should care about it only when my icon are *.jpeg, *.gif format), but wasnt able to make this solution works…

so any ideas are welcomed.
Thanx in advance.

  • 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-05-31T09:31:22+00:00Added an answer on May 31, 2026 at 9:31 am

    Okay, ive found the solution just after ive posted this (actually , i was quite close, but i copied something with wrong path :/)

    1. locate C:\QtSDK\Desktop\Qt\4.8.0\mingw\plugins

    2. copy plugins/imageformats to your application folder

    3. open main.cpp and add this line of codes

      a.addLibraryPath(QCoreApplication::applicationDirPath ()+"/plugins"); 
      
    4. compile, and have a look at your beautiful icons 🙂

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

Sidebar

Related Questions

Currently developing an application using the newest version of symfony, obtained through PEAR. This
I have been developing an application over the last few months using EF code
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
I am developing an application using MVC Preview 5. I have used typed views.
I am developing an application using Windows Mobile 5.0, under embedded VC++ 4.0, and
I am developing an application using WPF to dynamically render content, including text and
I'm developing an application using MS Visual C# 2008 Express that uses the ClickOnce
I'm developing an application using Mozilla Prism. Unfortunately, Prism has its pop-up blocker activated.
I am developing an application using Symfony 1.4. Is it posible to disable a
I am developing an application using jQueryUI. I am also using the Themeroller. I

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.