Back to index

lightning-sunbird  0.9+nobinonly
TestQGeckoEmbed.cpp
Go to the documentation of this file.
00001 #include <qapplication.h>
00002 #include "mainwindow.h"
00003 #include "qgeckoembed.h"
00004 
00005 #include <qdir.h>
00006 
00007 int main(int argc, char **argv)
00008 {
00009     QApplication app(argc, argv);
00010 
00011     QGeckoEmbed::initialize(QDir::homeDirPath().latin1(),
00012                             ".TestQGeckoEmbed");
00013 
00014     MyMainWindow *mainWindow = new MyMainWindow();
00015     app.setMainWidget(mainWindow);
00016 
00017     mainWindow->resize(700, 500);
00018     mainWindow->show();
00019 
00020     QString url;
00021     if (argc > 1)
00022         url = argv[1];
00023     else
00024         url = "http://www.kde.org";
00025 
00026     mainWindow->qecko->loadURL(url);
00027 
00028     return app.exec();
00029 }