Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Qt for WebAssembly Checkboxes and Comboboxes displayed wrong
Forum Updated to NodeBB v4.3 + New Features

Qt for WebAssembly Checkboxes and Comboboxes displayed wrong

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 334 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 23 Feb 2021, 14:33 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

    1/1

    23 Feb 2021, 14:33

    • Login

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