Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
1.2.1
-
None
-
Fedora 20 x64 - reproduces.
Windows Vista x32 - works ok.
-
1
Description
The snippet below is derived from documentation http://pyside.github.io/docs/pyside/PySide/QtGui/QApplication.html#PySide.QtGui.PySide.QtGui.QApplication.setOverrideCursor and sets cursor for current window. Note that line that passes CursorShape as parameter is commented.
#!/usr/bin/env python import sys from PySide.QtGui import * from PySide.QtCore import * app = QApplication ( sys.argv ) cursor = QCursor(Qt.WaitCursor) shape = Qt.WaitCursor print(cursor) print(shape) QApplication.setOverrideCursor( cursor ) #QApplication.setOverrideCursor( shape ) window = QLabel("WAIT") window.show() sys.exit ( app.exec_() )
It works flawlessly on Windows, but fails on Linux (X11):
$ ./pyside-243.py <PySide.QtGui.QCursor object at 0xb4a08c2c> PySide.QtCore.Qt.CursorShape.WaitCursor X Error: BadCursor (invalid Cursor parameter) 6 Major opcode: 2 (X_ChangeWindowAttributes) Resource id: 0x3
It works correctly on Linux only when setOverrideCursor() is feeded with CursorShape type object (commented line). On Windows both ways work ok.