I am making a browser in windows with qwebview .In window vista+7+8 its showing the language correctly but in windows xp its not abe to show some websites http://www.goolgule.com/ [goolgule.com] . When i copied some fonts in windows/fonts folder firefox works correcty but not browser with qt even i tried
Qupzilla“link”:www.qupzilla.com/
Qtweb Your text to link here… [qtweb.net]
I don’t know its problem of qtwebkit or i am missing something.
this are some code :
QWebSettings *defaultSettings = QWebSettings::globalSettings();
QString standardFontFamily = defaultSettings->fontFamily(QWebSettings::StandardFont);
int standardFontSize = defaultSettings->fontSize(QWebSettings::DefaultFontSize) +;
QFont standardFont = QFont(standardFontFamily, standardFontSize);
standardFont = (settings.value(QLatin1String("standardFont"), standardFont)).value<QFont>();
defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
QString fixedFontFamily = defaultSettings->fontFamily(QWebSettings::FixedFont);
int fixedFontSize = defaultSettings->fontSize(QWebSettings::DefaultFixedFontSize);
QFont fixedFont = QFont(fixedFontFamily, fixedFontSize);
fixedFont = (settings.value(QLatin1String("fixedFont"), fixedFont)).value<QFont>();
defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());
bool zoom_text_only = settings.value(QLatin1String("zoom_text_only"), false).toBool();
defaultSettings->setAttribute(QWebSettings::ZoomTextOnly, zoom_text_only);
defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, settings.value(QLatin1String("enableJavascript"), true).toBool());
defaultSettings->setAttribute(QWebSettings::JavascriptCanOpenWindows, ! (settings.value(QLatin1String("blockPopups"), true).toBool()));
defaultSettings->setAttribute(QWebSettings::JavaEnabled, settings.value("allowJava", true).toBool());
defaultSettings->setAttribute(QWebSettings::DnsPrefetchEnabled, settings.value("DNS-Prefetch", false).toBool());
defaultSettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, settings.value("allowJavaScriptAccessClipboard", true).toBool());
defaultSettings->setAttribute(QWebSettings::LinksIncludedInFocusChain, settings.value("IncludeLinkInFocusChain", false).toBool());
defaultSettings->setAttribute(QWebSettings::ZoomTextOnly, settings.value("zoomTextOnly", false).toBool());
defaultSettings->setAttribute(QWebSettings::PrintElementBackgrounds, settings.value("PrintElementBackground", true).toBool());
defaultSettings->setAttribute(QWebSettings::XSSAuditingEnabled, settings.value("XSSAuditing", false).toBool());
defaultSettings->setAttribute(QWebSettings::PluginsEnabled, settings.value(QLatin1String("enablePlugins"), true).toBool());
defaultSettings->setAttribute(QWebSettings::AutoLoadImages, settings.value(QLatin1String("autoLoadImages"), true).toBool());
bool enable_local_storage = settings.value(QLatin1String("enableLocalStorage"), false).toBool();
defaultSettings->setAttribute(QWebSettings::LocalStorageEnabled, enable_local_storage);
defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, enable_local_storage);
defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, enable_local_storage);
QLatin1String localStoragePath ;
defaultSettings->setLocalStoragePath(localStoragePath);
defaultSettings->setOfflineStoragePath(localStoragePath);
defaultSettings->setOfflineWebApplicationCachePath(localStoragePath);
defaultSettings->setIconDatabasePath(dataLocation());
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled,true);
QWebSettings::globalSettings()->setWebGraphic(QWebSettings::MissingImageGraphic, QPixmap());
Qt version 4.8.1+mingw, i also tried 5.0.1+mvc and 5.1+mingw
thanks
↧