#include "TableModel.h"
#include <QDateTime>
#include <QApplication>
Go to the source code of this file.
|
| QRect | getNewRect (const QStyleOptionViewItem &option) |
| |
◆ getNewRect()
| QRect getNewRect |
( |
const QStyleOptionViewItem & | option | ) |
|
Definition at line 15 of file TableModel.cpp.
16{
17
18 const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1;
19 QRect newRect = QStyle::alignedRect(option.direction, Qt::AlignCenter,
20 QSize(option.decorationSize.width() +
21 5,option.decorationSize.height()),
22 QRect(option.rect.x() + textMargin, option.rect.y(),
23 option.rect.width() -
24 (2 * textMargin), option.rect.height()));
25 return newRect;
26}