PDA

View Full Version : Notepad++ like dialog



danics
27th August 2015, 05: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?

Frdz
27th August 2015, 07: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 ^^

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

thanks in advance.

Frdz
27th August 2015, 18: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);
else
setWindowOpacity(qreal e.g 1);
Read help page I told before for more customization, happy coding ^^