Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt for WebAssembly Checkboxes and Comboboxes displayed wrong



  • I coded a small application with QtQuick and QML to afterwards transpile it (in this case into a WebApplication) with Qt for Webassembly, which uses Emscripten internally.

    When opening it, the checkboxes, and ComboBoxes look like the following:
    6wMeB.png

    I assume it's a HighDPI error but i am not sure. I've already added

    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    

    to my code but this changed nothing. And I've already tried changing the size.

    QML Code:

    CheckBox {
       id : contour_box
       text: qsTr("Contour Lines")
       height : 30;
    }
    
    ComboBox {
       width : source.width/3.4;
       model: [ "200ms", "500ms", "1s", "2s", "5s", "10s", "20s"]
       currentIndex: 4;
    }
    

Log in to reply