views:

2848

answers:

5

I am using Carbide (just upgraded to 2.0) to develop an S60 3rd Edition application.

I would like to know the easiest way to change the icon (both the application icon on the device menu and the icon at the top left of the main view) because I have the need to skin my application in many different ways as easily as possible.

All my efforts with messing around with .mif files have so far failed. I have a 44x44 .svg icon I made with Illustrator, could someone please help me in the right direction?

Thanks!

+1  A: 

If you want to change the icon in your SIS file and then overinstall it on device then you may have to reboot your device after installation - the application icon is in the Symbian cache and is not updated.

Riho
+2  A: 

To change the app icon when you run your app use (in the status bar):

CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
CAknContextPane* cp=(CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "my_bitmap_file.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmap);
CleanupStack::PushL(bitmap);
CFbsBitmap*  bitmapmask = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmapMask);
CleanupStack::PushL(bitmapmask);
cp->SetPicture(bitmap, bitmapmask);
CleanupStack::Pop(); // bitmapmask
CleanupStack::Pop(); // bitmap
DrawNow();

I'm not aware of any possibility of changing the app icon in the menu list programmatically, other than reinstalling the app with different mif file.

Kasprzol
A: 

What is the easiest way to create and change a mif file?

adam
A: 

With latest QMake and Qt SDK (4.6.2) you don't need to create any .mif file yourself. An SVG file will do.

For more detailed instructions see: How to Set Qt Application Icon and Title in Symbian S60.

Although the article uses Qt Creator, as long as you use QMake then it's the same thing.

Hendy Irawan