Adjust completion menu to fit its contents
This commit is contained in:
parent
649d73a7bd
commit
4fd8eccece
5 changed files with 25 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ SuggestionsPopup::addUsers(const QVector<SearchResult> &users)
|
|||
}
|
||||
|
||||
resetSelection();
|
||||
adjustSize();
|
||||
|
||||
resize(geometry().width(), 40 * users.size());
|
||||
}
|
||||
|
|
@ -171,3 +172,12 @@ SuggestionsPopup::selectHoveredSuggestion()
|
|||
|
||||
resetSelection();
|
||||
}
|
||||
|
||||
void
|
||||
SuggestionsPopup::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue