Skip to content
Browse files

QSize().toSize() did not exist on osx

QPoint().toPoint() did not exist in osx

change import from QSize to QSizef
change import from QPoint to QPointf

http://qt-project.org/doc/qt-4.8/qsizef.html

QSize QSizeF::toSize () const
Returns an integer based copy of this size.
Note that the coordinates in the returned size will be rounded to the nearest integer.
See also QSizeF().
  • Loading branch information...
1 parent 340d0e6 commit ab977ede004243b400de9a3c9f58dc961e1b957c @marchon committed Oct 7, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 ninja_ide/gui/ide.py
View
11 ninja_ide/gui/ide.py
@@ -36,7 +36,9 @@
from PyQt4.QtCore import SIGNAL
from PyQt4.QtCore import QTextCodec
from PyQt4.QtCore import QSize
+from PyQt4.QtCore import QSizeF
from PyQt4.QtCore import QPoint
+from PyQt4.QtCore import QPointF
from PyQt4.QtNetwork import QLocalServer
from ninja_ide import resources
@@ -414,11 +416,14 @@ def load_window_geometry(self):
qsettings = QSettings()
if qsettings.value("window/maximized", 'true') == 'true':
self.setWindowState(Qt.WindowMaximized)
- else:
+ else:
+ print dir(QSizeF)
+
+
self.resize(qsettings.value("window/size",
- QSize(800, 600)).toSize())
+ QSizeF(800, 600)).toSize())
self.move(qsettings.value("window/pos",
- QPoint(100, 100)).toPoint())
+ QPointF(100, 100)).toPoint())
def closeEvent(self, event):
if self.s_listener:

0 comments on commit ab977ed

Please sign in to comment.
Something went wrong with that request. Please try again.