QtUtils: Improve QTableView column resizing

This commit is contained in:
Albert Liu
2020-08-11 11:17:01 -07:00
parent e6156e2adb
commit 6e0b71ace4
2 changed files with 9 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ QFrame* CreateHorizontalLine(QWidget* parent);
/// Returns the greatest parent of a widget, i.e. its dialog/window.
QWidget* GetRootWidget(QWidget* widget, bool stop_at_window_or_dialog = true);
/// Resizes columns of the table view to at the specified widths. A width of -1 will stretch the column to use the
/// Resizes columns of the table view to at the specified widths. A negative width will stretch the column to use the
/// remaining space.
void ResizeColumnsForTableView(QTableView* view, const std::initializer_list<int>& widths);