Search code examples
c++qtqt5qwebviewqframe

Add parent to UI Object in Qt


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.


Solution

  • 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.