FS#108 - Updated the Qt sample and tutorial to work with Qt 4.5

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1082 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2009-05-04 07:41:39 +00:00
parent 4d44a91ced
commit 0883940b2a
2 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,7 @@ myInitialized (false)
{
// Setup some states to allow direct rendering into the widget
setAttribute(Qt::WA_PaintOnScreen);
setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_NoSystemBackground);
// Set strong focus to enable keyboard events to be received
@ -63,6 +64,15 @@ void QSFMLCanvas::OnUpdate()
}
////////////////////////////////////////////////////////////
/// Return the paint engine used by the widget to draw itself
////////////////////////////////////////////////////////////
QPaintEngine* QSFMLCanvas::paintEngine() const
{
return 0;
}
////////////////////////////////////////////////////////////
/// Called when the widget is shown ;
/// we use it to initialize our SFML window

View File

@ -50,6 +50,12 @@ private :
////////////////////////////////////////////////////////////
virtual void OnUpdate();
////////////////////////////////////////////////////////////
/// Return the paint engine used by the widget to draw itself
///
////////////////////////////////////////////////////////////
virtual QPaintEngine* paintEngine() const;
////////////////////////////////////////////////////////////
/// Called when the widget is shown ;
/// we use it to initialize our SFML window