I want to create a program that loads google in literally full screen, so I achieved opening my qt program in full screen using w.showFullScreen();
and it works perfectly, however when I add the QWebView
and set it to centralWidget
like this:
but when I run the program, I get some margins on the sides of the window, in other words the QWebView
isn't literally in fullScreen harmoniously with the window which is, it looks like this:
I don't think my code is mistaken but here it is untitled.pro:
#-------------------------------------------------
#
# Project created by QtCreator 2015-02-07T21:25:42
#
#-------------------------------------------------
CONFIG += release
QT += core gui
QT += webkitwidgets
main.cpp
w.showFullScreen();
mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtWebKitWidgets>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->webView->load(QUrl("http://www.google.com"));
}
MainWindow::~MainWindow()
{
delete ui;
}
Thank you.