@@ -85,13 +85,6 @@ void DlgTagFetcher::init() {
85
85
connect (&m_tagFetcher, &TagFetcher::fetchProgress, this , &DlgTagFetcher::fetchTagProgress);
86
86
connect (&m_tagFetcher, &TagFetcher::networkError, this , &DlgTagFetcher::slotNetworkResult);
87
87
88
- // Resize columns, this can't be set in the ui file
89
- results->setColumnWidth (0 , 160 ); // Title column
90
- results->setColumnWidth (1 , 160 ); // Artist column
91
- results->setColumnWidth (2 , 160 ); // Album column
92
- results->setColumnWidth (3 , 50 ); // Year column
93
- results->setColumnWidth (4 , 50 ); // Track (numbers) column
94
- results->setColumnWidth (5 , 160 ); // Album artist column
95
88
}
96
89
97
90
void DlgTagFetcher::slotNext () {
@@ -307,7 +300,11 @@ void DlgTagFetcher::updateStack() {
307
300
}
308
301
}
309
302
310
- results->header ()->resizeSections (QHeaderView::ResizeToContents);
303
+ for (int i = 0 ; i < results->model ()->columnCount (); i++) {
304
+ results->resizeColumnToContents (i);
305
+ int sectionSize = (results->columnWidth (i) + 10 );
306
+ results->header ()->resizeSection (i, sectionSize);
307
+ }
311
308
312
309
// Find the item that was selected last time
313
310
for (int i = 0 ; i < results->model ()->rowCount (); ++i) {
0 commit comments