[QGIS-trac] Re: [Quantum GIS] #3497: Crash when changing font and color in Style manager on OS X

Quantum GIS qgis at qgis.org
Sat May 7 21:05:47 EDT 2011


#3497: Crash when changing font and color in Style manager on OS X
---------------------------------------------------------+------------------
   Reporter:  rcline                                     |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.7.0
  Component:  Symbology                                  |            Version:  Trunk        
   Keywords:                                             |   Platform_version:               
   Platform:  OS X                                       |           Must_fix:  Yes          
Status_info:  0                                          |  
---------------------------------------------------------+------------------

Comment(by telwertowski):

 Further investigation reveals that the Cocoa implementation of
 QColorDialog::getColor is unstable because the Mac Cocoa color picker does
 not have OK and Cancel buttons and Qt is hacking the dialog to add them.
 The Cocoa color picker is intended to be used with a color well where the
 well changes color as the picker is clicked. Buttons therefore aren't
 needed.

 Qt provides a NoButtons option which will use an unhacked dialog. It works
 but it may be unintuitive that closing the dialog sets the color. A better
 long term fix may be to implement a QgsColorWell which changes as the
 color dialog is clicked. However the following variant will show a native
 buttonless Mac color picker and not block other dialogs.

 #ifdef QT_MAC_USE_COCOA
   QColorDialog colorDialog( this );
   colorDialog.setOption( QColorDialog::NoButtons );
   colorDialog.exec();
   QColor color = colorDialog.currentColor();
 #else
   QColor color = QColorDialog::getColor( QColor(), this );
 #endif

 Is a buttonless native dialog preferable to the Qt color dialog?

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3497#comment:15>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS supporting GDAL/OGR, PostGIS, and GRASS formats, and Web Services


More information about the QGIS-trac mailing list