diff options
Diffstat (limited to 'DOCS/client_api_examples/qtexample.cpp')
-rw-r--r-- | DOCS/client_api_examples/qtexample.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qtexample.cpp b/DOCS/client_api_examples/qtexample.cpp index 2740bd9f67..5ebc788c64 100644 --- a/DOCS/client_api_examples/qtexample.cpp +++ b/DOCS/client_api_examples/qtexample.cpp @@ -2,6 +2,7 @@ // This example can be built with: qmake && make +#include <clocale> #include <sstream> #include <QFileDialog> @@ -152,6 +153,11 @@ MainWindow::~MainWindow() int main(int argc, char *argv[]) { QApplication a(argc, argv); + + // Qt sets the locale in the QApplication constructor, but libmpv requires + // the LC_NUMERIC category to be set to "C", so change it back. + std::setlocale(LC_NUMERIC, "C"); + MainWindow w; w.show(); |