Import 2017-06-07 23:51:09: master 0a1a258a

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-07-26 21:46:19 master b4083cf3
Changeset

BUG: Fixed py_nomainwindow_qSlicerEditorModuleGenericTest error

Problem:

test_widgetRepresentation (qSlicerEditorModuleGenericTest.qSlicerEditorModuleGenericTest) ... Traceback (most recent call last):
File "C:/D/N/Slicer-0-build/Slicer-build/lib/Slicer-4.5/qt-scripted-modules/Editor.py", line 197, in setup
self.createSegmentEditorMessage()
File "C:/D/N/Slicer-0-build/Slicer-build/lib/Slicer-4.5/qt-scripted-modules/Editor.py", line 299, in createSegmentEditorMessage
self.segmentEditorLabel.setSizePolicy( qt.QSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Preferred) )
ValueError: Could not find matching overload for given arguments:
(7, 5)
The following slots are available:
QSizePolicy() -> QSizePolicy
QSizePolicy(QSizePolicy other) -> QSizePolicy
QSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical, QSizePolicy::ControlType type) -> QSizePolicy
QSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical) -> QSizePolicy

Solution: qt.QSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Preferred)
fails on some systems, therefore now we set the policies using separate method calls.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25247 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Scripted/Editor/Editor.py Diff File