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.
    @myView->setWindowFlags(Qt::FramelessWindowHint)@

    the setWindowsFlags function is not available in QQuickView.

    Thanks.



  • 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?

    Thanks!



  • 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.setFlags(Qt::FramelessWindowHint)@

    viewer is of QtQuick2ApplicationViewer:public QQuickView

    setFlags in is QWindow

    Hope that helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.