Ticket #37407: pyqt4_qsize.patch

File pyqt4_qsize.patch, 885 bytes (added by jjstickel (Jonathan Stickel), 12 years ago)
  • enable/qt4/base_window.py

    From 54a27de078eab56138ff4bcb31c185df9f6e3609 Mon Sep 17 00:00:00 2001
    From: Robert Kern <rkern@enthought.com>
    Date: Fri, 15 Jun 2012 17:51:19 +0100
    Subject: [PATCH] BUG: Avoid a PySide-only API.
    
    ---
     enable/qt4/base_window.py |    3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/enable/qt4/base_window.py b/enable/qt4/base_window.py
    index 8e30688..81cb250 100644
    a b def sizeHint(self, qt_size_hint): 
    138138        """
    139139
    140140        preferred_size = self._enable_window.component.get_preferred_size()
    141         window_size = self._enable_window.control.size().toTuple()
     141        q_size = self._enable_window.control.size()
     142        window_size = (q_size.width(), q_size.height())
    142143
    143144        if qt_size_hint.width() < 0:
    144145            width = max(preferred_size[0], window_size[0])