| 198 | } |
| 199 | |
| 200 | void updateItemWidgets(const QList<QWidget*>& widgets, const QStyleOptionViewItem& option, |
| 201 | const QPersistentModelIndex& index) const override |
| 202 | { |
| 203 | Q_UNUSED(index); |
| 204 | if (widgets.isEmpty()) { |
| 205 | return; |
| 206 | } |
| 207 | |
| 208 | auto *aboutPushButton = static_cast<QPushButton*>(widgets[0]); |
| 209 | QSize aboutPushButtonSizeHint = aboutPushButton->sizeHint(); |
| 210 | aboutPushButton->resize(aboutPushButtonSizeHint); |
| 211 | aboutPushButton->move(dependantLayoutValue(option.rect.width() - MARGIN - aboutPushButtonSizeHint.width(), aboutPushButtonSizeHint.width(), option.rect.width()), option.rect.height() / 2 - aboutPushButtonSizeHint.height() / 2); |
| 212 | } |
| 213 | |
| 214 | int dependantLayoutValue(int value, int width, int totalWidth) const |
| 215 | { |
nothing calls this directly
no test coverage detected