[Bug 1312857] Re: Not constructing a QApplication before a QPaintDevice leads to core dumo
Scott Kitterman
ubuntu at kitterman.com
Fri Apr 25 18:47:28 UTC 2014
"QWidget: Must construct a QApplication before a QPaintDevice" is the
key. That's a Qt error message telling you your code is wrong. Not
PyQt specific.
** Changed in: python-qt4 (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-qt4 in Ubuntu.
https://bugs.launchpad.net/bugs/1312857
Title:
Not constructing a QApplication before a QPaintDevice leads to core
dumo
Status in “python-qt4” package in Ubuntu:
Invalid
Bug description:
I was playing with PyQt4.
1) Made a file named P2.py with
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui
class P2(QtGui.QWidget):
def __init__(s):
super(P2,s).__init__()
# print ">>>> dir(P2):", dir(P2)
print "is initUI in dir()?", 'initUI' in dir()
s.initUI()
def initUI(s):
s.setGeometry(300, 300, 250, 150)
s.setWindowTitle('Icon')
s.setWindowIcon(QtGui.QIcon('web.png'))
s.show()
2) Started python interpreter
3) Inside python I gave the following commands
>>> import P2
>>> q=P2.P2()
with the following result
QWidget: Must construct a QApplication before a QPaintDevice
Aborted (core dumped)
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-qt4 4.10.4+dfsg-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: KDE
Date: Fri Apr 25 19:37:57 2014
InstallationDate: Installed on 2012-02-18 (796 days ago)
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: python-qt4
UpgradeStatus: Upgraded to trusty on 2014-04-20 (4 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/1312857/+subscriptions
More information about the foundations-bugs
mailing list