Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit ab977ede004243b400de9a3c9f58dc961e1b957c 1 parent 340d0e6
George Lambert authored

Showing 1 changed file with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. +8 3 ninja_ide/gui/ide.py
11 ninja_ide/gui/ide.py
@@ -36,7 +36,9 @@
36 36 from PyQt4.QtCore import SIGNAL
37 37 from PyQt4.QtCore import QTextCodec
38 38 from PyQt4.QtCore import QSize
  39 +from PyQt4.QtCore import QSizeF
39 40 from PyQt4.QtCore import QPoint
  41 +from PyQt4.QtCore import QPointF
40 42 from PyQt4.QtNetwork import QLocalServer
41 43
42 44 from ninja_ide import resources
@@ -414,11 +416,14 @@ def load_window_geometry(self):
414 416 qsettings = QSettings()
415 417 if qsettings.value("window/maximized", 'true') == 'true':
416 418 self.setWindowState(Qt.WindowMaximized)
417   - else:
  419 + else:
  420 + print dir(QSizeF)
  421 +
  422 +
418 423 self.resize(qsettings.value("window/size",
419   - QSize(800, 600)).toSize())
  424 + QSizeF(800, 600)).toSize())
420 425 self.move(qsettings.value("window/pos",
421   - QPoint(100, 100)).toPoint())
  426 + QPointF(100, 100)).toPoint())
422 427
423 428 def closeEvent(self, event):
424 429 if self.s_listener:

0 comments on commit ab977ed

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