开发者

How to start browser and load url in symbian S60 Qt app?

开发者 https://www.devze.com 2023-02-05 20:07 出处:网络
I just want my app to start a browser and load an URL. I am using this code that compiles and runs on simulator, but nothing happens.

I just want my app to start a browser and load an URL. I am using this code that compiles and runs on simulator, but nothing happens.

#include <QtGui>
#include <QDesktopServices>
#include <QUrl>

 int main(int argc, char *argv[])
 {
   QApplication app(argc, argv);

   QDesktopServices::openUrl(QUrl("http:开发者_开发百科//www.google.com"));
   return app.exec();
  }

Is it possible that there is something missing in my simulator( e.g browser), because i can't move through menus or do anything else (no menu at all). I have only installed Nokia Qt SDK (read this tutorial http://wiki.forum.nokia.com/index.php/Using_Qt_Creator_With_Symbian).

Thank you.


The simulator isn't an emulator - it doesn't emulate the entire OS, so you can't use it test code like this that launches the platform browser, and running the simulator won't give you a home-screen with menus and applications.


You could download the Symbian^3 SDK for Nokia devices 0.9 and Qt 4.6.3 and try it out on the provided emulator, it emulates the OS and allows you to run native Symbian C++ as well as Qt applications. Takes a while to set up, but is very useful for development.

0

精彩评论

暂无评论...
验证码 换一张
取 消