Created custom BloomProxyStyle to override Qt system styles
This commit is contained in:
16
src/Insight/UserInterfaces/InsightWindow/BloomProxyStyle.cpp
Normal file
16
src/Insight/UserInterfaces/InsightWindow/BloomProxyStyle.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "BloomProxyStyle.hpp"
|
||||
|
||||
using namespace Bloom;
|
||||
|
||||
int BloomProxyStyle::styleHint(
|
||||
StyleHint hint,
|
||||
const QStyleOption* option,
|
||||
const QWidget* widget,
|
||||
QStyleHintReturn* returnData
|
||||
) const {
|
||||
if (hint == QStyle::SH_ComboBox_Popup) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
||||
}
|
||||
19
src/Insight/UserInterfaces/InsightWindow/BloomProxyStyle.hpp
Normal file
19
src/Insight/UserInterfaces/InsightWindow/BloomProxyStyle.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <QProxyStyle>
|
||||
|
||||
namespace Bloom
|
||||
{
|
||||
class BloomProxyStyle: public QProxyStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
int styleHint(
|
||||
StyleHint hint,
|
||||
const QStyleOption* option = nullptr,
|
||||
const QWidget* widget = nullptr,
|
||||
QStyleHintReturn* returnData = nullptr
|
||||
) const override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user