Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Fullscreen mode is not working properly with deployed .exe app
Qt 6.12 LTS is out! See what's new in the release blog

Fullscreen mode is not working properly with deployed .exe app

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 4 Posters 5.7k 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.
  • C Offline
    C Offline
    CroCo
    wrote on last edited by CroCo
    #1

    I have very simple app in which there are two buttons and one edit line. These buttons have images as background. The main window also has an image as its background with a shortcut to allow the user to change the background. The app must run in fullscreen mode. The code works just fine but when I run the code (i.e. standalone or shipped with Dlls) in another PC, the fullscreen mode destroys the GUI. This is a snapshot from the problem.

    0_1508191995745_123.png

    while if I run the same code in the machine that generates this app, the result is

    0_1508192008705_14.png

    The functionality of the app works in the other machine, I've tested with the shortcut to change the background. Changing the image background while the app runs works fine, really weird.

    This is part of the code

    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
        this->setWindowState(Qt::WindowFullScreen);
    }
    

    For the MainWindow, this is the stylesheet

    QWidget#MainWindow{
    border-image: url("123.PNG")
    }
    

    And this is the form design with Qt Creator.

    0_1508277160161_456.PNG

    What may cause this kind of behavior and what is the suggested solution(s)? I'm using Qt 5.9 and tried Qt 5.8, in Windows 10. I'm using Visual studio 2015 and 2013 in the other PC.

    1 Reply Last reply
    0
    • hskoglundH Online
      hskoglundH Online
      hskoglund
      wrote on last edited by
      #2

      Hi, just guessing but it might be due to some differences in the graphics cards or their drivers. Do your 2 PCs have the same graphics card? If not, try to update the graphics drivers on the failing one...

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CroCo
        wrote on last edited by
        #3

        @hskoglund
        While the graphics cards are indeed different, I don't think this is the issue. I've run it in several PCs other than mine with the same problem. I suspect the fullscreen mode functionality but I'm not sure.

        jsulmJ 1 Reply Last reply
        0
        • C CroCo

          @hskoglund
          While the graphics cards are indeed different, I don't think this is the issue. I've run it in several PCs other than mine with the same problem. I suspect the fullscreen mode functionality but I'm not sure.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @CroCo Do you use layouts to position the widgets?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          C 1 Reply Last reply
          0
          • Vinod KuntojiV Offline
            Vinod KuntojiV Offline
            Vinod Kuntoji
            wrote on last edited by
            #5

            @CroCo ,

            I thinks, you have missed to add imageformats dll's.

            C++, Qt, Qt Quick Developer,
            PthinkS, Bangalore

            C 1 Reply Last reply
            0
            • jsulmJ jsulm

              @CroCo Do you use layouts to position the widgets?

              C Offline
              C Offline
              CroCo
              wrote on last edited by CroCo
              #6

              @jsulm yes indeed. But I also set a grid layout on the background so that the contents will not be destroyed in case resizing the window. The code works perfect but the deployed app is not working. See the update for the actual form.

              1 Reply Last reply
              0
              • Vinod KuntojiV Vinod Kuntoji

                @CroCo ,

                I thinks, you have missed to add imageformats dll's.

                C Offline
                C Offline
                CroCo
                wrote on last edited by
                #7

                @Vinod-Kuntoji what do you mean?

                1 Reply Last reply
                0
                • Vinod KuntojiV Offline
                  Vinod KuntojiV Offline
                  Vinod Kuntoji
                  wrote on last edited by
                  #8

                  @CroCo ,
                  In non Qt systems, If you want to run your project, you should provide required imageformats dlls.

                  C++, Qt, Qt Quick Developer,
                  PthinkS, Bangalore

                  C 1 Reply Last reply
                  0
                  • Vinod KuntojiV Vinod Kuntoji

                    @CroCo ,
                    In non Qt systems, If you want to run your project, you should provide required imageformats dlls.

                    C Offline
                    C Offline
                    CroCo
                    wrote on last edited by CroCo
                    #9

                    @Vinod-Kuntoji interesting. Can you provide more info regarding which dlls I need to ship the deployed app with and where can I find them? Also, is there any option(s) to tell the qmake to add these dlls in case building standalone apps? Thank you.

                    1 Reply Last reply
                    0
                    • Vinod KuntojiV Offline
                      Vinod KuntojiV Offline
                      Vinod Kuntoji
                      wrote on last edited by Vinod Kuntoji
                      #10

                      @CroCo

                      Copy the imageformats folder and put it in your executable folder.
                      C:\Qt\Qt5.7.0\5.7\msvc2013_64\plugins\imageformats

                      C++, Qt, Qt Quick Developer,
                      PthinkS, Bangalore

                      C 1 Reply Last reply
                      0
                      • Vinod KuntojiV Vinod Kuntoji

                        @CroCo

                        Copy the imageformats folder and put it in your executable folder.
                        C:\Qt\Qt5.7.0\5.7\msvc2013_64\plugins\imageformats

                        C Offline
                        C Offline
                        CroCo
                        wrote on last edited by
                        #11

                        @Vinod-Kuntoji I've placed all the dlls but no luck. I'm using .png format though.

                        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
                        • Unsolved