Merge pull request #1183 from xiaoyifang/fix/popup-min-height

fix: suggestion list set a minimum height
This commit is contained in:
xiaoyifang 2023-09-30 11:53:08 +08:00 committed by GitHub
commit 471f20f140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,7 @@ TranslateBox::TranslateBox( QWidget * parent ):
translate_line->setCompleter( completer ); translate_line->setCompleter( completer );
completer->setCompletionMode( QCompleter::UnfilteredPopupCompletion ); completer->setCompletionMode( QCompleter::UnfilteredPopupCompletion );
completer->setMaxVisibleItems( 16 ); completer->setMaxVisibleItems( 16 );
completer->popup()->setMinimumHeight( 256 );
connect( translate_line, &QLineEdit::returnPressed, [ this ]() { connect( translate_line, &QLineEdit::returnPressed, [ this ]() {
emit returnPressed(); emit returnPressed();