Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #110541

Getting back into PyQt and not loving it.

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Michael Torrie <torriem@gmail.com>
Newsgroups comp.lang.python
Subject Getting back into PyQt and not loving it.
Date Sun, 26 Jun 2016 15:45:00 -0600
Lines 21
Message-ID <mailman.15.1466977505.2358.python-list@python.org> (permalink)
References <7583145f-fa2a-6846-3cd9-9814c7006fdd@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de 526hkiryGF9kjyMqxK1BGAr1x3O2ocAy7e3mQWb0hT8g==
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'classes,': 0.05; 'wrapped': 0.07; 'bindings': 0.09; 'porting': 0.09; 'subject:Getting': 0.09; 'subject:into': 0.09; 'tuple': 0.09; 'python': 0.10; 'python.': 0.11; 'subject:not': 0.11; 'c++.': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'portable,': 0.16; 'pythonic': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:PyQt': 0.16; 'implementing': 0.18; 'class,': 0.22; 'code.': 0.23; 'all.': 0.24; 'header:User- Agent:1': 0.26; 'least': 0.27; 'question': 0.27; 'interface': 0.29; 'signatures': 0.29; 'ago': 0.29; 'convert': 0.29; "i'm": 0.30; 'classes': 0.30; 'code': 0.30; 'strongly': 0.30; 'maybe': 0.33; "i'll": 0.33; 'message-id:@gmail.com': 0.34; 'worked': 0.34; 'advice': 0.35; 'next': 0.35; 'c++': 0.35; 'but': 0.36; 'project': 0.36; 'structures': 0.36; 'to:addr:python-list': 0.36; 'really': 0.37; 'method': 0.37; 'received:org': 0.37; 'seem': 0.37; 'starting': 0.37; 'things': 0.38; 'end': 0.39; 'data': 0.39; 'does': 0.39; 'received:192': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'back': 0.62; 'fantastic': 0.72; 'construct': 0.84; 'etc,': 0.84; 'idiomatic': 0.84; 'reminds': 0.84; 'forgotten': 0.91; 'graphical': 0.91
X-Virus-Scanned amavisd-new at torriefamily.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <7583145f-fa2a-6846-3cd9-9814c7006fdd@gmail.com>
Xref csiph.com comp.lang.python:110541

Show key headers only | View raw


I'm starting to question the advice I gave not long ago to for new users
to consider the Qt toolkit with Python.

I just did a little project porting a simple graphical user interface
from GTK+ to Qt (PyQt4 for now as that's what I have installed).  For
the most part it worked out pretty well.  It's been a while since I used
PyQt or PySide, and I had forgotten what a horrid Python experience Qt
really is, at least in PyQt4.  Maybe the bindings for Qt5 are better...
I'll be working with them next as I convert my working code.

Qt's a fantastic toolkit, and the most mature of any of them, and the
most portable, but man the bindings are not Pythonic at all. PyQt does
not seem to hide the C++-isms at all from the programmer.  I am
constantly wrapping things up in Qt classes like QRect, QPoint, QSize,
etc, when really a python Tuple would have sufficed.  All the data
structures are wrapped in Qt C++ classes, so you end up writing what is
really idiomatic C++ code using Python syntax. Not the best way to code
Python!  Implementing signals in a class, too, reminds you strongly that
you're working with C++ as you have to construct their method signatures
using types that map back into C++.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Getting back into PyQt and not loving it. Michael Torrie <torriem@gmail.com> - 2016-06-26 15:45 -0600
  Re: Getting back into PyQt and not loving it. llanitedave <llanitedave@birdandflower.com> - 2016-06-26 18:05 -0700
    Re: Getting back into PyQt and not loving it. Rustom Mody <rustompmody@gmail.com> - 2016-06-26 18:34 -0700
    Re: Getting back into PyQt and not loving it. MRAB <python@mrabarnett.plus.com> - 2016-06-27 03:12 +0100
      Re: Getting back into PyQt and not loving it. Mark Summerfield <list@qtrac.plus.com> - 2016-06-27 00:33 -0700
    Re: Getting back into PyQt and not loving it. Michael Torrie <torriem@gmail.com> - 2016-06-26 20:41 -0600
      Re: Getting back into PyQt and not loving it. John Ladasky <john_ladasky@sbcglobal.net> - 2016-06-26 23:15 -0700
        Re: Getting back into PyQt and not loving it. Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-26 23:44 -0700
          Re: Getting back into PyQt and not loving it. Michael Torrie <torriem@gmail.com> - 2016-06-27 09:11 -0600
        Re: Getting back into PyQt and not loving it. llanitedave <llanitedave@birdandflower.com> - 2016-06-27 10:23 -0700
    Re: Getting back into PyQt and not loving it. Ethan Furman <ethan@stoneleaf.us> - 2016-06-27 16:00 -0700
  Re: Getting back into PyQt and not loving it. lorenzo.gatti@gmail.com - 2016-06-27 00:27 -0700
  Re: Getting back into PyQt and not loving it. codewizard@gmail.com - 2016-06-27 13:14 -0700
    Re: Getting back into PyQt and not loving it. Michael Torrie <torriem@gmail.com> - 2016-06-27 18:26 -0600
    Re: Getting back into PyQt and not loving it. Sibylle Koczian <nulla.epistola@web.de> - 2016-07-02 12:08 +0200
    Re: Getting back into PyQt and not loving it. Sibylle Koczian <nulla.epistola@web.de> - 2016-07-02 12:08 +0200

csiph-web