Skip to content
Browse files
Hide color picker tab in color dialog for OSX builds.
Qt on OSX does not support the required QWidget::grabMouse method.
Instead of showing a broken tab, just hide it under this platform.
Revisit when we switch to Qt5 builds to see if there's a solution to
  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent efa4f97 commit c496fc7f1b7253fb2451aa18c3715927600dc7b1
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/gui/qgscolordialog.cpp
@@ -235,6 +235,13 @@ QgsColorDialogV2::QgsColorDialogV2( QWidget *parent, Qt::WindowFlags fl, const Q
int currentTab = settings.value( "/Windows/ColorDialog/activeTab", 0 ).toInt();
mTabWidget->setCurrentIndex( currentTab );

#ifdef Q_WS_MAC
//disable color picker tab for OSX, as it is impossible to grab the mouse under OSX
//see note for QWidget::grabMouse() re OSX Cocoa
mTabWidget->removeTab( 3 );

//setup connections
connect( mColorBox, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
connect( mColorWheel, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );

0 comments on commit c496fc7

Please sign in to comment.