I'm setting up a small code editor using QT and following this example. However, i'm curious on how to create windows within windows or widgets within widgets. I'm trying to achieve something similar to these:
https://i.sstatic.net/Vn8Ut.png
Is there an example of overlaying widgets like this?
Any alternative solution for QMessagebox for IOS development (QWidget application only)?
I gave an example of getting another QWidget
to be embedded and painted on top of another one. Let me know if you have any questions about how it was done.
The PopUp
flag and Qt::Tool
options are also relevant.
Be sure to check out:
There are also other ways to make borderless, focusless windows that hover and disappear quickly on command. The Window Flags
and Widget Attributes
in Qt are very powerful when you are looking to modify Qt Widgets.
When you parent a Widget to another widget, it will draw itself on top of the other. Then you just need to resize and position it properly.
Also subclassing existing widgets can give you more options.
Also common Qt::Tool
s that you will find are QDockWidget
s. They are awesome!
Hope that helps.