SFML community forums

Help => General => Topic started by: delio on March 16, 2014, 09:03:23 am

Title: [Solved]SFML widget in Qt
Post by: delio on March 16, 2014, 09:03:23 am
I've follow the tutorial below.
http://becomingindiedev.blogspot.com/2013/10/qt-5-and-sfml-20-integration.html

but It gives many errors. In the picture below
(http://upic.me/i/wa/t8gss.png)

I have no idea, How can I do? So, Please suggest me.

Thanks,

Sorry for bad English

but it give many error.

So, Please suggest how to adjust this code
Title: Re: SFML widget in Qt
Post by: Francismoy on March 16, 2014, 11:41:28 pm
Hi

I'm the creator of the post that you refer to.

It's my impression that you're using Windows instead of Mac OS. From the error message, I think that the create method (RenderWindow::create) requires a pointer to a windows handler (HWND *) and does not accept a explicit casting to (void *). Unfortunately, I haven't tried this on Windows, so for now it's the only hint I can provide.

Hope some other friends shed some more light on this issue.

FM
Title: Re: SFML widget in Qt
Post by: delio on March 17, 2014, 07:49:50 am
Hi

I'm the creator of the post that you refer to.

It's my impression that you're using Windows instead of Mac OS. From the error message, I think that the create method (RenderWindow::create) requires a pointer to a windows handler (HWND *) and does not accept a explicit casting to (void *). Unfortunately, I haven't tried this on Windows, so for now it's the only hint I can provide.

Hope some other friends shed some more light on this issue.

FM

Thanks
Nice tutorial!

Waiting for more help

------------------------------
I found solution
Change line 33 of QSFMLCanvas.cpp to
RenderWindow::create(reinterpret_cast<sf::WindowHandle>(winId()));
Title: Re: [Solved]SFML widget in Qt
Post by: Francismoy on April 26, 2014, 12:01:04 pm
Thanks for the fix! :)

I edited the tutorial in my blog to include the problem and the solution.