mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix push to talk even when text edit focused
This commit is contained in:
parent
858971fd94
commit
5eeae0e142
@ -207,6 +207,9 @@ void GroupChatForm::onCallClicked()
|
|||||||
|
|
||||||
void GroupChatForm::keyPressEvent(QKeyEvent* ev)
|
void GroupChatForm::keyPressEvent(QKeyEvent* ev)
|
||||||
{
|
{
|
||||||
|
if (msgEdit->hasFocus())
|
||||||
|
return;
|
||||||
|
|
||||||
// Push to talk
|
// Push to talk
|
||||||
if (ev->key() == Qt::Key_P && inCall)
|
if (ev->key() == Qt::Key_P && inCall)
|
||||||
{
|
{
|
||||||
@ -223,6 +226,9 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev)
|
|||||||
|
|
||||||
void GroupChatForm::keyReleaseEvent(QKeyEvent* ev)
|
void GroupChatForm::keyReleaseEvent(QKeyEvent* ev)
|
||||||
{
|
{
|
||||||
|
if (msgEdit->hasFocus())
|
||||||
|
return;
|
||||||
|
|
||||||
// Push to talk
|
// Push to talk
|
||||||
if (ev->key() == Qt::Key_P && inCall)
|
if (ev->key() == Qt::Key_P && inCall)
|
||||||
{
|
{
|
||||||
|
@ -128,6 +128,7 @@ void GroupWidget::keyPressEvent(QKeyEvent* ev)
|
|||||||
Group* g = GroupList::findGroup(groupId);
|
Group* g = GroupList::findGroup(groupId);
|
||||||
if (g)
|
if (g)
|
||||||
g->chatForm->keyPressEvent(ev);
|
g->chatForm->keyPressEvent(ev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupWidget::keyReleaseEvent(QKeyEvent* ev)
|
void GroupWidget::keyReleaseEvent(QKeyEvent* ev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user