QWebView set border visible

China☆狼群 提交于 2019-12-11 02:35:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!