-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (26 loc) · 787 Bytes
/
main.cpp
File metadata and controls
30 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "itemscene.h"
#include <QApplication>
#include <QProxyStyle>
#include <QAbstractItemView>
#include <QComboBox>
class PGE_ProxyStyle : public QProxyStyle
{
public:
PGE_ProxyStyle(QStyle *style = Q_NULLPTR) : QProxyStyle(style) {}
PGE_ProxyStyle(const QString &key) : QProxyStyle(key) {}
~PGE_ProxyStyle() {}
int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
{
if(hint == QStyle::SH_MenuBar_AltKeyNavigation)
return 0;
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyle(new PGE_ProxyStyle(a.style()));
ItemScene w;
w.show();
return a.exec();
}