LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2024, 02:21 PM   #1
bekoikc
LQ Newbie
 
Registered: Apr 2024
Location: Berlin
Posts: 11

Rep: Reputation: 0
Doesn't Open Menu Bar


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.
 
  


Reply

Tags
bug, code, programming, python



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] kicker - Relaunch task bar/ tray bar (the bar at the bottom of screen). andrewysk Linux - Newbie 3 03-18-2021 03:19 PM
[SOLVED] 12.04 - menu bar missing time/date on top bar anchorman Ubuntu 7 08-24-2014 02:05 PM
[SOLVED] KDE menu bar: icons all on the left. How to rectify and documentation of menu bar? JZL240I-U Linux - Desktop 5 12-30-2011 10:42 AM
[SOLVED] Ubuntu 11.04 Lunch bar and menu bar gone. KristjanJo Linux - Desktop 9 10-09-2011 09:04 PM
KDE task bar / menu bar has dissaspeared! KingofBLASH SUSE / openSUSE 1 03-05-2006 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration