Restore alternate support for Qt 4.

This commit is contained in:
Jean-Paul Chaput 2023-03-09 15:30:23 +01:00
parent 79d8461c8f
commit 1f16642c82
2 changed files with 6 additions and 0 deletions

View File

@ -853,7 +853,11 @@ namespace Hurricane {
QPrinter printer ( QPrinter::ScreenResolution );
printer.setOutputFileName ( "unicorn-snapshot.pdf" );
printer.setPageSize ( (QPrinter::PaperSize )Cfg::getParamEnumerate("viewer.printer.paper" ,0)->asInt() );
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
printer.setOrientation( (QPrinter::Orientation)Cfg::getParamEnumerate("viewer.printer.orientation",0)->asInt() );
#else
printer.setPageOrientation( (QPageLayout::Orientation)Cfg::getParamEnumerate("viewer.printer.orientation",0)->asInt() );
#endif
QPrintDialog dialog ( &printer );
if ( dialog.exec() == QDialog::Accepted )

View File

@ -94,7 +94,9 @@ namespace Hurricane {
_trace->setLineWrapMode ( QTextEdit::FixedColumnWidth );
_trace->setLineWrapColumnOrWidth( 140 );
_trace->setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding );
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
_trace->setSizeAdjustPolicy ( QAbstractScrollArea::AdjustToContents );
#endif
_trace->hide ();
QCheckBox* showTrace = new QCheckBox ();