I have a widget with these flags and attributes:
setWindowFlags(Qt::SubWindow | Qt::FramelessWindowHint );
this->setAttribute(Qt::WA_TranslucentBackground);
this->setAttribute(Qt::WA_TransparentForMouseEvents);
setWindowFlags(Qt::SubWindow | Qt::FramelessWindowHint );
setTransformationAnchor(QGraphicsView::AnchorViewCenter);
this->setAttribute(Qt::WA_TranslucentBackground);
this->setAttribute(Qt::WA_TransparentForMouseEvents);
To copy to clipboard, switch view to plain text mode
To make the window always on top:
setWindowFlags(Qt::FramelessWindowHint | Qt::SubWindow | Qt::WindowStaysOnTopHint);
setWindowFlags(Qt::FramelessWindowHint | Qt::SubWindow | Qt::WindowStaysOnTopHint);
To copy to clipboard, switch view to plain text mode
So when the app runs, the window is on top of every other window, but as soon as I click any other window it goes behind the windowI clicked.
Why this behaviour?
Bookmarks