workaround for QTBUG-54623
This commit is contained in:
parent
8e545e5c5d
commit
4f782568cf
3 changed files with 12 additions and 3 deletions
|
@ -22,6 +22,9 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
|||
QFont myFont;
|
||||
|
||||
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
if (myFixedFont.fixedPitch() == false) {
|
||||
myFixedFont.setFamily("monospace");
|
||||
}
|
||||
|
||||
switch (index.column()) {
|
||||
case 0:
|
||||
|
|
|
@ -76,6 +76,9 @@ void ReportDialog::onPrintReportButtonClicked()
|
|||
|
||||
painter.begin(&printer);
|
||||
QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
if (fixedFont.fixedPitch() == false) { // workaround for QTBUG-54623
|
||||
fixedFont.setFamily("monospace"); // https://bugreports.qt.io/browse/QTBUG-54623
|
||||
}
|
||||
fixedFont.setPointSize(12);
|
||||
|
||||
for (unsigned int i = 1; i <= numPages; ++i) {
|
||||
|
|
|
@ -80,6 +80,9 @@ QVariant SaleModel::data(const QModelIndex& index, int role) const
|
|||
if (role == Qt::FontRole) {
|
||||
QFont myFont;
|
||||
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
if (myFixedFont.fixedPitch() == false) {
|
||||
myFixedFont.setFamily("monospace");
|
||||
}
|
||||
|
||||
switch (index.column()) {
|
||||
case 0:
|
||||
|
|
Loading…
Reference in a new issue