1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#include "mainwindow.h"
#include <qapplication.h>
#ifndef QWT_NO_OPENGL
#if QT_VERSION >= 0x040600 && QT_VERSION < 0x050000
#define USE_OPENGL 1
#endif
#endif
#if USE_OPENGL
#include <qgl.h>
#endif
int main( int argc, char **argv )
{
#if USE_OPENGL
// on my box QPaintEngine::OpenGL2 has serious problems, f.e:
// the lines of a simple drawRect are wrong.
QGL::setPreferredPaintEngine( QPaintEngine::OpenGL );
#endif
QApplication a( argc, argv );
MainWindow mainWindow;
mainWindow.resize( 600, 400 );
mainWindow.show();
return a.exec();
}
|