[PyQt] QColorDialog and GLUT on Mac
Mistobaan
mistobaan at gmail.com
Tue Oct 28 15:55:54 GMT 2008
Hi guys
I found a strange case on using both PyQt and GLUT, the QColorDialog
on Mac. The dialog will return always the same color (the
initialization one).
removing the glutInitialize() function solves the problem.
I resolved the problem on my app getting rid of glut.
Anyone else had a similar case?
here it is code that reproduces the problem on my mac
##-----------------------------------------------------
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from OpenGL.GLUT import glutInit
app =QApplication([])
glutInit([])
color = QColorDialog.getColor()
color = color.toRgb()
print color.redF(), color.greenF(), color.blueF()
##-----------------------------------------------------
Thanks,
Fabrizio
More information about the PyQt
mailing list