Home > Back-end >  Consult the QT VTK vtkcommoncore - 8.0. DLL access the problem of conflict
Consult the QT VTK vtkcommoncore - 8.0. DLL access the problem of conflict

Time:11-28

 



# header file
# include & lt; QtWidgets/QMainWindow>
# include "ui_QtWidgetsApplication1. H"
#include
#include
#include
#include
#include

# include & lt; VtkRenderWindow. H>
# include & lt; VtkAutoInit. H>
VTK_MODULE_INIT (vtkRenderingOpenGL2);
VTK_MODULE_INIT (vtkInteractionStyle);

The class QtWidgetsApplication1: public QMainWindow
{
Q_OBJECT

Public:
QtWidgetsApplication1 (QWidget * parent=Q_NULLPTR);

Private:
Ui: : QtWidgetsApplication1Class Ui;

Boost: : from & lt; Photo: the visualization: : PCLVisualizer> Viewer_pcl;

};



# source file
# include "QtWidgetsApplication1. H"

QtWidgetsApplication1: : QtWidgetsApplication1 (QWidget * parent)
: QMainWindow (parent)
{
UI. SetupUi (this);

UI. QvtkWidget - & gt; SetRenderWindow (viewer_pcl - & gt; GetRenderWindow ());
Viewer_pcl - & gt; SetupInteractor (UI. QvtkWidget - & gt; GetInteractor (), UI. QvtkWidget - & gt; GetRenderWindow ());
UI. QvtkWidget - & gt; The update ();
}

CodePudding user response:

Solve the building Lord, I encountered a similar problem, should be the interaction part of the problem

CodePudding user response:

The constructor initializes the problems, give photo viewer initialization, like the following:
 cloud. Reset (new photo: : PointCloudViewer_pcl. Reset (new photo: : the visualization: : PCLVisualizer (" viewer ", false)); 
Viewer_pcl - & gt; AddCoordinateSystem (5);//add the axis
Viewer_pcl - & gt; AddPointCloud (cloud, "cloud");

UI. QvtkWidget - & gt; SetRenderWindow (viewer_pcl - & gt; GetRenderWindow ());
Viewer_pcl - & gt; SetupInteractor (UI. QvtkWidget - & gt; GetInteractor (), UI. QvtkWidget - & gt; GetRenderWindow ());
UI. QvtkWidget - & gt; The update ();
  • Related