KDE TechBase
  • Page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.

Development/Languages/Python/PyKDE WebKit Tutorial/Part4

< Development | Languages | Python | PyKDE WebKit Tutorial

Now we want to prepare to add an address bar.

Replace the __init__ method with:

self.widget = QWidget()
 
layout = QVBoxLayout(self.widget)
 
self.web = QWebView(self.widget)
self.web.load(QUrl("http://kubuntu.org"))
layout.addWidget(self.web)
self.widget.show()

Now instead of having the QWebView as our top widget we have a plain QWidget. This widget contains a layout which is not a visible widget but ensure child widgets are put in a sensible place. It is a QVBoxLayout which will put widgets in a vertical colum.

See the full code.

This version will look the same as the previous.

« Back to Part 3 | On to Part 5 »

Retrieved from "http://techbase.kde.org/Development/Languages/Python/PyKDE_WebKit_Tutorial/Part4"
Category: Python

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • 38.107.191.95
  • Talk for this IP
  • Log in / create account
  • Login with OpenID
Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal