respect field column span and disable scrolling on combo fields

This commit is contained in:
itsmattkc
2019-03-13 10:22:30 +11:00
parent 36f3d0ac92
commit ec5ee40dee
6 changed files with 33 additions and 68 deletions
+5 -10
View File
@@ -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