Commit 70ccdb2e authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed focus change on TAB by disabling QTs own focus change mechanism.

parent 01751f38
......@@ -62,7 +62,7 @@ void QtScrollWidgetFlow::init(unsigned int eCtxType,
int (*init_proc2)(QWidget* w, FlowCtx* ctx, void* client_data))
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->init_proc = init_proc;
......@@ -81,7 +81,7 @@ QWidget* QtScrollWidgetFlow::initScroll(unsigned int eCtxType,
int (*init_proc2)(QWidget* w, FlowCtx* ctx, void* client_data))
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->init_proc = init_proc;
......@@ -89,6 +89,7 @@ QWidget* QtScrollWidgetFlow::initScroll(unsigned int eCtxType,
this->client_data = client_data;
this->scroll_timerid = new QTimer(this);
form = new QScrollArea();
form->setFocusPolicy(Qt::NoFocus);
form->installEventFilter(this);
scroll_h = form->horizontalScrollBar();
scroll_v = form->verticalScrollBar();
......@@ -113,7 +114,7 @@ QWidget* QtScrollWidgetFlow::initScroll(unsigned int eCtxType,
void QtScrollWidgetFlow::init(unsigned int eCtxType, QWidget* main)
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->scroll_timerid = new QTimer(this);
......@@ -289,7 +290,7 @@ void QtScrollWidgetFlow::realize()
} else {
draw_ctx = new FlowDrawQt(this, &parent_ctx, init_widget_proc,
client_data, static_cast<flow_eCtxType>(ctxType));
setFocus();
}
}
setFocus();
}
......@@ -63,7 +63,7 @@ void QtScrollWidgetGlow::init(unsigned int eCtxType,
int (*init_proc2)(QWidget* w, GlowCtx* ctx, void* client_data))
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->init_proc = init_proc;
......@@ -82,7 +82,7 @@ QWidget* QtScrollWidgetGlow::initScroll(unsigned int eCtxType,
int (*init_proc2)(QWidget* w, GlowCtx* ctx, void* client_data))
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->init_proc = init_proc;
......@@ -90,6 +90,7 @@ QWidget* QtScrollWidgetGlow::initScroll(unsigned int eCtxType,
this->client_data = client_data;
this->scroll_timerid = new QTimer(this);
form = new QScrollArea();
form->setFocusPolicy(Qt::NoFocus);
form->installEventFilter(this);
scroll_h = form->horizontalScrollBar();
scroll_v = form->verticalScrollBar();
......@@ -114,7 +115,7 @@ QWidget* QtScrollWidgetGlow::initScroll(unsigned int eCtxType,
void QtScrollWidgetGlow::init(unsigned int eCtxType, QWidget* main)
{
createBuffer(size());
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
this->ctxType = eCtxType;
this->scroll_timerid = new QTimer(this);
......@@ -291,7 +292,7 @@ void QtScrollWidgetGlow::realize()
} else {
draw_ctx = new GlowDrawQt(this, &parent_ctx, init_widget_proc,
client_data, static_cast<glow_eCtxType>(ctxType));
setFocus();
}
}
setFocus();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment