GNU bug report logs - #21813
24.5; python.el & Qt (PySide) - widgets remain hidden

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Angus Melville <anguscmelville@HIDDEN>; dated Mon, 2 Nov 2015 16:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Nov 2015 16:10:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 02 11:10:33 2015
Received: from localhost ([127.0.0.1]:49879 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZtHgl-0007X3-Uu
	for submit <at> debbugs.gnu.org; Mon, 02 Nov 2015 11:10:32 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44707)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGnt-00067l-LE
 for submit <at> debbugs.gnu.org; Mon, 02 Nov 2015 10:13:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGno-00026X-Qb
 for submit <at> debbugs.gnu.org; Mon, 02 Nov 2015 10:13:49 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53439)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGno-00026T-NJ
 for submit <at> debbugs.gnu.org; Mon, 02 Nov 2015 10:13:44 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54662)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGnm-0005iF-TL
 for bug-gnu-emacs@HIDDEN; Mon, 02 Nov 2015 10:13:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGnl-00021T-3v
 for bug-gnu-emacs@HIDDEN; Mon, 02 Nov 2015 10:13:42 -0500
Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:37181)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <anguscmelville@HIDDEN>) id 1ZtGnk-000208-RV
 for bug-gnu-emacs@HIDDEN; Mon, 02 Nov 2015 10:13:41 -0500
Received: by wicfv8 with SMTP id fv8so52561225wic.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 02 Nov 2015 07:13:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=OBvuFR2I893xPa5+WThANM5eoRmN8mrr2RvSktfFeuA=;
 b=UVispzGgsyx4mLT0RivQ9yOdqM008/tEKvJMHLOw2CJCwA9T9yPkSg6nbB3A7XLH6D
 +kyTAN+tq9sHHvXCfUuiVSXhGFPwjyhmBTt7LjHZHjgP6RH3tlyvqx07G53CMGKaS7LC
 xvR0eKy8VEaamWN1daDNeWKl+hVOg7zMvnQr8kKLM9moYfPf5l4Aozbax4I7/vcf7Rfk
 dN2NncWwoCWBhxKQZHjsAS8s19D7S8Rp4MPNMcFF5cc9Ur2ijpVKW9YCqoELsaaJMFj6
 t+W+YEVZXDwXIdhITKuP1dN07uTK1rtNClAcaxMTI8TE09SF5XROVIPJuN9/aa7NK6ll
 5Qpg==
MIME-Version: 1.0
X-Received: by 10.194.190.19 with SMTP id gm19mr27367557wjc.0.1446477219742;
 Mon, 02 Nov 2015 07:13:39 -0800 (PST)
Received: by 10.194.249.35 with HTTP; Mon, 2 Nov 2015 07:13:39 -0800 (PST)
Date: Mon, 2 Nov 2015 15:13:39 +0000
Message-ID: <CAMtXkAVU9ernVJAVnNCxKrX2ODEH6T0-xF=YyWnhyr=OASB7MQ@HIDDEN>
Subject: 24.5; python.el & Qt (PySide) - widgets remain hidden
From: Angus Melville <anguscmelville@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=047d7bea3792dbcaca0523903862
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 02 Nov 2015 11:10:30 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--047d7bea3792dbcaca0523903862
Content-Type: text/plain; charset=UTF-8

The following lines should make a QT widget appear on the screen, and will
do if run direcly from IDLE or from iPython notebook:

import sys
from PySide import QtGui

app = QtGui.QApplication.instance()
if not app:
    app = QtGui.QApplication(sys.argv)

class Widget(QtGui.QDialog):
    def __init__(self):
        super().__init__()

widget = Widget()
widget.show()

sys.exit(app.exec_())

However if run from EMACS using the default python.el mode, no widget
will pop up on the screen.  This means that many Pyside programs, such
as example programs found at
https://github.com/nicoddemus/PySide-Examples/tree/master/examples when
run from EMACS will produce no response.

If we modify the program to embed a second widget within our main widget,
as below, the widget does pop up on the screen:

import sys
from PySide import QtGui

app = QtGui.QApplication.instance()
if not app:
    app = QtGui.QApplication(sys.argv)

class Widget1(QtGui.QDialog):
    def __init__(self):
        super().__init__()
        widget2 = Widget2()
        widget2.show()
        layout = QtGui.QVBoxLayout()
        layout.addWidget(widget2)
        self.setLayout(layout)

class Widget2(QtGui.QDialog):
    def __init__(self):
        super().__init__()

widget = Widget1()
widget.show()

sys.exit(app.exec_())


This suggests that perhaps in the first example the widget immediately goes
out of scope.

Thanks for any help

Angus M


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Inferior Python

Minor modes in effect:
  compilation-shell-minor-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
byte-code: End of buffer
completing-read-default: Command attempted to use minibuffer while in
minibuffer [3 times]
Making python-shell-interpreter local to *Python* while let-bound!
Making python-shell-interpreter-args local to *Python* while let-bound!
Sent python-shell-completion-setup-code
Sent python-ffap-setup-code
Sent python-eldoc-setup-code

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils compile cl-extra python easymenu json
comint ring cl-loaddefs cl-lib ansi-color warnings package epg-config
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32notify w32 multi-tty emacs)

Memory information:
((conses 8 94209 6459)
 (symbols 32 19059 0)
 (miscs 32 95 138)
 (strings 16 16099 3431)
 (string-bytes 1 475380)
 (vectors 8 11678)
 (vector-slots 4 407444 2242)
 (floats 8 64 390)
 (intervals 28 363 54)
 (buffers 508 15))

--047d7bea3792dbcaca0523903862
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The following lines should make a QT widget appear on the =
screen, and will do if run direcly from IDLE or from iPython notebook:<br><=
br>import sys<br>from PySide import QtGui<br><br>app =3D QtGui.QApplication=
.instance()<br>if not app:<br>=C2=A0=C2=A0=C2=A0 app =3D QtGui.QApplication=
(sys.argv)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <br>class Widget(Q=
tGui.QDialog):<br>=C2=A0=C2=A0=C2=A0 def __init__(self):<br>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__()<br><br>widget =3D Widget()<b=
r>widget.show()<br><br>sys.exit(app.exec_())<br><br>However if run from EMA=
CS using the default python.el mode, no widget<br>will pop up on the screen=
.=C2=A0 This means that many Pyside programs, such<br>as example programs f=
ound at<br><a href=3D"https://github.com/nicoddemus/PySide-Examples/tree/ma=
ster/examples">https://github.com/nicoddemus/PySide-Examples/tree/master/ex=
amples</a> when<br>run from EMACS will produce no response. <br><br>If we m=
odify the program to embed a second widget within our main widget, as below=
, the widget does pop up on the screen:<br><br>import sys<br>from PySide im=
port QtGui<br><br>app =3D QtGui.QApplication.instance()<br>if not app:<br>=
=C2=A0=C2=A0=C2=A0 app =3D QtGui.QApplication(sys.argv)<br>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <br>class Widget1(QtGui.QDialog):<br>=C2=A0=C2=
=A0=C2=A0 def __init__(self):<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 super().__init__()<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 widget2 =
=3D Widget2()<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 widget2.show()<=
br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 layout =3D QtGui.QVBoxLayout(=
)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 layout.addWidget(widget2)<b=
r>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.setLayout(layout)<br><br>=
class Widget2(QtGui.QDialog):<br>=C2=A0=C2=A0=C2=A0 def __init__(self):<br>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__()<br><br>widget=
 =3D Widget1()<br>widget.show()<br><br>sys.exit(app.exec_())<br><br><br>Thi=
s suggests that perhaps in the first example the widget immediately goes ou=
t of scope.<br><br>Thanks for any help<br><br>Angus M<br><br><br>In GNU Ema=
cs 24.5.1 (i686-pc-mingw32)<br>=C2=A0of 2015-04-11 on LEG570<br>Windowing s=
ystem distributor `Microsoft Corp.&#39;, version 6.3.9600<br>Configured usi=
ng:<br>=C2=A0`configure --prefix=3D/c/usr --host=3Di686-pc-mingw32&#39;<br>=
<br>Important settings:<br>=C2=A0 value of $LANG: ENG<br>=C2=A0 locale-codi=
ng-system: cp1252<br><br>Major mode: Inferior Python<br><br>Minor modes in =
effect:<br>=C2=A0 compilation-shell-minor-mode: t<br>=C2=A0 tooltip-mode: t=
<br>=C2=A0 electric-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 =
tool-bar-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-shadow-mode=
: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lock-mode: t<br>=C2=
=A0 blink-cursor-mode: t<br>=C2=A0 auto-composition-mode: t<br>=C2=A0 auto-=
encryption-mode: t<br>=C2=A0 auto-compression-mode: t<br>=C2=A0 line-number=
-mode: t<br>=C2=A0 transient-mark-mode: t<br><br>Recent messages:<br>For in=
formation about GNU Emacs and the GNU system, type C-h C-a.<br>byte-code: E=
nd of buffer<br>completing-read-default: Command attempted to use minibuffe=
r while in minibuffer [3 times]<br>Making python-shell-interpreter local to=
 *Python* while let-bound!<br>Making python-shell-interpreter-args local to=
 *Python* while let-bound!<br>Sent python-shell-completion-setup-code<br>Se=
nt python-ffap-setup-code<br>Sent python-eldoc-setup-code<br><br>Load-path =
shadows:<br>None found.<br><br>Features:<br>(shadow sort gnus-util mail-ext=
r emacsbug message format-spec rfc822 mml<br>mml-sec mm-decode mm-bodies mm=
-encode mail-parse rfc2231 mailabbrev<br>gmm-utils mailheader sendmail rfc2=
047 rfc2045 ietf-drums mm-util<br>help-fns mail-prsvr mail-utils compile cl=
-extra python easymenu json<br>comint ring cl-loaddefs cl-lib ansi-color wa=
rnings package epg-config<br>time-date tooltip electric uniquify ediff-hook=
 vc-hooks lisp-float-type<br>mwheel dos-w32 ls-lisp w32-common-fns disp-tab=
le w32-win w32-vars<br>tool-bar dnd fontset image regexp-opt fringe tabulat=
ed-list newcomment<br>lisp-mode prog-mode register page menu-bar rfn-eshado=
w timer select<br>scroll-bar mouse jit-lock font-lock syntax facemenu font-=
core frame cham<br>georgian utf-8-lang misc-lang vietnamese tibetan thai ta=
i-viet lao<br>korean japanese hebrew greek romanian slovak czech european e=
thiopic<br>indian cyrillic chinese case-table epa-hook jka-cmpr-hook help s=
imple<br>abbrev minibuffer nadvice loaddefs button faces cus-face macroexp =
files<br>text-properties overlay sha1 md5 base64 format env code-pages mule=
<br>custom widget hashtable-print-readable backquote make-network-process<b=
r>w32notify w32 multi-tty emacs)<br><br>Memory information:<br>((conses 8 9=
4209 6459)<br>=C2=A0(symbols 32 19059 0)<br>=C2=A0(miscs 32 95 138)<br>=C2=
=A0(strings 16 16099 3431)<br>=C2=A0(string-bytes 1 475380)<br>=C2=A0(vecto=
rs 8 11678)<br>=C2=A0(vector-slots 4 407444 2242)<br>=C2=A0(floats 8 64 390=
)<br>=C2=A0(intervals 28 363 54)<br>=C2=A0(buffers 508 15))<br></div>

--047d7bea3792dbcaca0523903862--




Acknowledgement sent to Angus Melville <anguscmelville@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21813; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.