small code improvement
This commit is contained in:
parent
725bc8f04b
commit
271aac0914
1 changed files with 2 additions and 3 deletions
|
@ -20,20 +20,19 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
||||||
{
|
{
|
||||||
if (role == Qt::FontRole) {
|
if (role == Qt::FontRole) {
|
||||||
QFont myFont;
|
QFont myFont;
|
||||||
myFont.setPointSize(14);
|
|
||||||
|
|
||||||
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||||
myFixedFont.setPointSize(14);
|
|
||||||
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case 1:
|
case 1:
|
||||||
myFixedFont.setPointSize(11);
|
|
||||||
return myFixedFont;
|
return myFixedFont;
|
||||||
case 2:
|
case 2:
|
||||||
|
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
|
||||||
return myFixedFont;
|
return myFixedFont;
|
||||||
case 3:
|
case 3:
|
||||||
|
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
|
||||||
return myFixedFont;
|
return myFixedFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue