Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

QObject not found while compiling external plugin #21

Closed
renoust opened this issue Sep 9, 2017 · 3 comments
Closed

QObject not found while compiling external plugin #21

renoust opened this issue Sep 9, 2017 · 3 comments

Comments

@renoust
Copy link

renoust commented Sep 9, 2017

Hi sorry to bother,

When I am compiling an external plugin, I get a rather strange error that comes only from the include: #include <tulip/NodeLinkDiagramComponentInteractor.h>.
I wonder if I get something wrong from my cmakelist, because this does not happen in the usual MouseLassoNodesSelector...

Here is the error

In file included from /work/tulip-svn/tulip/externalplugins/MouseLassoNodesPythonSelector/MouseLassoNodesPythonSelector.cpp:23:
In file included from /work/tulip-svn/tulip/externalplugins/MouseLassoNodesPythonSelector/MouseLassoNodesPythonSelector.h:25:
In file included from /work/tulip-svn/tulip/library/tulip-gui/include/tulip/NodeLinkDiagramComponentInteractor.h:22:
In file included from /work/tulip-svn/tulip/library/tulip-gui/include/tulip/GLInteractor.h:22:
In file included from /work/tulip-svn/tulip/library/tulip-gui/include/tulip/InteractorComposite.h:23:
/work/tulip-svn/tulip/library/tulip-gui/include/tulip/Interactor.h:25:10: fatal error: 'QObject' file not found
#include <QObject>
         ^
1 error generated.
make[2]: *** [externalplugins/MouseLassoNodesPythonSelector/CMakeFiles/MouseLassoPythonNodesSelector-5.1.0-dev.dir/MouseLassoNodesPythonSelector.cpp.o] Error 1
make[1]: *** [externalplugins/MouseLassoNodesPythonSelector/CMakeFiles/MouseLassoPythonNodesSelector-5.1.0-dev.dir/all] Error 2
make: *** [all] Error 2

Here is the CMakeList:

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${TulipCoreBuildInclude} ${TulipCoreInclude} ${TulipOGLInclude} ${TulipGUIInclude} ${OPENGL_INCLUDE_DIR})

SET(LIB_SRCS
    MouseLassoNodesPythonSelector.cpp
)

QTX_ADD_RESOURCES(LIB_RCC_SRCS
    MouseLassoNodesPythonSelectorResource.qrc
)

ADD_LIBRARY(MouseLassoPythonNodesSelector-${TulipVersion} SHARED ${LIB_SRCS} ${LIB_RCC_SRCS})
TARGET_LINK_LIBRARIES(MouseLassoPythonNodesSelector-${TulipVersion} ${LibTulipCoreName} ${LibTulipOGLName} ${LibTulipGUIName} ${OPENGL_gl_LIBRARY})

TULIP_INSTALL_PLUGIN(MouseLassoPythonNodesSelector-${TulipVersion} ${TulipInteractorPluginsInstallDir})
@tulipdev
Copy link
Contributor

tulipdev commented Sep 9, 2017 via email

@anlambert
Copy link
Contributor

As Romain said, the Tulip Qt CMake configuration has slightly changed recently (see 27ff443), mainly to speedup development builds when switching between Qt versions. Indeed, we are still supporting Qt4 in order to target legacy linux distributions (CentOS for instance).

@renoust
Copy link
Author

renoust commented Sep 13, 2017 via email

p-mary referenced this issue in anlambert/talipot Jan 3, 2020
QOpenGL module is marked as deprecated since a while now so it is time
to remove its use from the Talipot codebase and promote the use of
QOpenGL* classes directly integrated in the QtGui module.

The big difference between QOpenGL and QtOpenGL from Qt5 is that all
rendering is performed in framebuffer objects, there is no more direct
rendering in the underlying os windows with its own OpenGL context.

Talipot OpenGL rendering also follows that idiom, all renderings are performed
offscreen using a shared OpenGL context. This also means that there is no
more QGLWidget as viewport for QGraphicsView. Talipot OpenGL scene are
now converted to QImage in order to display them using the default Qt raster
rendering engine. This should fixes the numerous rendering glitches observed
on MacOS.

First thing observed after the migration is a consequent performance boost
in OpenGL rendering when using an Intel GPU on a Linux host machine (especially
when selecting elements, it is now 10 times faster on debian stable).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants