[Qt-interest] WindowStaysOnTop hint issue in Windows
Raja Rokkam
rokkamraja at gmail.com
Mon Nov 2 15:25:32 CET 2009
Hi All,
I am trying to create a widget with following window flags set:
setWindowFlags( Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint |
Qt::Tool )
Now, when I drag the window on top of task bar and click on taskbar, the
window no longer stays on top. I want my window always on top of taskbar in
anycase.
I tried catching focusoutevent and mouse move events but no luck. Probably I
am doing something wrong in these ? I have pasted the code below:
void TranslucentRoundWindow::mousePressEvent( QMouseEvent *evt )
{
QWidget::mousePressEvent( evt );
this->repaint();
}
void TranslucentRoundWindow::mouseReleaseEvent( QMouseEvent *evt )
{
QWidget::mouseReleaseEvent( evt );
this->repaint();
}
void TranslucentRoundWindow::mouseMoveEvent( QMouseEvent *evt )
{
QWidget::mouseMoveEvent( evt );
this->repaint();
}
void focusOutEvent ( QFocusEvent * event )
{
QWidget::focusOutEvent( event );
this->repaint();
// this->hasMouseTracking();
// this->setWindowState( Qt::WindowActive );
}
Any help in this regard will be greatly appreciated.
Thanks,
Raja.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091102/60aa78d7/attachment.html
More information about the Qt-interest-old
mailing list