|
|
Creating a window using PyGTK is very easy. To continue, we first need to import the gtk module in our code.
The gtk module comprises the gtk.Window class. Its object constructs a toplevel window. We derive a class from gtk.Window.
Define the constructor and call the show_all() method of the gtk.window class.
We currently have to declare the object of this class and start an event loop by calling its main() method.
It is suggested we add a label “Hello World” in the parent window.
The resulting is a complete code to display “Hello World”−
The execution of the above code will yield the resulting output –
|
|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.