Guest User

Untitled

a guest
Jul 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. MyWebView::createWebView()
  2. {
  3. webView = new QWebView(parentWindow);
  4. parentWindow->setCentralWidget(webView);
  5. }
  6.  
  7. class QTParentWindow : public QMainWindow, public MyParentWindow
  8.  
  9. QTParentWindow::QTParentWindow()
  10. : objMyWebView(this) // passing this which is stored as parentWindow in MyWebView class
  11. {
  12. objMyWebView.createWebView();
  13. }
  14.  
  15. int main()
  16. {
  17. MyParentWindow * obj = new QTParentWindow();
  18. obj.show();
  19. }
Add Comment
Please, Sign In to add comment