GTK+ 3 is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License. Along with Qt, it is one of the most popular toolkits for the Wayland and X11 windowing systems. Let’s see how to create a window and a button using GTK+ 3.
Follow below steps:
- import GTK+ 3 module
- Create main window.
- Create Button.
we have to import the Gtk module to be able to access GTK+’s classes and functions.
Note: In IDE’s like Pycharm we can install a package named PyGObject in order to use GTK+ 3.
Code #2: Create a button
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course