[Qtwebengine] black screen when locale is set
Tassilo Glander
tgl at ivu.de
Fri Jun 17 08:53:06 CEST 2016
Dear List,
I get a black screen where the browser widget is supposed to be when I set the locale to German (de-DE, others also do not work). If I skip this setting, or if I set it to others (examples: en-US, en-GB, zh-CN), the web page renders as expected.
I build qt locally on Windows 7, Visual Studio2015 SP2, using the Windows 10 SDK and could reproduce the behavior in qt versions 5.5.1, 5.6.0 and dev, so I guess it occurs everywhere. However, I could not reproduce this with the precompiled version of Qt (official download, I used 5.6.1).
So I suspect it to be an issue of my build and would like to ask for opinions. Could it be about the specific Windows SDK? I configure with
configure -confirm-license -opensource -nomake examples -nomake tests -debug-and-release -force-debug-info -platform win32-msvc2015
Below you find a minimal example that reproduces the error.
Best,
Tassilo
#include "QMainWindow"
#include "QLabel"
#include "QWebEngineView"
#include "QApplication"
#include <locale>
int main(int argc, char *argv[])
{
// works
//std::locale loc("en-GB");
//std::locale loc("en-US");
//std::locale loc("en-NZ");
//std::locale loc("af-ZA");
//std::locale loc("zh-CN");
// if one of the following locales are set, black screen is shown instead of web page
std::locale loc("German_germany");
//std::locale loc("de-DE");
//std::locale loc("nl-NL");
//std::locale loc("cs-CZ");
//std::locale loc("es-ES");
//std::locale loc("vi");
std::locale::global(loc);
QApplication app(argc, argv);
QMainWindow* mainWindow = new QMainWindow();
QWebEngineView* webView = new QWebEngineView(mainWindow);
webView->setUrl(QUrl(QString("http://www.google.de")));
mainWindow->setCentralWidget(webView);
mainWindow->show();
return app.exec();
}
More information about the QtWebEngine
mailing list