Skip to content

[Qt] multiple window/docking support #55

Open
@tlambert03

Description

@tlambert03

it looks like the call to winId() here in rendercanvas:

def _get_surface_ids(self):
if sys.platform.startswith("win") or sys.platform.startswith("darwin"):
return {
"window": int(self.winId()),
}
elif sys.platform.startswith("linux"):
if False:
# We fall back to XWayland, see _coreutils.py
return {
"platform": "wayland",
"window": int(self.winId()),
"display": int(get_alt_wayland_display()),
}
else:
return {
"platform": "x11",
"window": int(self.winId()),
"display": int(get_alt_x11_display()),
}
else:
raise RuntimeError(f"Cannot get Qt surface info on {sys.platform}.")

causes problems with the dock widget system, such that when you drag them, they don't "go with you" ... It's hard to explain so here's a visual:

before adding pygfx canvas, when you click and drag a dock widget it goes with you:

Screen.Recording.2025-02-03.at.7.48.41.PM.mov

after adding pygfx canvas, it does indeed float... but then it "stays put" until you go back and click on it again

Untitled.mov

really not sure who should be "responsible" for this one (pygfx or the end user). But so far, I haven't yet been able to find a way to recover normal dock widget activity after having instantiated a QtRenderCanvas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions