WebEngine Widgets Simple Browser Example▲
Sélectionnez
&
lt;?xml version=
"1.0"
encoding=
"UTF-8"
?&
gt;
&
lt;ui version=
"4.0"
&
gt;
&
lt;class
&
gt;DownloadWidget&
lt;/
class
&
gt;
&
lt;widget class
=
"QFrame"
name=
"DownloadWidget"
&
gt;
&
lt;property name=
"styleSheet"
&
gt;
&
lt;string notr=
"true"
&
gt;#DownloadWidget {
background
:
palette(button);
border
:
1
px solid palette(dark);
margin
:
0
px;
}&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;layout class
=
"QGridLayout"
name=
"m_topLevelLayout"
&
gt;
&
lt;property name=
"sizeConstraint"
&
gt;
&
lt;enum
&
gt;QLayout::
SetMinAndMaxSize&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;item row=
"0"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"m_dstName"
&
gt;
&
lt;property name=
"styleSheet"
&
gt;
&
lt;string notr=
"true"
&
gt;font-
weight: bold
&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;TextLabel&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"0"
column=
"1"
&
gt;
&
lt;widget class
=
"QPushButton"
name=
"m_cancelButton"
&
gt;
&
lt;property name=
"sizePolicy"
&
gt;
&
lt;sizepolicy hsizetype=
"Fixed"
vsizetype=
"Fixed"
/&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"styleSheet"
&
gt;
&
lt;string notr=
"true"
&
gt;QPushButton {
margin
:
1
px;
border
:
none;
}
QPushButton
:
pressed {
margin
:
none;
border
:
1
px solid palette(shadow);
background
:
palette(midlight);
}&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"flat"
&
gt;
&
lt;bool
&
gt;false
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"1"
column=
"0"
colspan=
"2"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"m_srcUrl"
&
gt;
&
lt;property name=
"maximumSize"
&
gt;
&
lt;size&
gt;
&
lt;width&
gt;350
&
lt;/
width&
gt;
&
lt;height&
gt;16777215
&
lt;/
height&
gt;
&
lt;/
size&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"styleSheet"
&
gt;
&
lt;string notr=
"true"
/&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;TextLabel&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"2"
column=
"0"
colspan=
"2"
&
gt;
&
lt;widget class
=
"QProgressBar"
name=
"m_progressBar"
&
gt;
&
lt;property name=
"styleSheet"
&
gt;
&
lt;string notr=
"true"
&
gt;font-
size: 12
px&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"value"
&
gt;
&
lt;number&
gt;24
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;/
widget&
gt;
&
lt;resources&
gt;
&
lt;include location=
"data/simplebrowser.qrc"
/&
gt;
&
lt;/
resources&
gt;
&
lt;connections/&
gt;
&
lt;/
ui&
gt;