Unsolved how to solve the full screen problem
-
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 pictureAnd 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! -
Hi,
Are you using the Qt version coming with your distribution ?
-
@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? -
@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?
-
@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?
-
@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? -
@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
-
@jsulm
What is your mean about "What is your target device" ? -
@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. -
@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. -
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 ? -
@SGaist
The board i used is freescale IMX6 for my CPU.
The board name is fa34.
Winmate is the manufacturer. -
Just remove Status bar from Ui and you will get full screen.