23 #include <QApplication> 24 #include <QMainWindow> 30 int main(
int argc,
char* argv[])
32 QApplication app(argc,argv);
34 Q_INIT_RESOURCE(smili);
35 QWebView *assistantView =
new QWebView(&Main);
37 QFile file(
":/resources/index.html");
38 if(file.open(QIODevice::ReadOnly))
39 assistantView->setHtml(file.readAll());
41 qDebug() <<
"Failed reading documentation.";
43 assistantView->setWindowTitle(
"SMILI Assistant");
44 Main.setCentralWidget(assistantView);
45 Main.setUnifiedTitleAndToolBarOnMac(
true);
46 assistantView->show();
51 QToolBar *toolBar = Main.addToolBar(QObject::tr(
"Navigation"));
52 toolBar->addAction(assistantView->pageAction(QWebPage::Back));
53 toolBar->addAction(assistantView->pageAction(QWebPage::Forward));
54 toolBar->addAction(assistantView->pageAction(QWebPage::Reload));
55 toolBar->addAction(assistantView->pageAction(QWebPage::Stop));
57 Main.setWindowTitle(
"SMILI Assistant");