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. Create a window without title bar on OSX
Forum Updated to NodeBB v4.3 + New Features

Create a window without title bar on OSX

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.8k 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.
  • benlauB Offline
    benlauB Offline
    benlau
    Qt Champions 2016
    wrote on last edited by benlau
    #1

    Hello,

    I would like to create an app in Mac without title bar just like the above article by using the NSFullSizeContentViewWindowMask flag , so that the window controls (close , max min etc) are still present.

    https://eduardmetzger.wordpress.com/2016/04/03/create-a-window-without-title-bar-with-qtqml-on-osx/

    However, this article also pointed out that the window will turn black in some case. The author do not have a method to fix it.

    I test it with Qt 5.8. The screen will be completely black, if I switch out and switch in again. It will display correct content. Just wonder any one has experience in this issue and willing to share your finding here?

    Thanks for any advise.

    jsulmJ 1 Reply Last reply
    0
    • benlauB benlau

      Hello,

      I would like to create an app in Mac without title bar just like the above article by using the NSFullSizeContentViewWindowMask flag , so that the window controls (close , max min etc) are still present.

      https://eduardmetzger.wordpress.com/2016/04/03/create-a-window-without-title-bar-with-qtqml-on-osx/

      However, this article also pointed out that the window will turn black in some case. The author do not have a method to fix it.

      I test it with Qt 5.8. The screen will be completely black, if I switch out and switch in again. It will display correct content. Just wonder any one has experience in this issue and willing to share your finding here?

      Thanks for any advise.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @benlau Does

      setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
      

      do what you want?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      benlauB 1 Reply Last reply
      0
      • jsulmJ jsulm

        @benlau Does

        setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
        

        do what you want?

        benlauB Offline
        benlauB Offline
        benlau
        Qt Champions 2016
        wrote on last edited by benlau
        #3

        @jsulm Thx. But this method don't keep the max / min and close button at the top/left corner of window.

        1 Reply Last reply
        0
        • benlauB Offline
          benlauB Offline
          benlau
          Qt Champions 2016
          wrote on last edited by
          #4

          Similar issue: [QTBUG-61332] Transparent titlebar under macOS 10.10+ - Qt Bug Tracker

          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