Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Solved]SFML widget in Qt  (Read 2365 times)

0 Members and 1 Guest are viewing this topic.

delio

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
[Solved]SFML widget in Qt
« 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


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
« Last Edit: March 17, 2014, 09:11:24 am by delio »

Francismoy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SFML widget in Qt
« Reply #1 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

delio

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: SFML widget in Qt
« Reply #2 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()));
« Last Edit: March 17, 2014, 09:11:48 am by delio »

Francismoy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: [Solved]SFML widget in Qt
« Reply #3 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.