问题
I want to make QWebView
widget have borders in my layout and UI when running, similar to QTableView
. Now it looks borderless and hidden.
Is it even possible?
回答1:
It's not possible to set border to QWebView. Instead you can place your QWebView inside another QWidget and set it's border. See example below (QtDesigner):
Widgets hierarchy:
Look inside QtDesigner:
StyleSheet for QFrame:
QFrame
{
border: 1px solid black;
background: white;
}
来源:https://stackoverflow.com/questions/21249403/qwebview-set-border-visible