Article 6M00Y Doesn't Open Menu Bar

Doesn't Open Menu Bar

by
bekoikc
from LinuxQuestions.org on (#6M00Y)
Hello guys, today I was coding my own browser (I know it's a simple thing) and the menu bar, which is the basic search engine, isn't showing up on the screen. Only the buttons and the search bar are appearing, but the search engine in the middle isn't showing up. I thought maybe it could be because I'm using Ubuntu, and that's why I came here. Here is my code, guys. Code:from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWebEngineWidgets import *

class Browser():

def __init__(self):

self.window = QWidget()
self.window.setWindowTitle("BEKO BROWSER")

self.layout = QVBoxLayout()
self.horizontal = QHBoxLayout()

self.url_bar = QTextEdit()
self.url_bar.setMaximumHeight(30)

self.go_btn = QPushButton("Git")
self.go_btn.setMaximumHeight(30)

self.back_btn = QPushButton("<")
self.back_btn.setMaximumHeight(30)

self.forward_btn = QPushButton(">")
self.forward_btn.setMaximumHeight(30)

self.horizontal.addWidget(self.url_bar)
self.horizontal.addWidget(self.go_btn)
self.horizontal.addWidget(self.back_btn)
self.horizontal.addWidget(self.forward_btn)

self.browser = QWebEngineView()

self.layout.addLayout(self.horizontal)
self.layout.addWidget(self.browser)

self.browser.setUrl(QUrl("http://google.com"))

self.window.setLayout(self.layout)
self.window.show()

app = QApplication([])
window = Browser()
app.exec_() I used Python. I'm waiting for your help, thank you.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments