0

I have QWebView object located on my UI in Designer Tab, I want to add a parent to him which will be QFrame, reason I am doing this is because I cannot use border QSS property on QWebView.

  • 1
    So add a frame to your window, set a layout to it and put the webview inside that layout. What is the problem exactly? – thuga Mar 11 '16 at 12:02
  • I want to display QWebView inside of QFrame. –  Mar 11 '16 at 12:04
  • 1
    Yes, but what is stopping you from doing that? – thuga Mar 11 '16 at 12:06
  • I know that it can be done like this QWebView vw = new QWebView(&frame), but how to do this when we don't have QFrame frame = new QFrame; defined? –  Mar 11 '16 at 12:07
  • 1
    You need a `QFrame` object if you want to put `QWebView` inside a frame. See [this question](http://stackoverflow.com/questions/21249403/qwebview-set-border-visible). – thuga Mar 11 '16 at 12:13

1 Answers1

1

Assuming you're using the designer to build an .ui file, you can drag a QFrame onto the widget, and the QWebView onto the QFrame. That will set QFrame as QWebView's parent.

weeska
  • 439
  • 3
  • 7