How to snap QMdiSubWindow to corners/edges of QMdiArea
-
I wanted to create a program that would boot from a USB in fullscreen, but It would use a QMdiArea with a toolbar under it to appear like a custom operating system. I'm guessing a native solution doesn't exist, so I want to know how I could subclass QMdiArea/QMdiSubWindow to make this possible. Thanks!
-
Hi,
If you want OS like user interface, did you consider using the Qt Wayland module ? That would give you greater flexibility.
-
@SGaist Thanks for the reply. I hadn't heard of this module before.
I wanted to use X11 for the program, and I don't think that this small feature requires switching to a whole new display server. I just wanted the windows to snap to borders like they do in real operating systems. The program I'm making is just a simple tool for manging hard drives (similar to the GParted bootable iso), so it doesn't need to look as realistic as an actual OS.
-
If you have X11 running then you have a real OS ? You could use a minimal window manager that fits your need.
You can also use one of the other backend like LinuxFB that do not require X11 running.
By the way are you looking for a widget only solution or maybe Qt Quick ?
-
@SGaist The main reason I was trying to avoid a window manager was to save storage space, so I'll look into the framebuffer since it would mean that I could even leave out X11 itself.
But this takes us back the my original question, since I still don't know how to make the subwindows snap to edges on the framebuffer just like I didn't with X11.
-
@SGaist The main reason I was trying to avoid a window manager was to save storage space, so I'll look into the framebuffer since it would mean that I could even leave out X11 itself.
But this takes us back the my original question, since I still don't know how to make the subwindows snap to edges on the framebuffer just like I didn't with X11.
@sammonius, I'm struggling with this, too. Have you ascertained whether a solution exists? Thus far, I've been forced to resort to
QDockWidget
s instead. Perhaps we'll need to request it at JIRA.