QPanda3D icon indicating copy to clipboard operation
QPanda3D copied to clipboard

MyWorld in hello world example has no __init__ function

Open enjoysmath opened this issue 4 years ago • 1 comments

In particular python complains because the base class init expects a self (hidden first param). So I wrapped it in an init() method and it works, except:

adding: Panda3DWorld.init(self, width=1024, height=768)

The preffered width / height has no effect.

enjoysmath avatar Jan 01 '21 06:01 enjoysmath

Hi, in QPanda3D, we use QWidgets (QPanda3DWorld). In this case, as any Qt widget, you depend on the layout in which the widget is placed. Refer to setSizePolicy and setFixedWidth and setFixedHeight methods to learn how to force a fixed widget size. QPanda3D is a wrapper that links Panda3d to the Qt world.

ParisNeo avatar Jan 21 '21 21:01 ParisNeo