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. FullScreen prevents showing the sub menu bar
QtWS25 Last Chance

FullScreen prevents showing the sub menu bar

Scheduled Pinned Locked Moved Unsolved General and Desktop
widgetfullscreenmenubar
6 Posts 5 Posters 2.1k Views
  • 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.
  • P Offline
    P Offline
    PandaGS
    wrote on last edited by PandaGS
    #1

    Hello,
    this is my first post here in the forum. I have been working with Qt for a year and some change but i am still in the process of learning.
    I have encountered an issue while trying to add a full screen mode to the desktop app i'm working on. When the Full screen is active, clicking on my menu bar (File, View, Edit ...) does not show anything although navigating with the keyboard will give me results.
    Here is my code:

    void MainWindow::on_actionFull_Screen_triggered()
    {
    if (!this->isFullScreen()) {
    mOldState = this->isMaximized();
    this->ui->actionFull_Screen->setText("Exit Full Screen");
    this->showFullScreen();
    } else {
    this->ui->actionFull_Screen->setText("Enter Full Screen");
    if (mOldState) {this->showMaximized();}
    else {this->showNormal();}
    }
    }

    When I am off the fullscreen everything works as intended of course. I have tried setting the menu bar to visibile or random things in the menu bar to visible and not hidden and nothing worked.

    I wanted to change the name from enter and close on run time and with a qdebug i know it works but as i said, it does not show.
    mOldState is a Boolean to save the old state of the app (maximized or not) so i can restore the app to its previous state once the user wants to switch back from full screen.
    The shortcuts works fine and I can easily switch from fullscreen to normal mode and only the menu tab does not show its content.
    One more thing, while doing a print screens for this topic, i noticed that although the window is invisible to me, it showed when i was doing print screens.

    If you need any more information on my issue feel free to ask me. Thank you.
    1_1566231451736_normal presentation.png ![0_1566231451736_fullscreen.png]
    What i See
    0_1566231862525_what i see.png

    (https://ddgobkiprc33d.cloudfront.net/d8dd16ed-5ed8-44c6-8eb7-9a6087d01df6.png)
    MA

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

      Hi and welcome to devnet,

      Please add:

      • the version of Qt you are using
      • the OS you are running

      Also, can you provide a minimal compilable example that reproduces that behaviour ?

      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
      0
      • P Offline
        P Offline
        PandaGS
        wrote on last edited by
        #3

        Hello SGaist,

        Thank you for the reply. I am using Windows 10 Home edition with Qt 5.12.4.
        The problem is only in windows, I tried linux and macos and both work as intended.
        I tried to do a minimal compilable example that reproduces the behaviour but i couldn't, the full screen does not prevent the menubar to show the contents for a simple example.
        I don't know if the status bar or some of the actions related to it are interfering with the menu bar but that is my best guess. I don't have any other concrete thing or idea to check. I don't have anything that uses Qt::WindowStaysOnTopHint too.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          martinrais
          wrote on last edited by
          #4

          Hi. I am having the exact same issue, also in Windows 10 with Qt 5.12.2. Could you resolve it somehow? Do you know if future versions have worked this out?

          B 1 Reply Last reply
          0
          • M martinrais

            Hi. I am having the exact same issue, also in Windows 10 with Qt 5.12.2. Could you resolve it somehow? Do you know if future versions have worked this out?

            B Offline
            B Offline
            Bonnie
            wrote on last edited by
            #5

            @martinrais Are you using an opengl based window?
            Maybe it is related to Fullscreen OpenGL Based Windows

            1 Reply Last reply
            0
            • H Offline
              H Offline
              H.Mahmoodi
              wrote on last edited by
              #6

              Same problem here with QPushButton's menu.
              Qt 5.14.1, Mingw, Windows 10, Windows 11.

              and some interest thing is that when I use an application to record my screen, it's showing the menu!!!!!! (checked the video of screen), but I can't see when interacting :|

              1 Reply Last reply
              0

              • Login

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