Qt remove title bar

后端 未结 1 950
不思量自难忘°
不思量自难忘° 2021-01-01 13:58

I\'ve a MediaPanel which inherits from QWidget and I want to hide the title bar but event if I set the flags with setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTi

相关标签:
1条回答
  • 2021-01-01 14:24

    setWindowFlags(Qt::Window | Qt::FramelessWindowHint) works for me. Make sure you are applying the setting on your highest level window. e.g in the main.cpp See the image below, forgive the wired 3D thing, testing some OpenGL code. enter image description here

    int main(int argc, char *argv[])
    {
      QApplication a(argc, argv);
      WoodPuppet window;
    
      window.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
      window.show();
    }
    
    0 讨论(0)
提交回复
热议问题