// To build the source, set your drive letter Q: to the Qt SDK root, // e.g., use "subst q: C:\QtSDK\Desktop\Qt\4.8.0\msvc2010" on the cmd line. // This minimal source is derived from http://trac.webkit.org/wiki/QtWebKitTiling, // for an example with more features see http://doc.qt.nokia.com/qt-maemo/maemo5-graphicswebview.html #include #include #include #include #include #include #include #include const char * DEFAULT_URL = "http://localhost/"; const char * DEFAULT_SIZE = "550x720"; const char * DEFAULT_PROXY = 0; static void ShowUsage(const char * exeName) { const char * name = ""; if (exeName) { name = strrchr(exeName, '\\'); if (name) { name++; } else { name = exeName; } } std::string msg = "Usage:\n"; msg += " " + std::string(name) + " [-w###x###] [url]\n"; msg += " " + std::string(name) + " -h\n\n"; msg += "Use -w###x### to specify the window size\n"; MessageBoxA(NULL, msg.c_str(), name, MB_ICONINFORMATION); } class BGraphicsWebView : public QGraphicsWebView { public: bool loadFinished(bool); }; bool BGraphicsWebView::loadFinished(bool) { return 0; } int main(int argc, char *argv[]) { const char * url = DEFAULT_URL; const char * size = DEFAULT_SIZE; const char * proxy = DEFAULT_PROXY; for (int i = 1; i