| 53 | SidePane::~SidePane() = default; |
| 54 | |
| 55 | QSize SidePane::sizeHint() const |
| 56 | { |
| 57 | static const int widthMargin = 10; |
| 58 | |
| 59 | if (!model()) |
| 60 | return QSize(0, 0); |
| 61 | |
| 62 | const int width = sizeHintForColumn(0) + widthMargin; |
| 63 | const int height = QListView::sizeHint().height(); |
| 64 | |
| 65 | return { width, height }; |
| 66 | } |
| 67 | |
| 68 | void SidePane::setModel(QAbstractItemModel *model) |
| 69 | { |