Important: Please read the Qt Code of Conduct -

Qt 5 - How to create a frameless window?

  • Hi,

    is there any example out there or do you propably know how to create a frameless window in Qt5?
    The old way (as shown below) doesn't work.

    the setWindowsFlags function is not available in QQuickView.


  • QQuickView is not QWidget anymore but QWindow which has setFlags method.

  • Do you know how to append a QQuickView to a QWindow? Thanks

  • I am having the same problem, from a QMainWindow widget. In Qt 4, I used:
    @setWindowFlags(Qt::Widget | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);@

    and this worked great.

    In Qt 5, I have tried all combinations of Qt::FramelessWindowHint, Qt::X11BypassWindowManagerHint, Qt::Widget, and Qt::Window, and nothing has worked. This is on X11.

    Is there a new window flag in Qt 5 that accomplishes this in Linux, or is there some other way to do this?


  • Sorry, this one is quite old, but I came to this via a Google search, because I was facing the same problem.

    However, I found the solution, by calling


    viewer is of QtQuick2ApplicationViewer:public QQuickView

    setFlags in is QWindow

    Hope that helps

Log in to reply