mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
Qt version check has been added for console demo
This commit is contained in:
parent
0ca4366ad8
commit
a010f2328c
@ -18,6 +18,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR);
|
QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR);
|
||||||
QStringList vars;
|
QStringList vars;
|
||||||
|
|
||||||
|
#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0)
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.addVersionOption();
|
parser.addVersionOption();
|
||||||
@ -60,7 +61,9 @@ int main(int argc, char *argv[])
|
|||||||
} else {
|
} else {
|
||||||
report.printToPDF(parser.value(destinationOption));
|
report.printToPDF(parser.value(destinationOption));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
std::cerr<<"This demo intended for Qt 5.2 and higher\n";
|
||||||
|
#endif
|
||||||
// QUuid uid = QUuid::createUuid();
|
// QUuid uid = QUuid::createUuid();
|
||||||
// QString uidStr = uid.toString()+".pdf";
|
// QString uidStr = uid.toString()+".pdf";
|
||||||
// report.printToPDF(uidStr);
|
// report.printToPDF(uidStr);
|
||||||
|
Loading…
Reference in New Issue
Block a user