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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:16:04+00:00 2026-06-09T21:16:04+00:00

I have an icon that is saved in a format: //icon.h extern const unsigned

  • 0

I have an icon that is saved in a format:

//icon.h
extern const unsigned char icon[];

//icon.cpp
const unsigned char icon[]={0x17,0x3f,0x0c,....,0x10,0x06}

Now i want to add this icon to the status bar.

How do i do it?

Thank you.

  • 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-09T21:16:05+00:00Added an answer on June 9, 2026 at 9:16 pm

    First create a widget that loads the icon data, like a QLabel on which you set a QPixmap. What format is that image in? You will have to load it into your pixmap using one of the constructors, or you could try loading it with loadFromData().

    Then add that widget to the status bar like so:

    statusBar()->addWidget(yourIconWidget);
    

    Have a look at statusBar(), addWidget() and addPermanentWidget().

    An example of how to create the widget could be:

    QPixmap *pixmap = new QPixmap;
    
    // Note that here I don't specify the format to make it try to autodetect it, 
    // but you can specify this if you want to. 
    pixmap->loadFromData(icon, sizeof(icon) / sizeof(unsigned char));
    
    QLabel *iconLbl = new QLabel;
    iconLbl->setPixmap(pix);
    
    statusBar()->addWidget(iconLbl);
    

    Specifying the format, as I mentioned above, is elaborated upon here.

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

Sidebar

Related Questions

I have an icon that is inserted into a page using the background-image property.
I have a home-screen widget that has an icon that starts/so pose to bring
I have created a nice icon for my app that quite accurately reproduces the
I have a click-once deployed app that uses a notification icon created using the
I currently have implemented an overlay item that shows an icon for Geo-point on
I have a table in my data base that has three columns: Screen, Icon,
I want to have a nice little icon that, when clicked will clear the
I have a grayscale icon that I'm editing with Photoshop with a transparent background,
I have a button like that : <a href=@Url.Action(Create, City) class=save button><span class=icon-save></span>Save</a> Than
I have saved icon size images in a mysql database in bytes, now, what

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.