mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
* work around for the bad memory of the treeview about the column width
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23423 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3974c5f230
commit
a4b2404cb1
@ -408,10 +408,16 @@ void GuiCompleter::updatePopup(Cursor & cur)
|
|||||||
else
|
else
|
||||||
rect = QRect(x, y - dim.ascent() - 3, 200, dim.height() + 6);
|
rect = QRect(x, y - dim.ascent() - 3, 200, dim.height() + 6);
|
||||||
|
|
||||||
// show/update popup
|
// Resize the columns in the popup.
|
||||||
QTreeView * p = static_cast<QTreeView *>(popup());
|
// This should really be in the constructor. But somehow the treeview
|
||||||
p->setColumnWidth(0, popup()->width() - 22 - p->verticalScrollBar()->width());
|
// has a bad memory about it and we have to tell him again and again.
|
||||||
|
QTreeView * listView = static_cast<QTreeView *>(popup());
|
||||||
|
listView->header()->setStretchLastSection(false);
|
||||||
|
listView->header()->setResizeMode(0, QHeaderView::Stretch);
|
||||||
|
listView->header()->setResizeMode(1, QHeaderView::Fixed);
|
||||||
|
listView->header()->resizeSection(1, 22);
|
||||||
|
|
||||||
|
// show/update popup
|
||||||
complete(rect);
|
complete(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user