feat(searchList): Set height for listview.
Description: 设置搜索结果列表的高度(动态改变) Log: 设置搜索结果列表的高度
This commit is contained in:
parent
abd521f3ab
commit
5d74a805f6
|
@ -14,7 +14,8 @@ SearchListView::SearchListView(QWidget * parent, const QStringList& list, const
|
|||
this->setHeaderHidden(true);
|
||||
this->setColumnWidth(0, 20);
|
||||
this->setColumnWidth(1, 80);
|
||||
this->setFixedHeight(list.count() * 47 + 2);
|
||||
int rowHeight = this->rowHeight(this->model()->index(0,1, QModelIndex())) + 1;
|
||||
this->setFixedHeight(list.count() * rowHeight + 2);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setAutoFillBackground(false);
|
||||
this->setStyleSheet("QWidget{background:transparent;}");
|
||||
|
|
Loading…
Reference in New Issue