Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem showing application in fullscreen
Forum Updated to NodeBB v4.3 + New Features

Problem showing application in fullscreen

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rakeshthp
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      What OS are we talking about ?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rakeshthp
        wrote on last edited by
        #3

        Oh Sorry. This is on MAC OS

        mrjjM 1 Reply Last reply
        0
        • R rakeshthp

          Oh Sorry. This is on MAC OS

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @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.

          R 1 Reply Last reply
          0
          • mrjjM mrjj

            @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.

            R Offline
            R Offline
            rakeshthp
            wrote on last edited by
            #5

            @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.

            mrjjM 1 Reply Last reply
            0
            • R rakeshthp

              @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.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rakeshthp
                wrote on last edited by
                #7

                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.

                mrjjM 1 Reply Last reply
                0
                • R rakeshthp

                  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.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved