Difference between revisions of "Languages/Python/PyKDE WebKit Tutorial/Part5"

Jump to: navigation, search
(Mark for archiving)
 
Line 1: Line 1:
 +
{{Archived}}
 +
{{Warning|This tutorial uses Qt4, PyQt4, and PyKDE4.}}
 +
 
We will change the top widget again adding a ''KMainWindow'' to contain our ''QWidget''.
 
We will change the top widget again adding a ''KMainWindow'' to contain our ''QWidget''.
  

Latest revision as of 14:04, 31 May 2019


Warning.png
This page has been archived
The information on this page is outdated or no longer in use but is kept for historical purposes. Please see the Category:Archives for similar pages.
Warning.png
Warning
This tutorial uses Qt4, PyQt4, and PyKDE4.


We will change the top widget again adding a KMainWindow to contain our QWidget.

        self.window = KMainWindow()
        self.widget = QWidget()
        self.window.setCentralWidget(self.widget)

A KMainWindow is intended to be the top level widget in most KDE applications. It makes it very easy to add menus, toolbars and a statusbar to your application. In this example I'm afraid to say it exists only to work around a bug where the application crashes if we don't use it.

See the full code.

This version will look the same as the previous.

Pykde-tutorial-2.png

« Back to Part 4 | On to Part 6 »


This page was last edited on 31 May 2019, at 14:04. Content is available under Creative Commons License SA 4.0 unless otherwise noted.