title: QWebInspector not working correctly
body: <p>I have included the QWebInspector in my QT project and try to use it in my code (not entirly sure how as I am still quite new to QT) I get a blank Web Inspector screen so I think the page() is returning null? Where am I going wrong or is this only for HTML5 applications?</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include &lt;QtGui&gt;
  #include &lt;QSsl&gt;
  #include &lt;QSslError&gt;
  #include &lt;QNetworkReply&gt;
  #include &lt;QtDebug&gt;
  #include &lt;QWebInspector&gt;
  #include &lt;QGraphicsWebView&gt;
  #include &lt;QMessageBox&gt;
  #include "Windows.h"
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      //this-&gt;setGeometry(50,50, 1280, 768);
      setWindowState(Qt::WindowMaximized);
      //MainWindow::showMaximized();
      this-&gt;centralWidget()-&gt;setLayout(new QGridLayout);
      m_pWebView = new QWebView(this);
  
      //Detect any SSL errors from the network reply
      connect(m_pWebView-&gt;page()-&gt;networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList&lt;QSslError&gt; &amp; )),
                      this, SLOT(onSslErrors(QNetworkReply*, const QList&lt;QSslError&gt; &amp; )));
  
      this-&gt;centralWidget()-&gt;layout()-&gt;addWidget(m_pWebView);
      //set position and size
      m_pWebView-&gt;load(QUrl("https://csm.nathan"));
  
  
  
  
      //m_pWebView-&gt;show();
  
      QMenu *trayIconMenu;
         minimizeAction = new QAction("Minimize", this);
         restoreAction = new QAction("Restore", this);
         quitAction = new QAction("Exit", this);
  
         connect (minimizeAction, SIGNAL(triggered()), this, SLOT(hide()));
         connect (restoreAction, SIGNAL(triggered()),this,SLOT(showMaximized()));
         connect (quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
         trayIconMenu = new QMenu(this);
         trayIconMenu-&gt;addAction (minimizeAction);
         trayIconMenu-&gt;addAction (restoreAction);
         trayIconMenu-&gt;addAction (quitAction);
         QSystemTrayIcon* systray = new QSystemTrayIcon(this);
         //connect(systray, SIGNAL(messageClicked()), this, SLOT(messageClicked()));
         QIcon icon("csm-logo.png");
         systray-&gt;setIcon(icon);
         systray-&gt;setContextMenu (trayIconMenu);
         systray-&gt;show();
         if(systray-&gt;isVisible()){
             systray-&gt;showMessage("CytoViewer v1.0", "The CytoViewer has been started!", QSystemTrayIcon::NoIcon, 10000);
  
             //QMessageBox msgBox;
             //msgBox.setWindowTitle("HELP");
             //msgBox.setInformativeText(m_pWebView-&gt;page());
             //msgBox.exec();
  
             //Enable developer extras in the webviewer settings
             m_pWebView-&gt;page()-&gt;settings()-&gt;setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
             //Instantiate QWebInspector
             QWebInspector inspector;
  
             inspector.setPage(m_pWebView-&gt;page());
  
             inspector.setVisible(false);
         }
  
  }
  
  void MainWindow::onSslErrors(QNetworkReply* reply, const QList&lt;QSslError&gt; &amp;errors)
  {
      qDebug() &lt;&lt; "handleSslErrors: ";
      foreach (QSslError e, errors)
      {
          qDebug() &lt;&lt; "ssl error: " &lt;&lt; e;
      }
      //Suppress any SSL errors
      reply-&gt;ignoreSslErrors();
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  
  
  void MainWindow::closeEvent(QCloseEvent *event)
  {
          QMessageBox::information(this, tr("Systray"),
                                   tr("The program will keep running in the "
                                      "system tray. To terminate the program, "
                                      "choose &lt;b&gt;Exit&lt;/b&gt; in the context menu "
                                      "of the system tray entry."));
          hide();
          event-&gt;ignore();
  }
  
  void MainWindow::messageClicked()
   {
      QMessageBox::information(0, "CytoViewer Message", "You're application is up and running!");
   }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/dRhfm.png" alt="Web Inspector shows blank screen"></p>