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


Groups > comp.lang.python > #98433

Re: [Ubuntu] PyQt5

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Laura Creighton <lac@openend.se>
Newsgroups comp.lang.python
Subject Re: [Ubuntu] PyQt5
Date Sun, 08 Nov 2015 11:20:12 +0100
Lines 44
Message-ID <mailman.122.1446978023.16136.python-list@python.org> (permalink)
References <d453cf4b-7a30-4b2c-9bff-53d488552671@googlegroups.com> <563EDF5A.6040403@telenet.be>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de 1fOdE0aF9AL7G3izyKwPsgyblYFgwL5ICDwNnPH3wNTg==
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:: [': 0.03; 'cc:addr:python-list': 0.09; 'buttons': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'thread': 0.10; 'advance': 0.10; 'assume': 0.11; 'apps': 0.15; 'properly': 0.15; 'assistance!': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sits': 0.16; 'sudo': 0.16; 'threads': 0.16; 'app': 0.16; 'laura': 0.18; 'subject:] ': 0.19; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'do.': 0.22; 'fairly': 0.22; 'examples': 0.24; 'install': 0.25; 'example': 0.26; 'installed': 0.26; 'earlier': 0.27; 'andrew': 0.27; 'fine': 0.28; 'behaviour': 0.29; 'dead,': 0.29; 'locks': 0.29; 'received:se': 0.29; 'thread,': 0.29; 'cc:no real name:2**1': 0.29; "i'm": 0.30; 'code': 0.30; 'supposed': 0.31; 'up.': 0.32; 'maybe': 0.33; 'run': 0.33; 'ubuntu': 0.33; 'structure': 0.34; 'handle': 0.34; 'running': 0.34; 'i.e.': 0.35; 'nov': 0.35; 'something': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'really': 0.37; 'one,': 0.37; 'things': 0.38; 'thank': 0.38; 'well.': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'back': 0.62; '(that': 0.63; 'therefore': 0.67; 'click': 0.76; "'it": 0.84; 'apt-get': 0.84; 'header:In-reply-to:1': 0.84; 'messed': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1446978015; bh=Uv3J7UnNZ/hY0ychBiahGWzUnMkSDzS2v13RPPy8tEQ=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=aUdqAcBDGfRe05/E5te+dvmrmFti4LrGRk5EnkN33PNAlS2nJF4dV7KeTPV+P2iCD 6ym72jxP7AVICCARbvzT8gVGmb/TR5bACiYkJofXh9A9RDFEVHn/zEJsbexwAdRwDt bg+4Gj5ehBcnP5GQjE9Kc6cHZj8zbwvPyYPHU/Vo=
In-reply-to <563EDF5A.6040403@telenet.be>
Comments In-reply-to Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> message dated "Sun, 08 Nov 2015 06:36:26 +0100."
Content-ID <29599.1446978012.1@fido>
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Sun, 08 Nov 2015 11:20:15 +0100 (CET)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:98433

Show key headers only | View raw


In a message of Sun, 08 Nov 2015 06:36:26 +0100, Vincent Vande Vyvre writes:
>Le 08/11/2015 04:13, Andrew Diamond a écrit :
>> Hi!
>>
>> I'm fairly new to Python, and installed pyqt5 and began working through the examples at http://zetcode.com/gui/pyqt5/menustoolbars/  However, whenever I click one of the buttons or menus in the example apps I run that is supposed to quit the application, it locks up.  This happens with all the examples I installed that handle code to quit the app.
>>
>> Running Ubuntu 15.10, and installed pyqt5 via:
>>
>> sudo apt-get install python3-pyqt5
>> sudo apt-get install qtcreator
>>
>> Thank you in advance for any assistance!
>Works fine for me on 15.04.
>
>I've tested the first example with the menuBar.
>
>Have you a message into the terminal? Maybe an error?
>
>Vincent

A suggestion:

When I get the 'it locks up when I want to quit' behaviour
in PyQt4 it is because I have messed up something with my threading.
PyQt4 wants there to be one, main control thread (that handles, among
other things, shutting down) and lots of worker threads which do the
gui-stuff, i.e. all the work that the program really needs to do.

If you manage to structure things so that your control ends up in
a worker thread, then when it is told to quit, your app sits around
and waits for the main control thread to come back and deal with things,
but your main control thread is dead, and therefore isn't coming.

I assume you can get problems like this with Qt5 as well.

Did quitting work properly with the earlier exercises of this tutorial,
or did you try to start learning from the middle?

Laura

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


Thread

[Ubuntu] PyQt5 Andrew Diamond <adiamond1978@gmail.com> - 2015-11-07 19:13 -0800
  Re: [Ubuntu] PyQt5 Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2015-11-08 06:36 +0100
  Re: [Ubuntu] PyQt5 Laura Creighton <lac@openend.se> - 2015-11-08 11:20 +0100
  Re: [Ubuntu] PyQt5 Andrew Diamond <adiamond1978@gmail.com> - 2015-11-08 08:03 -0800
    Re: [Ubuntu] PyQt5 Chris Angelico <rosuav@gmail.com> - 2015-11-09 03:22 +1100
      Re: [Ubuntu] PyQt5 Andrew Diamond <adiamond1978@gmail.com> - 2015-11-08 08:27 -0800
    Re: [Ubuntu] PyQt5 Terry Reedy <tjreedy@udel.edu> - 2015-11-08 18:05 -0500
    Re: [Ubuntu] PyQt5 Laura Creighton <lac@openend.se> - 2015-11-09 03:41 +0100
    Re: [Ubuntu] PyQt5 Terry Reedy <tjreedy@udel.edu> - 2015-11-09 05:24 -0500

csiph-web