I am trying to switch from PySide to PyQt.
The following code seemed to work in PySide:
class FramedViewedTextGlyph(CompositeGlyph, ViewSizeable, Proxiable,
QGraphicsItemGroup): # no class inherits QObject
def __init__(self):
super(FramedViewedTextGlyph, self).__init__() # init group
This is an update to my previous post.
Here is an abstract of the code for easier reading:
class B(object):
def __init__(self):
self.a1 = A()
self.a1.signal1.connect(self.handler)# Fails in PyQt, succeeds
in PySide
def handler(self):
pass
class A (Mixin,
'parent = None' in Python means: a keyword argument, keyword is
'parent', default value is None. (That's basic knowledge of Python.)
But note that the PyQt documentation requires a little more
interpretation because: it is automatically derived from the C++ Qt
documentation. Thus 'QWidget
I haven't done much exploration as to why.
Ubuntu 13.04
Qt 5.0.2 (with Ubuntu)
package QtCreator from Ubuntu
Python 3.3
sip 4.15.2
PyQt-gpl-5.1.1-snapshot-fc7b8711dba0
___
PyQt mailing listPyQt@riverbankcomputing.com
More information:
Apparently no errors during build but the .so is missing after install.
In the build directory, after a build:
Exists:
cfgtest_QtSvg.pro and .cpp
Not exists:
cfgtest_QtSvg.o and .exe and no QtSvg directory
I am not very familiar with sip and the PyQt and Qt build processes.
I determined that QtSvg is not a subtarget in the Makefile.
I will assume that is intended and that I shouldn't be using a
snapshot. I will regress to the released PyQt5.1.
___
PyQt mailing listPyQt@riverbankcomputing.com
The solution is to ensure that the distribution's package for QtSvg
development is installed.
On Ubunutu 13.04, installing package 'Qtcreator' is not enough.
You also must install package 'libqt5svg5-dev'.
(A decision made by Ubuntu packagers?)
The symptoms (in my case) started with a Python
This code worked in PyQt4 and Qt4 to get a dictionary of paper size names:
paperSizeNames = {}
print(vars(QPrinter))
for key, value in vars(QPrinter).items(): # Python2 iteritems():
if isinstance(value, QPrinter.PageSize):
print(key, value)
paperSizeNames[value] = key
It no longer
The QPageSetupDialog fails to appear, or is empty and small.
I posted code that demonstrates the problem at:
http://qt-project.org/forums/viewthread/33589/
I also tried parenting the QPageSetupDialog (doesn't that make PyQt own it?)
It seemed to work before I upgraded from Qt 4, but I might