diff options
author | Franklin Cooper Jr | 2011-10-21 15:22:03 -0500 |
---|---|---|
committer | Franklin Cooper Jr | 2011-10-21 15:22:03 -0500 |
commit | 575c74413764ff6b3132ffff46e85ee2c4c68202 (patch) | |
tree | c5fa675684e3287e055ee46a27e179018223d347 /main.cpp | |
download | matrix_browser-575c74413764ff6b3132ffff46e85ee2c4c68202.tar.gz matrix_browser-575c74413764ff6b3132ffff46e85ee2c4c68202.tar.xz matrix_browser-575c74413764ff6b3132ffff46e85ee2c4c68202.zip |
Initial commit of the Matrix Browser
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..633e171 --- /dev/null +++ b/main.cpp | |||
@@ -0,0 +1,30 @@ | |||
1 | #include <QtGui> | ||
2 | #include <QWebView> | ||
3 | #include <QGraphicsWebView> | ||
4 | int main(int argc, char **argv) | ||
5 | { | ||
6 | QApplication app(argc, argv); | ||
7 | const int width = 800; | ||
8 | const int height = 480; | ||
9 | |||
10 | QGraphicsScene scene; | ||
11 | |||
12 | QGraphicsView view(&scene); | ||
13 | view.setFrameShape(QFrame::NoFrame); | ||
14 | view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | ||
15 | view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | ||
16 | |||
17 | QGraphicsWebView webview; | ||
18 | webview.resize(width, height); | ||
19 | webview.load(QUrl("http://localhost:8080")); | ||
20 | |||
21 | scene.addItem(&webview); | ||
22 | |||
23 | view.resize(width, height); | ||
24 | view.show(); | ||
25 | |||
26 | return app.exec(); | ||
27 | } | ||
28 | |||
29 | |||
30 | |||