Well, I found this solution looking at the QToolBar source code, qtoolbar.cpp.
In particular, I found this method:
@
void QToolBarPrivate::updateWindowFlags(bool floating, bool unplug)
{
Q_Q(QToolBar);
Qt::WindowFlags flags = floating ? Qt::Tool : Qt::Widget;
flags |= Qt::FramelessWindowHint;
if (unplug) {
flags |= Qt::X11BypassWindowManagerHint;
#ifdef Q_WS_MAC
flags |= Qt::WindowStaysOnTopHint;
#endif
}
q->setWindowFlags(flags);
}
@
So I guess that you need also to add the flag Qt::X11BypassWindowManagerHint, and, with Mac,
the flag Qt::WindowStaysOnTopHint.
Antonio