Skip to content

Commit

Permalink
adjust checkable combobox style to mimic readonly combobox appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 13, 2020
1 parent 7a08d5f commit 4d901cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgscheckablecombobox.cpp
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/

#include "qgscheckablecombobox.h"
#include "qgsapplication.h"

#include <QEvent>
#include <QMouseEvent>
Expand Down Expand Up @@ -82,6 +83,9 @@ QgsCheckableComboBox::QgsCheckableComboBox( QWidget *parent )

QLineEdit *lineEdit = new QLineEdit( this );
lineEdit->setReadOnly( true );
QPalette pal = qApp->palette();
pal.setBrush( QPalette::Base, pal.button() );
lineEdit->setPalette( pal );
setLineEdit( lineEdit );

mContextMenu = new QMenu( this );
Expand Down

0 comments on commit 4d901cc

Please sign in to comment.