Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Qt for WebAssembly Checkboxes and Comboboxes displayed wrong
Qt 6.12 LTS is out! See what's new in the release blog

Qt for WebAssembly Checkboxes and Comboboxes displayed wrong

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 699 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonas Ritz
    wrote on last edited by
    #1

    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;
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved