1
General discussions / troubles with Qt integration support on OS X
« on: August 25, 2011, 04:52:01 am »
Hi.
I'm a new user of both SFML and Qt and I had some troubles when I tried to make their integration.
I'm using Qt 4.7.4 and SFML 1.6.
I got the code of SFMLCanvas in the tutorial page (http://www.sfml-dev.org/tutorials/1.6/sources/QSFMLCanvas.hpp) and I have noticed that it's necessary to modify showEvent method, exchanging the line "Create(winId());" for "create();"
The OnUpdate method is being called, but it doesn't draw anything and doesn't even fill the canvas with the clear color.
Is qt integration on Mac OS X unsupported?
Sorry me for orthographic mistakes. English isn't my native language.
Thank you.
I'm a new user of both SFML and Qt and I had some troubles when I tried to make their integration.
I'm using Qt 4.7.4 and SFML 1.6.
I got the code of SFMLCanvas in the tutorial page (http://www.sfml-dev.org/tutorials/1.6/sources/QSFMLCanvas.hpp) and I have noticed that it's necessary to modify showEvent method, exchanging the line "Create(winId());" for "create();"
The OnUpdate method is being called, but it doesn't draw anything and doesn't even fill the canvas with the clear color.
Code: [Select]
void QAnimationPlayer::OnUpdate() {
Clear(sf::Color(0, 255, 0, 255));
sf::Shape line = sf::Shape::Line(sf::Vector2f(0,0),sf::Vector2f(200,200),20.f,sf::Color(255,0,255));
Draw(line);
std::cout << "I'm here\n";
std::flush(std::cout);
}
Is qt integration on Mac OS X unsupported?
Sorry me for orthographic mistakes. English isn't my native language.
Thank you.