QWebView::icon()
-
Hello everyone,
I'm having a really annoying issue today, it just looks like Qt cannot find the favicon of web pages.. or I just messed up somewhere.
Here's the I/O code:@connect(test,SIGNAL(titleChanged(QString)),this,SLOT(reftit(QString)));@
And the slot code:
@void Mainwin::reftit(QString title)
{
if(title.size() >= 20)
{
title.remove(17,9000);
title += "...";
}
m_tabs->setTabIcon(m_tabs->currentIndex(),m_tabs->currentWidget()->findChild<QWebView*>()->icon());
m_tabs->setTabText(m_tabs->currentIndex(),title);
}@It just keeps the default icon everytime even with plenty of tabs so I know its not an index error.
Can anyone help me out there? -
i'm not sure if it helps, but according to the "docs":http://qt-project.org/doc/qt-4.8/qwebview.html#iconChanged you may need to use QWebSettings::setIconDatabasePath()