2

I want to build a window that no frame, so I use that code:

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

it's work, but when I build with AppImage, it becomes invalid。

The complete constructor looks like this:

GWidget::GWidget(QWidget *parent)
        : QWidget(parent)
{
    setWindowFlags(Qt::FramelessWindowHint | windowFlags());
    setAttribute(Qt::WA_TranslucentBackground);
}

I try to Google,I find that maybe related to Window Manager, But I still can't solve this problem.

Who can help me?

Maicss
  • 21
  • 3
  • Please add a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – ניר Jul 13 '22 at 04:33
  • The line of code I provided is the only relevant code for this problem, it is written in the constructor of the QWidget class and it usually works, it only fails when packaged with AppImage, the build environment is Ubuntu 18.04, this information may be useful to solve the problem. – Maicss Jul 13 '22 at 04:41
  • I think you need to provide a bit more info/context. What do you mean by `"... it becomes invalid"`? What are the symptoms? And how is `AppImage` involved: does it all function as expected if you use something other than `AppImage` for distribution? Depending on the actual problem you may want to experiment with other [window flags](https://doc.qt.io/qt-6/qt.html#WindowType-enum) such as `Qt::BypassWindowManagerHint ` and `Qt::X11BypassWindowManagerHint `. – G.M. Jul 13 '22 at 08:00

0 Answers0