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. how to solve the full screen problem

how to solve the full screen problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 4 Posters 4.9k Views 1 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.
  • V Offline
    V Offline
    victor wang
    wrote on last edited by victor wang
    #1

    Hi, i'm using qt5.5 on my computer and is based on the Ubuntu14.04 for my OS system and compile on it.
    I will execute the execution on the other OS system which is QT.

    The issue is here.
    I wanna show the mainwindow on my whole screen.
    This is my code for main.cpp now.

    #include <QtGui/QApplicationStateChangeEvent>
    #include <QApplication>
    #include <QScreen>
    #include "qscreen.h"
    #include <QRect>
    #include "mainwindow.h"
    //QT_USE_NAMESPACE_SERIALPORT
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        //w.showMaximized();
       // w.showFullScreen();
        QScreen *screen =QGuiApplication::primaryScreen();
        QRect screenGeometry = screen->geometry();
        int height1 = screenGeometry.height();
        int width1 = screenGeometry.width();
        w.resize(width1,height1);
        w.show();
        //w.showNormal();
        return a.exec();
    }
    

    And i will show the full screen pushbotton like this in my mainwindow.cpp.

    void MainWindow::on_pushButtonPT_PanelTest_clicked()
    {
        QScreen *screen =QGuiApplication::primaryScreen();
        QRect screenGeometry = screen->geometry();
        height = screenGeometry.height();
        width = screenGeometry.width();
        ui->stackedWidget->setCurrentWidget(ui->stackedWidgetPagePanel);
        ui->pushButtonPanelBackgroundColor->resize(width,height);
        qDebug()<<width;
        qDebug()<<height;
        connect(panel,SIGNAL(PT_End()),this,SLOT(PT_PanelTestEnd()));
    
        panel->PT_Start(ui->pushButtonPanelBackgroundColor);
    }
    

    when it show it out to my screen will not in the full screen like below link.
    result picture

    And if i change the program like below in the main.cpp.

    #include <QtGui/QApplicationStateChangeEvent>
    #include <QApplication>
    #include <QScreen>
    #include "qscreen.h"
    #include <QRect>
    #include "mainwindow.h"
    //QT_USE_NAMESPACE_SERIALPORT
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.showFullScreen();
    
        return a.exec();
    }
    

    Then it will show like this link.
    result picture
    There is a white line!

    But my code for the first version that i post is working correctly on the other computer which is based on Debian for the OS system.

    Is that the problem of the OS system?
    Or it's me missing something?
    Please help!

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

      Hi,

      Are you using the Qt version coming with your distribution ?

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

      V 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you using the Qt version coming with your distribution ?

        V Offline
        V Offline
        victor wang
        wrote on last edited by
        #3

        @SGaist
        Sorry, what did that mean?
        i install qt myself and the version it show is 5.5.
        Or did u mean the OS system?

        jsulmJ 1 Reply Last reply
        0
        • V victor wang

          @SGaist
          Sorry, what did that mean?
          i install qt myself and the version it show is 5.5.
          Or did u mean the OS system?

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

          @victor-wang What @SGaist means is: did you install Qt that is provided by your Linux distribution or did you download Qt by yourself (from Qt web site)? Some distributions (like Ubuntu) add some modifications to Qt to better integrate it into their environment. Why Qt 5.5 and not a more recent version?

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

          V 1 Reply Last reply
          0
          • jsulmJ jsulm

            @victor-wang What @SGaist means is: did you install Qt that is provided by your Linux distribution or did you download Qt by yourself (from Qt web site)? Some distributions (like Ubuntu) add some modifications to Qt to better integrate it into their environment. Why Qt 5.5 and not a more recent version?

            V Offline
            V Offline
            victor wang
            wrote on last edited by victor wang
            #5

            @jsulm
            I refer to this link and execute "sudo apt-get install qtcreator" in the developing host and fill the standalone compiler directory to the fields.

            When i install qt creator i had just choose to install qt5.5.

            Is that any problem?

            jsulmJ 1 Reply Last reply
            0
            • V victor wang

              @jsulm
              I refer to this link and execute "sudo apt-get install qtcreator" in the developing host and fill the standalone compiler directory to the fields.

              When i install qt creator i had just choose to install qt5.5.

              Is that any problem?

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

              @victor-wang
              So, it looks like you're using Qt provided by your Linux distribution on the development machine.
              "I will execute the execution on the other OS system which is QT" - Qt is not an OS :-)
              What is your target device?
              What OS is running on your target device?
              How did you install Qt on the target machine?
              How do you deploy your app to the target machine?

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

              V 2 Replies Last reply
              0
              • jsulmJ jsulm

                @victor-wang
                So, it looks like you're using Qt provided by your Linux distribution on the development machine.
                "I will execute the execution on the other OS system which is QT" - Qt is not an OS :-)
                What is your target device?
                What OS is running on your target device?
                How did you install Qt on the target machine?
                How do you deploy your app to the target machine?

                V Offline
                V Offline
                victor wang
                wrote on last edited by victor wang
                #7

                @jsulm
                1.This link
                2.weston
                3.linux
                4.i refer to the link which i post on the first answer and and execute "sudo apt-get install qtcreator" in the developing host and fill the standalone compiler directory to the fields.
                5.I will compile it on the developing host computer which is Ubuntu 14.04.
                And i will copy the execute file to the target machine and using this commend to execute it.

                ./qt_app -platform wayland
                
                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @victor-wang
                  So, it looks like you're using Qt provided by your Linux distribution on the development machine.
                  "I will execute the execution on the other OS system which is QT" - Qt is not an OS :-)
                  What is your target device?
                  What OS is running on your target device?
                  How did you install Qt on the target machine?
                  How do you deploy your app to the target machine?

                  V Offline
                  V Offline
                  victor wang
                  wrote on last edited by
                  #8

                  @jsulm
                  What is your mean about "What is your target device" ?

                  jsulmJ 1 Reply Last reply
                  0
                  • V victor wang

                    @jsulm
                    What is your mean about "What is your target device" ?

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

                    @victor-wang said in how to solve the full screen problem:

                    What is your mean about "What is your target device" ?

                    Well, what is the device where you execute your app?
                    How did you install Qt there?
                    "linux" - there are many Linux distributions out there, could be helpful to know what Linux exactly is running on your target device.

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

                    V 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @victor-wang said in how to solve the full screen problem:

                      What is your mean about "What is your target device" ?

                      Well, what is the device where you execute your app?
                      How did you install Qt there?
                      "linux" - there are many Linux distributions out there, could be helpful to know what Linux exactly is running on your target device.

                      V Offline
                      V Offline
                      victor wang
                      wrote on last edited by victor wang
                      #10

                      @jsulm
                      "Well, what is the device where you execute your app?"
                      It's linux_weston.

                      I did not install qt on the linux_weston.
                      my target device is linux_weston
                      And where i compile my app is on the developing host computer linux_Ubuntu.

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

                        That's not a device, at best it tells us that your are running a Linux distribution that provides the weston compositor.

                        What is the board name ?
                        What is the name of the distribution that is running on it ?
                        Who's the manufacturer of the board ?

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

                        V 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          That's not a device, at best it tells us that your are running a Linux distribution that provides the weston compositor.

                          What is the board name ?
                          What is the name of the distribution that is running on it ?
                          Who's the manufacturer of the board ?

                          V Offline
                          V Offline
                          victor wang
                          wrote on last edited by victor wang
                          #12

                          @SGaist
                          The board i used is freescale IMX6 for my CPU.
                          The board name is fa34.
                          Winmate is the manufacturer.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            samy03
                            wrote on last edited by
                            #13

                            Just remove Status bar from Ui and you will get full screen.

                            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