Combine the Graphics-View frameworks of Qt, OpenGL, GLSL, and Qt

Source: Internet
Author: User

The year may almost passed, and the students started school. I think the campus will be a lot more lively, and the CSDN will also be a bit lively. The Mid-Autumn Festival has passed, and there are still many unfinished moon cakes around you. Therefore, you can eat them as breakfast every morning, hoping they will not be wasted.

This month has many things and is very busy, so it is so late that I can take the time to write an article. This time I introduced Qt's support for OpenGL. I attended the Qt seminar in Shanghai half a month ago. Engineers at Digia introduced the development of Qt, as well as QML, Qt for Android, Boot to Qt, let us beginners have a new understanding of Qt. Now the Qt module is very large, and there are many contributors to Qt, there are more people using Qt. It is estimated that there are several millions of people. They are more or less using Qt-related technologies or some technologies. It can be said that Qt is silently changing software development, there will certainly be more and more people using Qt.

At the meeting, the engineers answered all the questions raised here. Objectively speaking, some questions are very profound and all of them go over the embedded system. I only have to listen. Then the engineer answered a question about Qt5 and Graphics-View. Currently, it can be said that the QWidget family of Qt is mature and will not be greatly developed, with the development of Qt5, new interface classes will emerge, such as QWindow, QSurface, and QScreen. But now (Qt5.2 is coming soon), these classes and modules will not pose a threat to the existing GUI modules, not to mention replacing the GUI of Qt4 (where Qt5 is QtGui and QtWidgets) module. Since Qt4.4, Qt has a Graphics-View framework, which makes it easier to embed any elements you want to draw in the window. However, as far as I know, those classes of Qt5 cannot be integrated with the Graphics-View framework. For colleagues who want to use the Graphics-View framework in Qt, they can only return to the class of Qt4 for development, these classes of Qt5 are advantageous for creating pure OpenGL.

On the qt-project Forum, someone asked how to implement OpenGL rendering at the underlying layer and controls at the upper layer. In fact, Qt has a very representative example program called boxes, people who read it will surely think it is amazing. I didn't have time to study it before. Now I talk about it for about a month. I copied a small program and shared it with you.


This program uses the core, gui, widgets, and opengl modules of Qt to render a 3ds model. If the modeling level is poor, just join it. The following is the program's:



Demo program: here

Program source code: here

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.