focus bug fix
This commit is contained in:
parent
a57948f77e
commit
c4b42beae4
2 changed files with 5 additions and 3 deletions
|
@ -67,6 +67,8 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, QWidget *parent) :
|
||||||
ui->cmdExport->setMenu(exportMenu);
|
ui->cmdExport->setMenu(exportMenu);
|
||||||
|
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
|
installEventFilter(ui->labPicture);
|
||||||
|
ui->labPicture->setFocusPolicy(Qt::StrongFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
PictureDialog::~PictureDialog()
|
PictureDialog::~PictureDialog()
|
||||||
|
@ -78,7 +80,7 @@ PictureDialog::~PictureDialog()
|
||||||
bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
|
bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
|
||||||
{
|
{
|
||||||
bool returnValue = false;
|
bool returnValue = false;
|
||||||
if (obj == this)
|
if (obj == this || obj == ui->labPicture)
|
||||||
{
|
{
|
||||||
if (ev->type() == QEvent::KeyPress)
|
if (ev->type() == QEvent::KeyPress)
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cmdExport">
|
<widget class="QPushButton" name="cmdExport">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Export picture</string>
|
<string>Export picture</string>
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cmdClose">
|
<widget class="QPushButton" name="cmdClose">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Close</string>
|
<string>Close</string>
|
||||||
|
|
Loading…
Reference in a new issue