In this recipe, we will learn how to set up OpenGL in Qt 5.
Setting up OpenGL in Qt
How to do it...
Follow these steps to learn how to set up OpenGL in Qt:
- Create a new Qt Widgets Application by going to File | New File or Project.
- We will remove the mainwindow.ui file because we are not going to use it in this example. Right-click on the mainwindow.ui file and select Remove File from the dropdown menu. Then, a message box will appear and ask for your confirmation. Tick Delete file permanently and press the OK button.
- Repeat Step 2 for both mainwindow.h and mainwindow.cpp as well. We don't need these two files in this project either.
- Open up your project file (.pro) and add the OpenGL module to your project by adding...