Symbian-Developers
The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Symbian Java/C++ Application Development => Topic started by: huellif on October 24, 2013, 11:41:17 pm
-
for Delight App I had to find a way to open a .sis inside of the app, the default Qt way is simple:
QDesktopServices::openUrl(QUrl("file:///C:/data/test.sis));
but it does open the service framework and hides your app.
There's a simple native function to open it directly in your UI:
1. Link against: apgrfx.lib in your .pro file, this means add
LIBS += -lapgrfx
2. in your class include:
#include <apgcli.h>
3. into you method paste this:
RApaLsSession apaLsSession;
CleanupClosePushL(apaLsSession );
User::LeveIfError(apaLsSession.Connect());
TThreadId threadId;
apaLsSession.StartDocument((_L("C:\\data\\test.sis")), threadId);
CleanupStack::PopAndDestroy(&apaLsSession );
you also can use a QString and convert it to a native string via:
TPtrC16 symstring(reinterpret_cast<const TUint16*>(qstring.utf16()));
-
Hmm...kind of confusing the way you explain it
-
maybe you should know Symbian C++ a little bit
*Updated first post with correct exception handling
-
Thank you huellif, you always the best ;)
-
Thank you huellif, you always the best ;)
lol I am bloody as hell with native code, I just share what I know