Set frameless widget over the main window
-
I created a custom widget with
Qt::FramelessWindowHint | Qt::Tool
as flags and I'm moving it usingmove
andshow
andhide
methods to control position and display but I noticed that in linux the widget is not over the main window but under it, how can I set this frameless widget to be over the main window? It works fine on Windows. -
Hi
Make sure you set its parent and see if
setWindowFlags(Qt::WindowStaysOnTopHint);
helps -
@mrjj I fixed the question, it's not another window. I did what you said and it appears multiple windows on the taskbar and on Linux it highlights the widget as it was another window.
-
Yes, it's inside the
MainWindow
, a regularQWidget
with a background and a size that I want to move around withmove
but it's not over theMainWindow
on Linux only on Windows.@Mr-Gisa
You can try to call raise() on it
http://doc.qt.io/qt-5/qwidget.html#raise