George Bora
George Bora

Reputation: 1650

How to programmatically add a UI to a widget based on a Qtvtkwidget?

I am trying to write a program based of of this example i.e. a widget based on QVTKWidget, so that I can use the PCL Visualizer inside the widget, with no UI and the first step for me would be to add a simple UI a menubar with some simple options: close,save etc.

Unfortunately my experience with QT interfaces is with the Designer, I have though seen what ui files look like but I have seen no tutorials on how to add them to widgets, tutorials for adding them to main windows I've seen a few.

Do you know of a simple method to add a .ui file to a QVTKWidget or a widget in general?

Upvotes: 0

Views: 430

Answers (1)

Harald Scheirich
Harald Scheirich

Reputation: 9764

The easiest way to do this is to create an application, or a widget in designer, then add a plain QWidget into the content, this QWidget you promote to type QVTKWidget, through the designer interface as described in the documentation. Then you can add all the other ui elements to the application and interact with the QVTKWidget

Upvotes: 1

Related Questions