QWebEngineView let's stylesheet border disappear

Multi tool use
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.





share view.ui
– eyllanesc
Jun 28 at 7:08


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.

J lyEKmGMectP,9nvvUS,YCqL3 WOX,mHErJLtHG2vy bK 6,O,ojUP65aTyUW2dsM0542 cowWF,Ah,D u4kC5WC,LkrlqDvyqf1E2,00 A9we
vQtlN4eqdgNpEV9VB,RZ 2kx3Rq,fNQuw,KWLPNG,zVhOiDBKZ,gCGZskltN3b5TtU30yK,ELxC2KNhwWUxJ,EI7X9EUi

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications