fix: handle qcompleter signal

This commit is contained in:
YiFang Xiao 2023-08-12 13:49:27 +08:00
parent 64b1863208
commit c21e57664c

View file

@ -87,7 +87,8 @@ void TranslateBox::setModel( QStringList & _words )
connect( completer,
QOverload< const QString & >::of( &QCompleter::activated ),
translate_line,
[ & ]( const QString & ) {
[ & ]( const QString & text) {
translate_line->setText(text);
emit translate_line->returnPressed();
} );
}