View Full Version : Notepad++ like dialog

27th August 2015, 06:26
Hi everyone,

I want to create a QDialog not modal but always shows on top of other widgets and when I select below full screen widget or mainwindow my dialog shouldn't hide just get some transparency. exactly like find in notepad++.

How can i do that?

27th August 2015, 08:52
Hi Danics,
Your problem nicely documented in Qt Creator Help Page, in section Qt Namespace/Widget Attribute
Better explanation there, just press Ctrl+F
another one maybe about evenFilter or signals&slots
Good luck ^^

27th August 2015, 10:26
Can you give more hint and say exactly witch attributes must be set for dialog?

thanks in advance.

27th August 2015, 19:25
Non modal -> create your dialog on the heap and show(); destroy on close
Mouse event -> QObject::connect(qApp,SIGNAL(focusChanged(QWidget* ,QWidget*),yourQDialog,SLOT(changeOpacityFunc())

void changeOpacityFunc()
if (!isActiveWindow)
setWindowOpacity(qreal e.g 0.5);
setWindowOpacity(qreal e.g 1);
Read help page I told before for more customization, happy coding ^^