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);
|
||||
|
||||
installEventFilter(this);
|
||||
installEventFilter(ui->labPicture);
|
||||
ui->labPicture->setFocusPolicy(Qt::StrongFocus);
|
||||
}
|
||||
|
||||
PictureDialog::~PictureDialog()
|
||||
|
@ -78,7 +80,7 @@ PictureDialog::~PictureDialog()
|
|||
bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
|
||||
{
|
||||
bool returnValue = false;
|
||||
if (obj == this)
|
||||
if (obj == this || obj == ui->labPicture)
|
||||
{
|
||||
if (ev->type() == QEvent::KeyPress)
|
||||
{
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
<item>
|
||||
<widget class="QPushButton" name="cmdExport">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Export picture</string>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<item>
|
||||
<widget class="QPushButton" name="cmdClose">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Close</string>
|
||||
|
|
Loading…
Reference in a new issue