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

Previous Next

Package: emacs;

Reported by: Angus Melville <anguscmelville <at> gmail.com>

Date: Mon, 2 Nov 2015 16:11:02 UTC

Severity: normal

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21813 in the body.
You can then email your comments to 21813 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21813; Package emacs. (Mon, 02 Nov 2015 16:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Angus Melville <anguscmelville <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 02 Nov 2015 16:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angus Melville <anguscmelville <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; python.el & Qt (PySide) - widgets remain hidden
Date: Mon, 2 Nov 2015 15:13:39 +0000
[Message part 1 (text/plain, inline)]
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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21813; Package emacs. (Thu, 03 Dec 2020 10:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 21813 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Angus Melville <anguscmelville <at> gmail.com>
Cc: 21813 <at> debbugs.gnu.org
Subject: Re: bug#21813: 24.5; python.el & Qt (PySide) - widgets remain hidden
Date: Thu, 03 Dec 2020 11:51:52 +0100
Angus Melville <anguscmelville <at> gmail.com> writes:

> 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

[...]

> However if run from EMACS using the default python.el mode, no widget
> will pop up on the screen.

(This bug report unfortunately got no response at the time.)

I tried reproducing this in Emacs 28, but I apparently do not have the
correct libraries installed, and after "apt install" on everything that
seemed likely, I still get

ImportError: No module named PySide

Anybody know what I should be installing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21813; Package emacs. (Mon, 08 Feb 2021 07:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 21813 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Angus Melville <anguscmelville <at> gmail.com>
Cc: 21813 <at> debbugs.gnu.org
Subject: Re: bug#21813: 24.5; python.el & Qt (PySide) - widgets remain hidden
Date: Mon, 08 Feb 2021 08:30:26 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I tried reproducing this in Emacs 28, but I apparently do not have the
> correct libraries installed, and after "apt install" on everything that
> seemed likely, I still get
>
> ImportError: No module named PySide
>
> Anybody know what I should be installing?

There was no response here, so it seems unlikely that there'll be
further progress in this bug report, and I'm closing it.  If progress
can be made, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 21813 <at> debbugs.gnu.org and Angus Melville <anguscmelville <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 08 Feb 2021 07:31:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Mar 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 125 days ago.

Previous Next


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