Skip to content
Snippets Groups Projects
CustomComboBox.h 667 B
Newer Older
konstantin.kukharenko's avatar
konstantin.kukharenko committed
#ifndef CUSTOMCOMBOBOX_H
#define CUSTOMCOMBOBOX_H


#include <QComboBox>
konstantin.kukharenko's avatar
konstantin.kukharenko committed
#include "StyledDropShadowEffect.h"
konstantin.kukharenko's avatar
konstantin.kukharenko committed

/** @brief QComboBox with changing downArrow when hover on control.

*To indicate the selection of an object in css
*
*#ComboBoxName[hoverState = "1"]::drop-down,
*{
*    image: url(path to icon);
*}
*
* Everything else unchanged
*/
class CustomComboBox : public QComboBox
{
    Q_OBJECT
public:
    CustomComboBox(QWidget *parent = Q_NULLPTR);
konstantin.kukharenko's avatar
konstantin.kukharenko committed
    void setObjectName(const QString &name);
konstantin.kukharenko's avatar
konstantin.kukharenko committed
protected:
    void enterEvent(QEvent *event);
    void leaveEvent(QEvent *event);
konstantin.kukharenko's avatar
konstantin.kukharenko committed
private:
    StyledDropShadowEffect *m_styledshadow;

konstantin.kukharenko's avatar
konstantin.kukharenko committed
};
#endif // CUSTOMCOMBOBOX_H