JKQtPlotter/examples/speed/speed.cpp

26 lines
698 B
C++
Raw Normal View History

#include <QApplication>
#include <array>
#include <random>
#include "jkqtplotter/jkqtplotter.h"
2019-06-20 22:06:31 +08:00
#include "jkqtplotter/graphs/jkqtpscatter.h"
#include "speedtestplot.h"
int main(int argc, char* argv[])
{
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps
#endif
QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience)
SpeedTestPlot plot;
QTimer::singleShot(500, &plot, SLOT(plotNewData()));
return app.exec();
}