qt: Combo boxes are no longer cramped
This commit is contained in:
@@ -16,6 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
#include "qt_styleoverride.hpp"
|
#include "qt_styleoverride.hpp"
|
||||||
|
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QAbstractItemView>
|
||||||
|
|
||||||
int StyleOverride::styleHint(
|
int StyleOverride::styleHint(
|
||||||
StyleHint hint,
|
StyleHint hint,
|
||||||
const QStyleOption *option,
|
const QStyleOption *option,
|
||||||
@@ -44,4 +47,9 @@ void StyleOverride::polish(QWidget* widget)
|
|||||||
}
|
}
|
||||||
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qobject_cast<QComboBox*>(widget)) {
|
||||||
|
widget->setMinimumWidth(widget->minimumSizeHint().width());
|
||||||
|
qobject_cast<QComboBox*>(widget)->view()->setMinimumWidth(widget->minimumSizeHint().width());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user