Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5 - How to create a frameless window?
Forum Updated to NodeBB v4.3 + New Features

Qt 5 - How to create a frameless window?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 21.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qtd1d1
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tomma
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qtd1d1
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jglinny
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0
          • O Offline
            O Offline
            outdoor_guy
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved