Loading page using Qt webview
-
Hello, I create small aplication to load page in Qt webview. In simulator everything goes fine But in mobile phone app dont load page.(white screen) I connect phone to internet via WLAN connection. Pls help.
There is code:
@MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QCoreApplication::setOrganizationName("Madness");
QCoreApplication::setOrganizationDomain("madnes.eu");
QCoreApplication::setApplicationName("Snowboard");ui->webView->load(QUrl ("http://snowboard.madweb.sk"));
}@
-
Which phone are you trying to use? Which Qt version?
-
QT 4.7, Phone I use: E75
-
So it is a symbian phone. Did you enable the netowrking capability for your apoplication?
-
No, How can I do it ?
-
In project file include NetworkServices.
@symbian:TARGET.CAPABILITY += NetworkServices @ -
I add it now, but still white screen.
-
Try implementing S&S for QWebView like @void loadFinished ( bool ok )
void loadProgress ( int progress )@
Then it will be easier for you to debug. -
My pro file:
@#-------------------------------------------------Project created by QtCreator 2010-12-28T16:02:45
#-------------------------------------------------
QT += webkit
TARGET = test2
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY =symbian {
TARGET.CAPABILITY += NetworkServices
TARGET.UID3 = 0xefe0c733
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
@ -
now there is error: [Qt Message] qt_init: Eikon application construct failed ( -1 ), maybe missing resource file on S60 3.1?
-
I am not a symbian dev but -1 means "not found" in AVKON terms. Delete the old build files before rebuilding the project. Which IDE are you using?