0

I am building a GUI program with pyqt. As part of the program, I am using an external module (pptk) for visualizing very large point clouds. The pptk module has a "viewer" class, which, when called, opens a viewer to view a point cloud as a standalone operating system process. The viewer can be called as follows (after installing pptk):

import pptk
v = pptk.viewer(pointCloud)

My goal is to embed the output of the pptk viewer (a window showing pointCloud) within a pyqt widget, so that I can put other QLabels etc. around it. This would be something similar to this, except I don't have a .exe file which I can so easily embed. I am using MacOS but the solution would need to be cross-platform compatible. Is this possible?

Matt
  • 43
  • 6

1 Answers1

0

No. The pptk viewer is implemented with qt, but current implementation open the window with subprocess (in this file):

self._process = subprocess.Popen(
            [os.path.join(_viewer_dir, 'viewer'), str(s.getsockname()[1])],
            stdout=subprocess.PIPE,
            stderr=(None if debug else subprocess.PIPE))

and call program.

You need to write own wrapper (maybe using SIP or Cython) to get the widget.

Grzegorz Bokota
  • 1,736
  • 11
  • 19
  • Thanks for the helpful response. Excuse my decided non-expertise in this area, but why does the fact that the viewer window is opened with subprocess preclude the ability to embed it in a widget? – Matt Jul 25 '19 at 14:49
  • This is separated program. From the safety reasons controlling. In classical operating system the possibility of communicating between programs are limited. This is for safety reason. Allow for controlling position, size of window for any program will be dangerous. – Grzegorz Bokota Jul 25 '19 at 16:25