Hi folks
I need some idea on how we can use QtVTKViews in a QML Window ? I compiled vtk with Qt and found it is generating QtVtkViews but how can we use it in QML Surface ? If anyone knowes I need help…
I don’t know what you mean with QtVTKViews. Do you mean using VTK in a Qt QML Window?
There are some examples how to embed VTK in QML Surface on github:
and
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
This file has been truncated. show original
QVTKFramebufferObjectItem.cpp
#include "QVTKFramebufferObjectItem.h"
// Use the OpenGL API abstraction from Qt instead of from VTK because vtkgl.h
// and other Qt OpenGL-related headers do not play nice when included in the
// same compilation unit
#include <QOpenGLFunctions>
#include <QQuickFramebufferObject>
#include <QOpenGLFramebufferObject>
This file has been truncated. show original
QVTKFramebufferObjectItem.h
#ifndef QVTKFrameBufferObjectItem_h_
#define QVTKFrameBufferObjectItem_h_
#include <QtQuick/QQuickFramebufferObject>
class vtkGenericOpenGLRenderWindow;
class QVTKFramebufferObjectRenderer;
class QVTKFrameBufferObjectItem : public QQuickFramebufferObject
{
This file has been truncated. show original
There are more than three files. show original