Qt::X11BypassWindowManagerHint causing issues on QT5.X



  • We have QMainWindow that we require to be ONTOP at all times on Linux. Following the QT doc we have setup the window flags as follows:

    QMainWindow(parent, Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint| Qt::FramelessWindowHint )

    While this does put the window ontop, the data inside the window does not update it stays frozen on the info put there at startup. Removal of the Qt::X11BypassWindowManagerHint allows the window to operate normally, it just does not stay ontop of all other Qt/X windows. On QT versions prior to QT5 this was working as expected.

    In the case of this window the window contains an OpenSceneGraph viewerWidget setup.

    MainWindow::MainWindow(QWidget *parent) :
    // QMainWindow(parent, Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint| Qt::FramelessWindowHint ),
    QMainWindow(parent, Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);

    run_app = 0;
    init_count = false;
    pod_on = false;
    
    QShortcut *shortcut = new QShortcut(QKeySequence("F4"), this);
    connect(shortcut, SIGNAL(activated()), this, SLOT(close()));
    
    _view = ui->graphic_view->add("POD HD");
    
    if( QFileInfo( ConvertPath("POD_HD_Config")+"pod_hd_config.ini" ).exists() )
        readConfig();
    
    connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));
    _timer.start(16);
    

    }
    ...

    int main(int argc, char *argv[])
    {

    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    
    return a.exec();
    

    }

    Any hints would be appreciated...I can post more code if needed, but the code is property of our
    customer so I can only post snippets until I get a small selfcontained app created.

    Thank you,

    Curtis Rubel
    crubel@compro.net


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.