I have created a minimal WebAssembly sample in which when you click on a button, it opens a QInputDialog. This works very nicely, as long as the application is in fullscreen mode. In my case, the CANVAS element is defined as
Blah blah blah
<DIV style="width: 81%; height: 61%">
<CANVAS id="qtcavas" oncontextmenu="event.preventDefaul()" contenteditable="true"></CANVAS>
Some points to mention:
- I tired to embed it into IFRAME, but was not successful
- there is a warning of no padding or border on canvas since it could mess up mouse coors. I assume this does not apply for this issue since mouse coords are wrong, only frame of the dialog is painted twice
- the dialog frame offset seems to be equal of the canvas offset from the browser's 0,0 point
- the dialog itsel is movable if one drags the area above the content. In this case the 2 parts of the dialogs are moving, but they are maintaining the original offset distance from each other.
I did search for documentation, but was unlucky. If there is a known workaround or WASM should not be embedded this way, feel free to correct.