SFML community forums

Help => General => Topic started by: ccleung6 on December 15, 2013, 06:18:33 am

Title: [Solved] Problem about integrating SFML 2.0 into Qt (Mac OS X)
Post by: ccleung6 on December 15, 2013, 06:18:33 am
I follow this tutorial http://sfml-dev.org/tutorials/1.6/graphics-qt.php to integrate SFML 2.0 into Qt 4.7.4

Problem:
I need to cast the winId() into void pointer:
sf::RenderWindow::create((void *)winId());

I am not sure this is correct or not.

On Mac, SFML failed to create the context.
The render window is blank, and debug output always gives:

invalid drawable

Any solution?

Thanks.
Title: Re: Problem about integrating SFML 2.0 into Qt (Mac OS X)
Post by: ccleung6 on December 21, 2013, 07:18:33 am
I changed to use Qt 5.2.
It can create the SFML context successfully.
And the winId() should be casted into sf::WindowHandle

sf::RenderWindow::create((sf::WindowHandle)winId());