QWebEngineView let's stylesheet border disappear

Multi tool use
QWebEngineView let's stylesheet border disappear
Faced a strange issue with QWebEngineView: I have a qt ui file with a style sheet in it, which has a border defined. When loaded in python it looks as it should. The file holds a frame in it. As soon as I add a QWebEngineView to the frame, the border of the main widget disappears on top, right and bottom. On the left side it's still there. Anyone knows that issue?
Thats my code:
class ViewWindow(QWidget):
def __init__(self):
super(ViewWindow, self).__init__()
loader = QUiLoader()
file = QFile(abspath("ui/view.ui"))
file.open(QFile.ReadOnly)
self.view_screen = loader.load(file, self)
file.close()
self.initUI()
def initUI(self):
self.setWindowFlags(Qt.Window | Qt.FramelessWindowHint)
self.layout = QHBoxLayout()
self.browser=QWebEngineView()
self.browser.setUrl(QUrl("https://www.google.at"))
self.layout.addWidget(self.browser)
self.browser.hide()
self.view_screen.pushButton.clicked.connect(self.browser.show)
self.view_screen.frame.setLayout(self.layout)
app = QApplication(sys.argv)
view = ViewWindow()
view.show()
sys.exit(app.exec_())
Thanks.
view.ui
link
– dhirczy87
Jun 28 at 7:30
What border do you mean? I get the following: imgur.com/a/yHxcGIx
– eyllanesc
Jun 28 at 7:38
You could show a picture of what you get to understand you better, one without the QWebEngineView that shows the border and the other with the QWebEngineView.
– eyllanesc
Jun 28 at 7:39
link with QWebEngineView - link without QWebEngineView. Changed the color to red for better visability.
– dhirczy87
Jun 28 at 7:52
1 Answer
1
It was an issue with my pc. Tried on another windows 7 machine and it works like a charm.
Thanks
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
share
view.ui
– eyllanesc
Jun 28 at 7:08