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

Author Topic: Qt-Integration - UPDATE: Mistake in the Tutorial  (Read 3489 times)

0 Members and 1 Guest are viewing this topic.

Kernelpanic

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://eisenholz.bplaced.net
Qt-Integration - UPDATE: Mistake in the Tutorial
« 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

Kernelpanic

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://eisenholz.bplaced.net
Qt-Integration - UPDATE: Mistake in the Tutorial
« Reply #1 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.

Kernelpanic

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • http://eisenholz.bplaced.net
Qt-Integration - UPDATE: Mistake in the Tutorial
« Reply #2 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? ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Qt-Integration - UPDATE: Mistake in the Tutorial
« Reply #3 on: September 23, 2008, 01:30:37 pm »
Sure, thanks for your feedback :)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Qt-Integration - UPDATE: Mistake in the Tutorial
« Reply #4 on: September 23, 2008, 10:16:09 pm »
Done.
Laurent Gomila - SFML developer