Stretch horizontal table headers

This commit is contained in:
Joshua Goins 2023-12-01 15:51:20 -05:00
parent e79f7a53f3
commit aaaa489116

View file

@ -81,7 +81,7 @@ MainWindow::MainWindow(const QDir &definitionDirectory, const QDir &assetDirecto
verticalHeader->setSectionResizeMode(QHeaderView::ResizeToContents); verticalHeader->setSectionResizeMode(QHeaderView::ResizeToContents);
QHeaderView *horizontalHeader = pieceListView->horizontalHeader(); QHeaderView *horizontalHeader = pieceListView->horizontalHeader();
horizontalHeader->setSectionResizeMode(QHeaderView::ResizeToContents); horizontalHeader->setSectionResizeMode(QHeaderView::Stretch);
connect(pieceListView, &QListView::clicked, this, [this, assetDirectory](const QModelIndex index) { connect(pieceListView, &QListView::clicked, this, [this, assetDirectory](const QModelIndex index) {
const QString filename = index.data(Qt::UserRole + 1).toString(); const QString filename = index.data(Qt::UserRole + 1).toString();