SFML community forums

Help => Graphics => Topic started by: Kernelpanic on September 20, 2008, 12:44:30 am

Title: Qt-Integration - UPDATE: Mistake in the Tutorial
Post by: Kernelpanic on September 20, 2008, 12:44:30 am
Hi!
I tried to integrate SFML into Qt.
I used the QSFMLCanvas from the SVN-Version-Tutorial.
But it seems not to like the winId(), because with "Create(winId());" I get this error:
Quote

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 3 (X_GetWindowAttributes)
  Resource id:  0x8e0000a
Failed to get the window attributes


I am using qt 4.4 and sfml from svn.

Thank you for help
Kernelpanic
Title: Qt-Integration - UPDATE: Mistake in the Tutorial
Post by: Kernelpanic on September 22, 2008, 02:19:52 pm
Now it works, I think there was a mistake in my code and lX11 was not linked.
Title: Qt-Integration - UPDATE: Mistake in the Tutorial
Post by: Kernelpanic on September 23, 2008, 12:36:53 pm
I have found the mistake:
The section
Code: [Select]

#ifdef Q_WS_X11
    #include <Qt/qx11info_x11.h>
    #include <X11/Xlib.h>
#endif

is missing in the file "http://www.sfml-dev.org/tutorials/1.4/sources/QSFMLCanvas.cpp", but when I use the file samples/qt/QSFMLCanvas.cpp, it works fine.

Could you correct that, Laurent? ;)
Title: Qt-Integration - UPDATE: Mistake in the Tutorial
Post by: Laurent on September 23, 2008, 01:30:37 pm
Sure, thanks for your feedback :)
Title: Qt-Integration - UPDATE: Mistake in the Tutorial
Post by: Laurent on September 23, 2008, 10:16:09 pm
Done.