c++qt

QT window within window?


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

http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/Download-Visual-Studio-2013-while-your-f_1431E/image_4eb5427c-1ae7-4464-9c26-2282fe8d06c3.png

Is there an example of overlaying widgets like this?


Solution

  • 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.

    Draw text on scrollbar

    Also common Qt::Tools that you will find are QDockWidgets. They are awesome!

    Hope that helps.