Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyWorld in hello world example has no __init__ function #10

Open
enjoysmath opened this issue Jan 1, 2021 · 1 comment
Open

MyWorld in hello world example has no __init__ function #10

enjoysmath opened this issue Jan 1, 2021 · 1 comment

Comments

@enjoysmath
Copy link

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.

@ParisNeo
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants