WebEngine Qt Quick Custom Dialogs Example▲
Sélectionnez
&
lt;!
DOCTYPE html&
gt;
&
lt;html lang=
"en"
&
gt;
&
lt;head&
gt;
&
lt;meta charset=
"utf-8"
&
gt;
&
lt;title&
gt;Custom UI&
lt;/
title&
gt;
&
lt;link rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
&
gt;
&
lt;/
head&
gt;
&
lt;body&
gt;
&
lt;table align=
"center"
&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;div class
=
"div"
&
gt;&
lt;a href=
"#openMenu"
class
=
"link"
&
gt;Right click on text to see link context menu&
lt;/
a&
gt;&
lt;/
div&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"window.location = 'http://localhost.:5555/OPEN_AUTH'"
&
gt;
Open Authentication Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"window.location = 'http://localhost.:5555/OPEN_PROXY'"
&
gt;
Open Proxy Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"alert('This is the Alert Dialog !')"
&
gt;
Open Alert Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"confirm('This is the Confirm Dialog.')"
&
gt;
Open Confirm Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"prompt('Is this the Prompt Dialog ?', 'Yes')"
&
gt;
Open Prompt Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"document.getElementById('colorpicker').click()"
&
gt;
Open Color Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;tr&
gt;
&
lt;td&
gt;&
lt;button class
=
"button"
onclick=
"document.getElementById('filepicker').click()"
&
gt;
Open File Dialog&
lt;/
button&
gt;&
lt;/
td&
gt;
&
lt;/
tr&
gt;
&
lt;/
table&
gt;
&
lt;input type=
"color"
id=
"colorpicker"
value=
"#ff0000"
style=
"visibility:hidden"
/&
gt;
&
lt;input type=
"file"
id=
"filepicker"
accept=
".cpp, .html, .h, .png, .qdoc, .qml"
style=
"visibility:hidden"
/&
gt;
&
lt;/
body&
gt;
&
lt;/
html&
gt;