How use QT to develop Cocos2d-x Tools

I want to develop cocos2d-x Tools use QT,NowI can run Hello World Dem use QT on Mac.
My problem is how to put CCGLView in QWidget,
I see that CCGLView on Mac use GLFW library, but I don’t know how to put GLFW in QWidget。
or should I rewrite CCGLView inheritance QObject?

Can some one please help me please。

I also want to know how to use QT to develop cocos2d-x tools on windows.:stuck_out_tongue:

@panni1843 wrote:

I also want to know how to use QT to develop cocos2d-x tools on windows.:stuck_out_tongue:

yes, me too.

I worked on linux used qtcreator , and make a template patch for cocos2d-x v2.2.x here:https://github.com/FlyingFishBird/cocos2d-x_linux_qt_template
Maybe you can config your template from my template

You can bind a QOpenGLContext to a QWindow like this: https://github.com/qtproject/qt3d/blob/master/src/threed/viewing/qglview.cpp#L340

You should be able to create a Cocos GL View on that. The QOpenGLContext API should have most of what is needed for eg turning on clipping or scissor: http://qt-project.org/doc/qt-5/qopenglcontext.html

1 Like

can you give more details about how to wrap CCGLView to QWindowor QFrame? thx.

I have same problem like this & try to implement glew in QObject , but not work.

I think it’s not a good idea,but you provide detail

forget me my chinese english.