Frameless window shows dark border on linux

731 Views Asked by At

I created a dialog with shadow effect

 Qt::WindowFlags flags = Qt::Dialog| Qt::FramelessWindowHint;

 QGraphicsDropShadowEffect* effect = new QGraphicsDropShadowEffect;
 effect->setOffset(4);
 effect->setBlurRadius(9);
 contWdget->setGraphicsEffect(effect);

This works perfect on windows but when I open the same dialog in Linux its showing dark black color border around the dialog.

What work around I need to do to make it work on Linux.

enter image description here enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

To frameless window in linux use Qt::FramelessWindowHint like this :

QDialog *dialog = new QDialog();
dialog->setWindowFlags( Qt::FramelessWindowHint );
dialog->show();

screenshot

Tested on :

Qt Creator 4.3.1

Based on Qt 5.9.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

Ubuntu 16.04 LTS