SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | List of all members
ComboBoxNoArrow Class Reference

#include <comboboxnoarrow.h>

Inherits QComboBox.

Public Member Functions

 ComboBoxNoArrow (QWidget *parent)
 
virtual ~ComboBoxNoArrow ()
 
void paintEvent (QPaintEvent *ev)
 

Detailed Description

This class is a custom QComboBox which does NOT display the down arrow. The down arrow takes a lot of real estate when you're trying to make them narrow. So much real estate that you can't see short lines of text such as "CH 1" without the digit cut off. The only thing that this custom widget does is to override the paint function. The new paint function draws the combo box (using all style sheet info) without the down arrow.

Definition at line 31 of file comboboxnoarrow.h.

Constructor & Destructor Documentation

◆ ComboBoxNoArrow()

ComboBoxNoArrow::ComboBoxNoArrow ( QWidget *  parent)
inline

Definition at line 35 of file comboboxnoarrow.h.

35 : QComboBox(parent) {}

◆ ~ComboBoxNoArrow()

virtual ComboBoxNoArrow::~ComboBoxNoArrow ( )
inlinevirtual

Definition at line 36 of file comboboxnoarrow.h.

References paintEvent().

36 {}
+ Here is the call graph for this function:

Member Function Documentation

◆ paintEvent()

void ComboBoxNoArrow::paintEvent ( QPaintEvent *  ev)

Definition at line 25 of file comboboxnoarrow.cpp.

Referenced by ~ComboBoxNoArrow().

26 {
27  QPainter p;
28  p.begin (this);
29  QStyleOptionComboBox opt;
30  opt.initFrom (this);
31  style()->drawPrimitive (QStyle::PE_PanelButtonBevel, &opt, &p, this);
32  style()->drawPrimitive (QStyle::PE_PanelButtonCommand, &opt, &p, this);
33  style()->drawItemText (&p, rect(), Qt::AlignCenter, palette(), isEnabled(), currentText());
34  p.end();
35 }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: