[osg-users] osgQt: compile error in moc_QGraphicsViewAdapter.cxx

1 view
Skip to first unread message

John Vidar Larring

unread,
Mar 23, 2010, 6:31:16 AM3/23/10
to osg-...@lists.openscenegraph.org
Hi all,

When compiling the latest osg trunk (rev11277) I get the following
compile error for osgQt on win32 VS2008:

13>------ Build started: Project: osgQt, Configuration: Release Win32 ------
13>Generating __/__/include/osgQt/moc_QGraphicsViewAdapter.cxx
13>Compiling...
13>moc_QGraphicsViewAdapter.cxx
13>.\__\__\include\osgQt\moc_QGraphicsViewAdapter.cxx(11) : fatal error
C1189: #error : "The header file 'QGraphicsViewAdapter' doesn't include
<QObject>."

The currently installed Qt version is 4.4.3. I know this is not the
latest one, but there are other project restriction which does not allow
me to upgrade Qt right now.

I am very happy that the osgQt library is emerging and I se great
potential for further integration between Qt and OSG. However, does any
one know if there are any specific Qt version requirements for this
library? Qt 4.5? Qt 4.6?

My current work-around is to disable everything Qt in OSG by setting
QT_QMAKE_EXECUTABLE to an invalid path .e.g.:
C:/Qt/4.4.3/bin/qmake.exe.hide .

Best regards,
John

--
This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Trajce (Nick) Nikolov

unread,
Mar 23, 2010, 8:37:41 AM3/23/10
to OpenSceneGraph Users
Hi John,

I had the same issue yesterday. I am not  a Qt guru, but the way how I resolved this issue was by simply removing that file and let it be regenerated by Qt with the version you are using

-Nick

Robert Osfield

unread,
Mar 23, 2010, 9:22:53 AM3/23/10
to OpenSceneGraph Users
Hi JOhn & Nick,

On Tue, Mar 23, 2010 at 12:37 PM, Trajce (Nick) Nikolov
<nikolov...@gmail.com> wrote:
> Hi John,
> I had the same issue yesterday. I am not  a Qt guru, but the way how I
> resolved this issue was by simply removing that file and let it be
> regenerated by Qt with the version you are using

Curious. The moc_QGraphicsViewAdapter.cxx is not part of svn/trunk
but created by CMake/Moc so it should always be relevant to version of
Qt you have, unless the Qt version changes in which case the file
would need updating. Perhaps changes to QGraphcsViewAdapter class
aren't picked up either, and require a manual update.

I've just do a touch incldue/osgQt/QGraphicsViewAdapter and Cmake
automatically did update moc_QGraphicsViewAfapter.cxx automatically,
but this is when using unix make command, perhaps the WIndows build in
VS doesn't support this.

Robert.

David Glenn

unread,
Mar 23, 2010, 7:19:27 PM3/23/10
to osg-...@lists.openscenegraph.org
Hi,

[Arrow] I use QT 4.5.2 and the only issue I've had is timing.
if you look at the example code osgViewerQT you will notice that there is a QTimer that is set to keep OSG from free running. I have had times that I have had to increase the time delay because when I upgraded to the latest QT stuff and funky things began to happen in the QT Dialog stuff. :-< I've had to set the delay to about 15ms for 4.5.2.

This might not be a problem for you, but keep it in mind! Just in case!

[Arrow] The only other thing is that if you want to place a OSG window in a dialog, you will need to have something to hang the instance onto (like you do for OpenGL). I like to use a frame wedgit myself. And if the dialog resizes you will have to echo that in the OSG window as well.

[Arrow] Oh, Yea. Be sure that you transfer all the mouse buttons (in QT) to be seen by OSG. I forgot off had what to do, but if nobody else can remember, I can find out how I did it in my project.

It's not Rocket Science, just a balance of QT and OSG! ;)

laters,
D Glenn

------------------------
D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26046#26046

Reply all
Reply to author
Forward
0 new messages