[vtkusers] QWidget: Must construct a QApplication before a QWidget

Sanjin Pajo sanjin.pajo at gmail.com
Thu Aug 24 10:29:26 EDT 2017


I am trying to use VTK with Qt and after building a sample program
Qt_visualizer (https://github.com/UnaNancyOwen/qt_visualizer), I run it and
I get the following error in Debug mode:

QWidget: Must construct a QApplication before a QWidget

and the following errors in Release mode:

ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx,
line 653
vtkWin32OpenGLRenderWindow (0000000002A79780): failed to get
wglChoosePixelFormatARB

ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx,
line 737
vtkWin32OpenGLRenderWindow (0000000002A79780): failed to get valid pixel
format.

ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 816
vtkWin32OpenGLRenderWindow (0000000002A79780): GLEW could not be
initialized.

Thank you for any help in advance.

Best regards,
Sanjin P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170824/f4d3b1a6/attachment.html>


More information about the vtkusers mailing list