Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6789919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:39:46+00:00 2026-05-26T17:39:46+00:00

I have seen through python – Pygtk VS Pyqt VS WxPython VS Tkinter ;

  • 0

I have seen through python – Pygtk VS Pyqt VS WxPython VS Tkinter; and my question is slightly different.

For instance, I use Ubuntu Gnome, there python-qt is not by default installed; and so if I want to use a python-qt application, I have to download python-qt (plus qt libraries); I’d expect it may be something similar for KDE (or other) desktops…

Well, often I’d need to produce a very simple GUI, and I’d like it to be able to “run anywhere” where there is Python… However, if the user already has some of these libraries, I’d say, why not use them? For complicated stuff, obviously an all-encompassing wrapper would not be viable (after all, all those libraries are cross-platform) – but for simple stuff, like the “hello work” examples below, maybe there is something that already exists?

In comparison to the examples below, I’d imagine something like (pseudocode):

...
appgui = getCrossPlatformGUI()
mw = appgui.getMainWindow()
button = appgui.getButton(args)
appgui.connect(button, args)
appgui.show(button)
...

… where getCrossPlatformGUI() on Linux would first look for python-qt, if not found then python-gtk, then wxWindows, then tkInter (on Windows maybe in a different order, etc) – and would deliver a window/application of the library that has been found on the system, defaulting in all cases with tkInter (which, as I understand, is always built in python).

Many thanks in advance for any answers,
Cheers!

 

hello-pyqt.py (hello-pyqt-ubuntu.png, hello-pyqt-opensuse.png)

#!/usr/bin/env python
# http://en.wikibooks.org/wiki/Python_Programming/PyQt4#Hello.2C_world.21

import sys
from PyQt4 import Qt, QtCore

def sayHello():
  print "Hello, World!"

#####

a = Qt.QApplication(sys.argv)

hellobutton = Qt.QPushButton("Say 'Hello world!'", None)

a.connect(hellobutton, Qt.SIGNAL("clicked()"), sayHello)
hellobutton.clicked.connect(QtCore.QCoreApplication.instance().quit)

hellobutton.show()

a.exec_()

hello-pygtk.py (hello-pygtk-ubuntu.png, hello-pygtk-opensuse.png)

#!/usr/bin/env python
# http://www.pygtk.org/pygtk2tutorial/examples/helloworld.py

import pygtk
pygtk.require('2.0')
import gtk

# This is a callback function. The data arguments are ignored
# in this example. More on callbacks below.
def sayHello(widget, data=None):
  print "Hello, World!"

def destroy(widget, data=None):
  gtk.main_quit()

#####

window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.connect("destroy", destroy)

hellobutton = gtk.Button("Say 'Hello world!'")

hellobutton.connect("clicked", sayHello, None)
hellobutton.connect_object("clicked", gtk.Widget.destroy, window)

window.add(hellobutton)
hellobutton.show()
window.show()

gtk.main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:39:47+00:00Added an answer on May 26, 2026 at 5:39 pm

    The library called wxWidgets was created to do exactly that; the “wx” stands for Windows and X. Their history page has more info. The Python bindings for it are wxPython, as you probably know.

    Apparently by now it feels like another heavyweight GUI library, but it “just” wraps native GTK/Qt/Windows widgets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i go through a code sample where i have seen a different way to
You might have seen video through you tube in iPhone. Normal MPMoviePlayerController has previous,
I have following class (as seen through reflector) public class W : IDisposable {
The default MVVP I have seen has multiple ViewModel objects that are rendered through
I have searched through many times but have not seen this before. Probably really
i have seen some code in which people pass parameter through commandParameter Property of
I have a Python GUI that uses Tkinter. I have to SSH into another
Have you seen yahoo's ipad/tablet home page? The swipe effect for flipping through headlines
I have been trying to understand python metaclasses, and so have been going through
I have a python client which pushes a great deal of data through the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.