serial number |
function |
Return value description |
1 |
name() |
Provides the class name of the plugin |
2 |
group() |
The widget box of Qt Designer in the group to which the control belongs |
3 |
toolTip() |
A short description to help users identify the components in Qt Designer |
4 |
whatsThis () |
A longer description of components designed for Qt Designer users |
5 |
includeFile() |
The header file must be included in the application that uses the plug-in. This information is stored in the UI file, and appropriate #includes statements will be created by UIC to include code in the form of custom plug-ins. |
6 |
icon() |
The icon of the small window in the plug-in box of Qt Designer |
7 |
isContainer() |
true means the component will be used to save the sub-component, otherwise it is false |
8
9
10 |
createWidget()
domXml ()
codeTemplate() |
An instance of a QWidget pointer to a custom widget, constructing the provided parent. Note: createWidget() is a factory method, which is only responsible for the function of creating widgets. The properties of the custom widget will not be available until load() returns.
Describes the attributes of the widget, such as object name, size hint, and other standard QWidget attribute descriptions.
This function is reserved for future use by Qt Designer |
serial number |
function |
Return value description |
11 |
initialize() |
Set up custom widget extensions and other functions. Custom container extension (see QDesignerContainerExtension ) and task menu extension (see QDesignerTaskMenuExtension ) should be set in this function. |
12 |
isInitialized() |
If the component has been initialized, it returns true; otherwise, it returns false. The reimplementation usually checks whether the initialize() function has been called and returns the result of this test. |
|
...
" \n"
" \n"
" 0\n"
" 0\n"
" 100\n"
" 100\n"
" \n"
" \n"
...
displayname="MyWidget">
widgets::MyWidget
addPage
Attributes | Presentation form | value | content |
---|---|---|---|
language |
Optional | "c++", "jambi" |
This attribute specifies the language provided by the custom widget. It mainly prevents C++ plug-ins from appearing in Qt Jambi. |
displayname |
Optional | Class name | The value of the attribute will appear in the widget box and can be used to strip the namespace. |
Attributes | Presentation form | value | content |
---|---|---|---|
name |
necessary | The name of the attribute | |
type |
have to | See the table below | The value of this attribute determines how the attribute editor will handle them. |
notr |
Optional | "true", "false" |
如果属性是“true”,则该值意味着不再被翻译。 |
值 | 类型 |
---|---|
"richtext" |
富文本 |
"multiline" |
多行纯文本 |
"singleline" |
单行纯文本 |
"stylesheet" |
一个CSS样式表 |
"objectname" |
对象名称(受限制的一组有效字符) |
"url" |
URL、文件名. |