3

我正在尝试像使用QWebView一样更改边框,为此QLineEdit设置样式表:QWebView

QWebView
{
    border: 20px;
    border-radius: 5px;
}

只是忽略了边界。我试过改变它的背景,它工作正常。

难道我做错了什么?或者有没有办法做到这一点?

它在那里。引用的代码和打印QWebView

materialViewer = new QWebView(Study);
materialViewer->setObjectName(QString::fromUtf8("materialViewer"));
materialViewer->setGeometry(QRect(190, 10, 591, 531));
materialViewer->setContextMenuPolicy(Qt::NoContextMenu);
materialViewer->setUrl(QUrl("about:blank"));
materialViewer->setRenderHints( QPainter::Antialiasing |
                                QPainter::HighQualityAntialiasing | 
                                QPainter::NonCosmeticDefaultPen |
                                QPainter::SmoothPixmapTransform |
                                QPainter::TextAntialiasing );

链接:http: //imageshack.us/f/684/semttulomym.png/

提前致谢。

4

1 回答 1

0

它在那里。引用 QWebView 的代码和打印。

  materialViewer = new QWebView(Study);
    materialViewer->setObjectName(QString::fromUtf8("materialViewer"));
    materialViewer->setGeometry(QRect(190, 10, 591, 531));
    materialViewer->setContextMenuPolicy(Qt::NoContextMenu);
    materialViewer->setUrl(QUrl("about:blank"));
    materialViewer->setRenderHints(QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::NonCosmeticDefaultPen|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing);

链接:http: //imageshack.us/f/684/semttulomym.png/

于 2012-07-18T00:09:25.727 回答