'QSize' object has no attribute 'toTuple'

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

'QSize' object has no attribute 'toTuple'

Eraldo Pomponi
Hi All,

When I select qt backend I get "sometimes", depending on the View that I'm displaying, this error: 

Traceback (most recent call last):
  File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py", line 229, in sizeHint
    return self.handler.sizeHint(qt_size_hint)
  File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py", line 141, in sizeHint
    window_size = self._enable_window.control.size().toTuple()
AttributeError: 'QSize' object has no attribute 'toTuple'


It seems to be related with the Item size but I was unable to trace it back to a specific  "malformed" 
parameter . Any thoughts?  

I'm using ETS dev-master of two days ago. 

Cheers,
Eraldo 




_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'QSize' object has no attribute 'toTuple'

Robert Kern
On Fri, Jun 15, 2012 at 5:41 PM, Eraldo Pomponi
<[hidden email]> wrote:

> Hi All,
>
> When I select qt backend I get "sometimes", depending on the View that I'm
> displaying, this error:
>
> Traceback (most recent call last):
>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
> line 229, in sizeHint
>     return self.handler.sizeHint(qt_size_hint)
>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
> line 141, in sizeHint
>     window_size = self._enable_window.control.size().toTuple()
> AttributeError: 'QSize' object has no attribute 'toTuple'
>
>
> It seems to be related with the Item size but I was unable to trace it back
> to a specific  "malformed"
> parameter . Any thoughts?

Hmm, it looks like the .toTuple() method is only in PySide and not
PyQt4. We'll have to do that manually then.

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'QSize' object has no attribute 'toTuple'

Robert Kern
On Fri, Jun 15, 2012 at 5:50 PM, Robert Kern <[hidden email]> wrote:

> On Fri, Jun 15, 2012 at 5:41 PM, Eraldo Pomponi
> <[hidden email]> wrote:
>> Hi All,
>>
>> When I select qt backend I get "sometimes", depending on the View that I'm
>> displaying, this error:
>>
>> Traceback (most recent call last):
>>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
>> line 229, in sizeHint
>>     return self.handler.sizeHint(qt_size_hint)
>>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
>> line 141, in sizeHint
>>     window_size = self._enable_window.control.size().toTuple()
>> AttributeError: 'QSize' object has no attribute 'toTuple'
>>
>>
>> It seems to be related with the Item size but I was unable to trace it back
>> to a specific  "malformed"
>> parameter . Any thoughts?
>
> Hmm, it looks like the .toTuple() method is only in PySide and not
> PyQt4. We'll have to do that manually then.

Does this fix things for you?

https://github.com/enthought/enable/pull/53

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'QSize' object has no attribute 'toTuple'

Eraldo Pomponi
Yes, it is. Thanks Robert.

Would you recommend PySide instead of PyQt4? 

Cheers,
Eraldo


On Fri, Jun 15, 2012 at 6:52 PM, Robert Kern <[hidden email]> wrote:
On Fri, Jun 15, 2012 at 5:50 PM, Robert Kern <[hidden email]> wrote:
> On Fri, Jun 15, 2012 at 5:41 PM, Eraldo Pomponi
> <[hidden email]> wrote:
>> Hi All,
>>
>> When I select qt backend I get "sometimes", depending on the View that I'm
>> displaying, this error:
>>
>> Traceback (most recent call last):
>>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
>> line 229, in sizeHint
>>     return self.handler.sizeHint(qt_size_hint)
>>   File "/home/eraldop/Install_pkg/ETS/enable/enable/qt4/base_window.py",
>> line 141, in sizeHint
>>     window_size = self._enable_window.control.size().toTuple()
>> AttributeError: 'QSize' object has no attribute 'toTuple'
>>
>>
>> It seems to be related with the Item size but I was unable to trace it back
>> to a specific  "malformed"
>> parameter . Any thoughts?
>
> Hmm, it looks like the .toTuple() method is only in PySide and not
> PyQt4. We'll have to do that manually then.

Does this fix things for you?

https://github.com/enthought/enable/pull/53

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: 'QSize' object has no attribute 'toTuple'

Eraldo Pomponi
Hi All, 
 

> Hmm, it looks like the .toTuple() method is only in PySide and not
> PyQt4. We'll have to do that manually then.

Does this fix things for you?

https://github.com/enthought/enable/pull/53


Just for testing purpose I installed PySide. It seems to work properly but when I close the app 
I get: 

Traceback (most recent call last):
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/ui_live.py", line 194, in _on_finished
    self.close(accept)
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/ui_live.py", line 182, in close
    super(_LiveWindow, self).close(rc)
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/ui_base.py", line 435, in close
    self.ui.dispose(rc)
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/ui.py", line 237, in dispose
    self.finish()
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/ui.py", line 264, in finish
    self.reset( destroy = True )
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/ui.py", line 304, in reset
    editor.dispose()
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/tree_editor.py", line 261, in dispose
    self._delete_node(self._tree.invisibleRootItem())
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/tree_editor.py", line 482, in _delete_node
    self._delete_node( cnid )
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/tree_editor.py", line 482, in _delete_node
    self._delete_node( cnid )
  File "/home/eraldop/Install_pkg/ETS/traitsui/traitsui/qt4/tree_editor.py", line 518, in _delete_node
    if (self._editor is not None) and (nid == self._editor._editor_nid):
NotImplementedError: operator not implemented.

Coming back to PyQt4 everything is fine. 

Cheers,
Eraldo 

P.S.
It crashed compiz the first time I closed the app. 


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev