Well yes you can do that but it won't be like a popupmenu and won't behave like a menu, I would have to add buttons (not exactly like a menu item) etcetera.
It's definitively possible since popupmenus are almost that (window without frame that opens at mouse position). In this case it would be a window with frame (tool window) with a "unfolded" menu in it.
If you have Maya and you click on the first separator in a menu, you tear it off.
look at these 2 screenshots showing the process:

It's definitively possible since popupmenus are almost that (window without frame that opens at mouse position). In this case it would be a window with frame (tool window) with a "unfolded" menu in it.
If you have Maya and you click on the first separator in a menu, you tear it off.
look at these 2 screenshots showing the process:
