forked from qt-creator/qt-creator
Ensure that the full session name is visible in the session manager
This saves the user from resizing columns every time they open the session manager. Change-Id: Ida6a4ea7723cd913185d77e06aa0d2218f0e30a4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -63,6 +63,9 @@ SessionView::SessionView(QWidget *parent)
|
|||||||
|
|
||||||
setModel(&m_sessionModel);
|
setModel(&m_sessionModel);
|
||||||
|
|
||||||
|
// Ensure that the full session name is visible.
|
||||||
|
header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
|
||||||
QItemSelection firstRow(m_sessionModel.index(0,0), m_sessionModel.index(
|
QItemSelection firstRow(m_sessionModel.index(0,0), m_sessionModel.index(
|
||||||
0, m_sessionModel.columnCount() - 1));
|
0, m_sessionModel.columnCount() - 1));
|
||||||
selectionModel()->select(firstRow, QItemSelectionModel::QItemSelectionModel::
|
selectionModel()->select(firstRow, QItemSelectionModel::QItemSelectionModel::
|
||||||
|
|||||||
Reference in New Issue
Block a user