Discussion:
guidata/guiqwt do not work with PyQt v4.4
Carlos Pascual
2011-05-16 16:14:15 UTC
Permalink
Hi,
I installed guidata on a SuSe11.1 (with PyQt 4.4) and I am getting the
following exception when running may of the tests:

+++++++++++++++++++
guidata/tests> python datasetgroup.py
Traceback (most recent call last):
File "datasetgroup.py", line 28, in <module>
g.edit()
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/datatypes.py", line 844, in edit
apply=apply)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 63, in __init__
self.setup_instance( instance )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 155, in setup_instance
self.edit_layout.append( self.layout_factory(dataset, grid) )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 107, in layout_factory
return DataSetEditLayout( self, instance, grid )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 794, in __init__
self.edit = EditLayoutClass(self.parent_layout.parent, self.dataset,
self.layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 517, in __init__
super(DirectoryWidget, self).__init__(item, parent_layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 418, in __init__
self.group.addWidget(old_group)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 406, in addWidget
super(GroupLayout, self).addWidget(widget)
AttributeError: 'super' object has no attribute 'addWidget'

+++++++++++++++++++++++++++

The problem is caused by the use of "super" outside of the __init__.py method
of subclasses that inherit from PyQt classes , which was problematic prior to
PyQt 4.5. See:

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.html#super-
and-pyqt-classes

The solution is simple. For example, in *this case*, it is just a matter of
changing line 406 of qtitemwidgets.py from :

super(GroupLayout, self).addWidget(widget)

to:

QHBoxLayout.addWidget(self, widget)

(i.e., just using a explicit call to the parent class instead of using super,
which is in my opinion more readable anyway)

I haven't checked the rest of the package, but there will probably be other
uses of super that can be changed similarly with explicit calls to the parent
class . This would restore the compatibility with Qt 4.4 (which is what is
stated in the web page).

Note that the same problem occurs in guiqwt (see, for example
GridItem.attach() in curve.py )

Of course the lazy solution is just to make guidata and guiqwt depend on
Qt>=4.5. But for me that would be terrible because in my Institute we are
stuck to Qt 4.4 in production machines (we cannot change too often).

Cheers,

Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Carlos Pascual
2011-05-17 16:51:57 UTC
Permalink
Hi,
I am trying to patch the guidata and guiqwt projects so that they work with
PyQt 4.4 (see my last email).

Here is a patch for guidata-1.3.1, which passed all the tests in guidata-test.

I am doing the same with guiqwt-2.3.1, but I am still getting a few exceptions
in some tests (but at least it runs, which was not the case with the original
code). I'll try to fix them before sending the patch.

PS, to apply the patch, simply unzip the 1.3.1 sources in a fresh dir, copy my
patch file to it, change dir to it and run:
patch -p1 -i guidata-1.3.1-patched_for_Qt4_4.patch
Post by Carlos Pascual
Hi,
I installed guidata on a SuSe11.1 (with PyQt 4.4) and I am getting the
+++++++++++++++++++
guidata/tests> python datasetgroup.py
File "datasetgroup.py", line 28, in <module>
g.edit()
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/datatypes.py", line 844, in edit
apply=apply)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 63, in __init__
self.setup_instance( instance )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 155, in setup_instance
self.edit_layout.append( self.layout_factory(dataset, grid) )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 107, in layout_factory
return DataSetEditLayout( self, instance, grid )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 794, in __init__
self.edit = EditLayoutClass(self.parent_layout.parent, self.dataset,
self.layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 517, in __init__
super(DirectoryWidget, self).__init__(item, parent_layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 418, in __init__
self.group.addWidget(old_group)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 406, in addWidget
super(GroupLayout, self).addWidget(widget)
AttributeError: 'super' object has no attribute 'addWidget'
+++++++++++++++++++++++++++
The problem is caused by the use of "super" outside of the __init__.py
method of subclasses that inherit from PyQt classes , which was
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.html#sup
er- and-pyqt-classes
The solution is simple. For example, in *this case*, it is just a matter
super(GroupLayout, self).addWidget(widget)
QHBoxLayout.addWidget(self, widget)
(i.e., just using a explicit call to the parent class instead of using
super, which is in my opinion more readable anyway)
I haven't checked the rest of the package, but there will probably be other
uses of super that can be changed similarly with explicit calls to the
parent class . This would restore the compatibility with Qt 4.4 (which is
what is stated in the web page).
Note that the same problem occurs in guiqwt (see, for example
GridItem.attach() in curve.py )
Of course the lazy solution is just to make guidata and guiqwt depend on
Qt>=4.5. But for me that would be terrible because in my Institute we are
stuck to Qt 4.4 in production machines (we cannot change too often).
Cheers,
Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Carlos Pascual
2011-05-18 09:40:11 UTC
Permalink
Here is the patch for guiqwt-2.3.1.
I tested it using all the tests in guiqwt-tests and I didn't find any problem.

The changes are:
1.-substituting "super" calls by explicit base class class (only those in Qt
Derived Classes and not in the __init__ method)
2.-casting the argument of a QAction.setData() call to a QVariant()
3.-allowing a fallback from QTransform.fromTranslate to QTransform().translate

To apply the patch, just follow the same recipe as in my previous email about
guidata.

I hope it helps.

PD: Pierre, do you think these changes will get into the official version?
Post by Carlos Pascual
Hi,
I am trying to patch the guidata and guiqwt projects so that they work with
PyQt 4.4 (see my last email).
Here is a patch for guidata-1.3.1, which passed all the tests in guidata-test.
I am doing the same with guiqwt-2.3.1, but I am still getting a few
exceptions in some tests (but at least it runs, which was not the case
with the original code). I'll try to fix them before sending the patch.
PS, to apply the patch, simply unzip the 1.3.1 sources in a fresh dir, copy
patch -p1 -i guidata-1.3.1-patched_for_Qt4_4.patch
Post by Carlos Pascual
Hi,
I installed guidata on a SuSe11.1 (with PyQt 4.4) and I am getting the
+++++++++++++++++++
guidata/tests> python datasetgroup.py
File "datasetgroup.py", line 28, in <module>
g.edit()
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/datatypes.py", line 844, in edit
apply=apply)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 63, in __init__
self.setup_instance( instance )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 155, in setup_instance
self.edit_layout.append( self.layout_factory(dataset, grid) )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 107, in layout_factory
return DataSetEditLayout( self, instance, grid )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 794, in __init__
self.edit = EditLayoutClass(self.parent_layout.parent, self.dataset,
self.layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 517, in __init__
super(DirectoryWidget, self).__init__(item, parent_layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 418, in __init__
self.group.addWidget(old_group)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 406, in addWidget
super(GroupLayout, self).addWidget(widget)
AttributeError: 'super' object has no attribute 'addWidget'
+++++++++++++++++++++++++++
The problem is caused by the use of "super" outside of the __init__.py
method of subclasses that inherit from PyQt classes , which was
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.html#s
up er- and-pyqt-classes
The solution is simple. For example, in *this case*, it is just a matter
super(GroupLayout, self).addWidget(widget)
QHBoxLayout.addWidget(self, widget)
(i.e., just using a explicit call to the parent class instead of using
super, which is in my opinion more readable anyway)
I haven't checked the rest of the package, but there will probably be
other uses of super that can be changed similarly with explicit calls to
the parent class . This would restore the compatibility with Qt 4.4
(which is what is stated in the web page).
Note that the same problem occurs in guiqwt (see, for example
GridItem.attach() in curve.py )
Of course the lazy solution is just to make guidata and guiqwt depend on
Qt>=4.5. But for me that would be terrible because in my Institute we are
stuck to Qt 4.4 in production machines (we cannot change too often).
Cheers,
Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Pierre Raybaut
2011-05-21 17:13:39 UTC
Permalink
Hi Carlos,

Thanks for taking the time to fix all these compatiblity issues with
PyQt v4.4.

I'll take a look at these two patches as soon as I can. I assume that
there is no rush since you are now using these patched versions of
guidata and guiqwt but if there is, please do not hesitate to mention
it and I'll schedule a new release very soon.

To avoid such problems in next versions of guidata and guiqwt, I
propose adding "coding guidelines" to the source packages:
http://code.google.com/p/guiqwt/issues/detail?id=15

Cheers,
Pierre
Post by Carlos Pascual
Here is the patch for guiqwt-2.3.1.
I tested it using all the tests in guiqwt-tests and I didn't find any problem.
1.-substituting "super" calls by explicit base class class (only those in Qt
Derived Classes and not in the __init__ method)
2.-casting the argument of a QAction.setData() call to a QVariant()
3.-allowing a fallback from QTransform.fromTranslate to QTransform().translate
To apply the patch, just follow the same recipe as in my previous email about
guidata.
I hope it helps.
PD: Pierre, do you think these changes will get into the official version?
Post by Carlos Pascual
Hi,
I am trying to patch the guidata and guiqwt projects so that they work with
PyQt 4.4 (see my last email).
Here is a patch for guidata-1.3.1, which passed all the tests in guidata-test.
I am doing the same with guiqwt-2.3.1, but I am still getting a few
exceptions in some tests (but at least it runs, which was not the case
with the original code). I'll try to fix them before sending the patch.
PS, to apply the patch, simply unzip the 1.3.1 sources in a fresh dir, copy
patch -p1 -i guidata-1.3.1-patched_for_Qt4_4.patch
Post by Carlos Pascual
Hi,
I installed guidata on a SuSe11.1 (with PyQt 4.4) and I am getting the
+++++++++++++++++++
guidata/tests> python datasetgroup.py
  File "datasetgroup.py", line 28, in <module>
    g.edit()
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/datatypes.py", line 844, in edit
    apply=apply)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 63, in __init__
    self.setup_instance( instance )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 155, in setup_instance
    self.edit_layout.append( self.layout_factory(dataset, grid) )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 107, in layout_factory
    return DataSetEditLayout( self, instance, grid )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
    self.setup_layout( items )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
    widget = self.build_widget(item)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
    widget = factory( item.bind(self.instance), self )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 794, in __init__
    self.edit = EditLayoutClass(self.parent_layout.parent, self.dataset,
self.layout)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
    self.setup_layout( items )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
    widget = self.build_widget(item)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
    widget = factory( item.bind(self.instance), self )
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 517, in __init__
    super(DirectoryWidget, self).__init__(item, parent_layout)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 418, in __init__
    self.group.addWidget(old_group)
  File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 406, in addWidget
    super(GroupLayout, self).addWidget(widget)
AttributeError: 'super' object has no attribute 'addWidget'
+++++++++++++++++++++++++++
The problem is caused by the use of "super" outside of the __init__.py
method of subclasses that inherit from PyQt classes , which was
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.ht...
up er- and-pyqt-classes
The solution is simple. For example, in *this case*,  it is just a matter
super(GroupLayout, self).addWidget(widget)
QHBoxLayout.addWidget(self, widget)
(i.e., just using a explicit call to the parent class instead of using
super, which is in my opinion more readable anyway)
I haven't checked the rest of the package, but there will probably be
other uses of super that can be changed similarly with explicit calls to
the parent class . This would restore the compatibility with Qt 4.4
(which is what is stated in the web page).
Note that the same problem occurs in guiqwt (see, for example
GridItem.attach() in curve.py )
Of course the lazy solution is just to make guidata and guiqwt depend on
Qt>=4.5. But for me that would be terrible because in my Institute we are
stuck  to Qt 4.4 in production machines (we cannot change too often).
Cheers,
Carlos
--
+----------------------------------------------------+
 Carlos Pascual Izarra
 Scientific Software Coordinator
 Computing Division
 Cells / Alba Synchrotron  [http:/www.cells.es]
 Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
 E-08290 Cerdanyola del Valles (Barcelona), Spain
 Phone: +34 93 592 4428
+----------------------------------------------------+
 guiqwt-2.1.3-patched_for_Qt4_4.patch
35KAfficherTélécharger
Carlos Pascual
2011-05-23 07:55:31 UTC
Permalink
Hi Pierre,

Great news. As you say, I am not in a hurry at all. The only thing that
matters to me is knowing that they will eventually be added since that saves
me the trouble of re-patching whenever I want to update.

Cheers

Carlos
Post by Pierre Raybaut
Hi Carlos,
Thanks for taking the time to fix all these compatiblity issues with
PyQt v4.4.
I'll take a look at these two patches as soon as I can. I assume that
there is no rush since you are now using these patched versions of
guidata and guiqwt but if there is, please do not hesitate to mention
it and I'll schedule a new release very soon.
To avoid such problems in next versions of guidata and guiqwt, I
http://code.google.com/p/guiqwt/issues/detail?id=15
Cheers,
Pierre
Post by Carlos Pascual
Here is the patch for guiqwt-2.3.1.
I tested it using all the tests in guiqwt-tests and I didn't find any problem.
1.-substituting "super" calls by explicit base class class (only those in
Qt Derived Classes and not in the __init__ method)
2.-casting the argument of a QAction.setData() call to a QVariant()
3.-allowing a fallback from QTransform.fromTranslate to
QTransform().translate
To apply the patch, just follow the same recipe as in my previous email
about guidata.
I hope it helps.
PD: Pierre, do you think these changes will get into the official version?
Post by Carlos Pascual
Hi,
I am trying to patch the guidata and guiqwt projects so that they work
with PyQt 4.4 (see my last email).
Here is a patch for guidata-1.3.1, which passed all the tests in guidata-test.
I am doing the same with guiqwt-2.3.1, but I am still getting a few
exceptions in some tests (but at least it runs, which was not the case
with the original code). I'll try to fix them before sending the patch.
PS, to apply the patch, simply unzip the 1.3.1 sources in a fresh dir,
patch -p1 -i guidata-1.3.1-patched_for_Qt4_4.patch
Post by Carlos Pascual
Hi,
I installed guidata on a SuSe11.1 (with PyQt 4.4) and I am getting
+++++++++++++++++++
guidata/tests> python datasetgroup.py
File "datasetgroup.py", line 28, in <module>
g.edit()
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/datatypes.py", line 844, in edit
apply=apply)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 63, in __init__
self.setup_instance( instance )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 155, in setup_instance
self.edit_layout.append( self.layout_factory(dataset, grid) )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 107, in layout_factory
return DataSetEditLayout( self, instance, grid )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 794, in __init__
self.edit = EditLayoutClass(self.parent_layout.parent, self.dataset,
self.layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 189, in __init__
self.setup_layout( items )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 254, in setup_layout
widget = self.build_widget(item)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtwidgets.py", line 261, in build_widget
widget = factory( item.bind(self.instance), self )
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 517, in __init__
super(DirectoryWidget, self).__init__(item, parent_layout)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 418, in __init__
self.group.addWidget(old_group)
File "/usr/local/lib64/python2.6/site-
packages/guidata/dataset/qtitemwidgets.py", line 406, in addWidget
super(GroupLayout, self).addWidget(widget)
AttributeError: 'super' object has no attribute 'addWidget'
+++++++++++++++++++++++++++
The problem is caused by the use of "super" outside of the
__init__.py method of subclasses that inherit from PyQt classes ,
which was
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.ht.
..
up er- and-pyqt-classes
The solution is simple. For example, in *this case*, it is just a
super(GroupLayout, self).addWidget(widget)
QHBoxLayout.addWidget(self, widget)
(i.e., just using a explicit call to the parent class instead of
using super, which is in my opinion more readable anyway)
I haven't checked the rest of the package, but there will probably be
other uses of super that can be changed similarly with explicit calls
to the parent class . This would restore the compatibility with Qt
4.4 (which is what is stated in the web page).
Note that the same problem occurs in guiqwt (see, for example
GridItem.attach() in curve.py )
Of course the lazy solution is just to make guidata and guiqwt depend
on Qt>=4.5. But for me that would be terrible because in my
Institute we are stuck to Qt 4.4 in production machines (we cannot
change too often).
Cheers,
Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
Phone: +34 93 592 4428
+----------------------------------------------------+
guiqwt-2.1.3-patched_for_Qt4_4.patch
35KAfficherTélécharger
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Loading...