Floating components

What I am trying to achieve is the behavior of a popup menu. It will always popup at top of everything (I am talking about z-index). Can I do this with a custom component?

Try Component::setAlwaysOnTop()

Yeah that was I first thought too. But this works only for siblings.

Well yes… but if you make it the child of the top level component, then it will be in front of everything else.

So, that’s what popup menu does? And what about component::addToDesktop()? Could I use this?

Yes, you can add them to the desktop as well.