Skip to content
  • 0 Votes
    7 Posts
    1k Views
    R

    @JKSH Yes, I created two simple console applications and added required libraries to them. Compiler keys are identical. I checked carefully. A one project have a mistake, and another doesn't have For example, a project with subprojects have this error, but QT Widgets does not have (but not always). Heisenbug?

  • 0 Votes
    3 Posts
    952 Views
    BartoszPajB

    Settings for printer:

    _printer.setResolution(QPrinter::PrinterResolution); QPageSize pageSize(QPageSize::A4); _printer.setPageSize(pageSize); QPagedPaintDevice::Margins margins; margins.top = 11.5; margins.left = 12.6; margins.right = 11.5; margins.bottom = 11.8; _printer.setMargins (margins); _printer.setOutputFileName("output.pdf"); _printer.setOutputFormat(QPrinter::PdfFormat);

    Text Document

    QFont font; font.setPointSize(5); font.setFamily("Calibri"); font.setLetterSpacing(QFont::PercentageSpacing,100); doc.setDefaultFont(font); doc.setPageSize(_printer.pageSizeMM()); QTextCursor cursor(&doc); QTextBlockFormat block_format_title; block_format_title.setAlignment(Qt::AlignCenter); cursor.insertBlock(block_format_title); cursor.insertHtml(QString("<p><b>%1</b></p><br><br>").arg(file_theme.title)); QTextBlockFormat block_format; block_format.setAlignment(Qt::AlignLeft); cursor.insertBlock(block_format); cursor.insertHtml(QString("<p><b>Imię i nazwisko:</b> %1<br>").arg(file_theme.childName)); cursor.insertHtml(QString("<p><b>Terapeuta prowadzący:</b> %1<br>").arg(file_theme.therapistName)); cursor.insertHtml("<br>"); cursor.insertHtml(QString(HTML Text)); doc.print(&_printer);

    On yellow incorrect spaces between letters in word.

    0_1561903468245_Przechwytywanie.JPG

  • 0 Votes
    6 Posts
    1k Views
    Y

    got solution.

    before using the minimum size function set the windowstate Qt::WindowFullScreen. In my case I used line this->setWindowState(Qt::WindowFullScreen); before this->setMinimumWidth(1366); this->setMinimumHeight(768);.