Hello,
We using QT in our Touchscreen displays for machine controls. This HMI is communicating with a IPC. This IPC has a webserver to access information of the IPC.
In this HMI i use the QwebView to show this webserver on the HMI.
by using this code:
( the webserver is at http://192.168.10.30)
//connections
connect(m_ui->webView,SIGNAL(loadStarted()),this,SLOT(pageLoadi ng()));
connect(m_ui->webView,SIGNAL(loadFinished(bool)),this,SLOT(page LoadFinished(bool)));
connect(m_ui->webView,SIGNAL(loadProgress(int)),m_ui->progressBar,SLOT(setValue(int)));
QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalContentCanAccessR emoteUrls, true);
m_ui->webView->load(QUrl("http://192.168.10.30"));
m_ui->keyboardFrame->setVisible(false);
m_ui->webView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwa ysOff);
m_ui->webView->setZoomFactor(1.0);
when i replace the ip address by http://google.com then everything works fine.
When i use the http://192.168.10.30 then i got the message:
Access denied.
Client does not have
access to the resourse
on the server
if i access the webserver with an ordinairy brouwser every thing worksfine.
What can be the reason of this error?
Regards
Patrick
Bookmarks