Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication a(argc, argv);
  4.  
  5. const int width = 640;
  6. const int height = 480;
  7.  
  8. QGraphicsScene scene;
  9.  
  10. QGraphicsView view(&scene);
  11. view.setFrameShape(QFrame::NoFrame);
  12. view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  13. view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  14.  
  15. QGraphicsWebView webview;
  16. webview.resize(width, height);
  17. webview.setAttribute(Qt::WA_AcceptTouchEvents);
  18. webview.load(QUrl("http://192.168.1.2/test2"));
  19.  
  20. scene.addItem(&webview);
  21.  
  22. view.resize(width, height);
  23. view.show();
  24.  
  25. return a.exec();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement