respect field column span and disable scrolling on combo fields
This commit is contained in:
+5
-10
@@ -22,21 +22,16 @@
|
||||
#define COMBOBOXEX_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
|
||||
class ComboBoxEx : public QComboBox {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboBoxEx(QWidget* parent = 0);
|
||||
void setCurrentIndexEx(int i);
|
||||
void setCurrentTextEx(const QString &text);
|
||||
int getPreviousIndex();
|
||||
private slots:
|
||||
void index_changed(int);
|
||||
ComboBoxEx(QWidget* parent = nullptr);
|
||||
void setScrollingEnabled(bool b);
|
||||
protected:
|
||||
virtual void wheelEvent(QWheelEvent* e) override;
|
||||
private:
|
||||
int index;
|
||||
int previousIndex;
|
||||
void wheelEvent(QWheelEvent* e);
|
||||
bool scrolling_enabled_;
|
||||
};
|
||||
|
||||
#endif // COMBOBOXEX_H
|
||||
|
||||
Reference in New Issue
Block a user