Problem showing application in fullscreen



  • Hi all,

    I am working on a project where my application is running as an agent mode, i.e. it runs in the background by sitting in system tray as soon as it is executed. This is done by making use of LSUIElement=1.

    Next I have a window which is shown when clicked on menu popping from the system tray icon. When I make this window as fullscreen, I can see the system menu bar still remains on top of the application. I am making use of QWindow's showFullScreen and showNormal.

    So the question is, How to eliminate the system menu bar in full screen mode? Inputs are appreciated.

    Thanks & Regards


  • Qt Champions 2017

    Hi
    What OS are we talking about ?



  • Oh Sorry. This is on MAC OS


  • Qt Champions 2017

    @rakeshthp
    Ok 10.8 or newer?

    can you try this code

    #include <QtGui/QApplication>
    #include <QLabel>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
    
        QLabel label("Test!");
        label.setWindowFlags(Qt::FramelessWindowHint);
        label.showFullScreen();
    
        return a.exec();
    }
    

    As far as i know , fullscreen apps gets their own desktop but i have no mac devices to test on.

    Also what Qt version. Qt5.4 or less had a bug with it as far as i recall.



  • @mrjj said in Problem showing application in fullscreen:

    #include <QtGui/QApplication>
    #include <QLabel>

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

    QLabel label("Test!");
    label.setWindowFlags(Qt::FramelessWindowHint);
    label.showFullScreen();
    
    return a.exec();
    

    }

    Latest version of OS. 10.12 and QT 5.6. This is label, and I have main window. Let me try anyways.


  • Qt Champions 2017

    @rakeshthp
    Its just for test. both are a Widget so it works for label , it would also work
    for mainwindow.



  • Hi,

    The window we have is a custom window derived from QWindow. And it works well if LSUIElement=0. i.e. it is shown in dock bar as well as menu bar. Only when we change LSUIElement=1, and make a particular dialog fullscreen, this issue comes up. Due to huge code base, I cannot post the sample code.


  • Qt Champions 2017

    @rakeshthp
    Ok. im not into macOs so lets wait and see if others coders on macOS have a suggestion.


  • Lifetime Qt Champion

    Hi,

    In that case can you provide a minimal sample that makes use of LSUIElement and goes fullscreen as yours do ? That would at least give a common ground to try to find a solution.


Log in to reply
 

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