From a457f5a6c30a2c5cca28956830e6f649cdeb9afd Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 19 Jul 2024 16:00:44 +0800
Subject: [PATCH 01/38] [Py] Update folder structure.

---
 Class-2/{Compress.PY => Compress}/README.md      |   0
 Class-2/{Compress.PY => Compress}/compress-7z.py |   0
 .../{Compress.PY => Compress}/compress-bz2.py    |   0
 Class-2/{Compress.PY => Compress}/compress-gz.py |   0
 .../{Compress.PY => Compress}/compress-tar.py    |   0
 Class-2/{Compress.PY => Compress}/compress-xz.py |   0
 .../{Compress.PY => Compress}/compress-zip.py    |   0
 Class-2/{Coroutine.PY => Coroutine}/README.md    |   0
 .../coroutine-async.py                           |   0
 .../coroutine-asyncio.py                         |   0
 .../coroutine-yield.py                           |   0
 Class-2/{Database.PY => Database}/README.md      |   0
 Class-2/{Database.PY => Database}/db-mongodb.py  |   0
 Class-2/{Database.PY => Database}/db-mysql.py    |   0
 Class-2/{Database.PY => Database}/db-sqlite3.py  |   0
 Class-2/{Email.PY => Email}/README.md            |   0
 Class-2/{Email.PY => Email}/email-imap.py        |   0
 Class-2/{Email.PY => Email}/email-pop3.py        |   0
 Class-2/{Email.PY => Email}/email-smtp.py        |   0
 Class-2/{Encryption.PY => Encryption}/README.md  |   0
 .../{Encryption.PY => Encryption}/encrypt-aes.py |   0
 .../{Encryption.PY => Encryption}/encrypt-des.py |   0
 .../{Encryption.PY => Encryption}/encrypt-md5.py |   0
 .../{Encryption.PY => Encryption}/encrypt-sha.py |   0
 Class-2/{FileIO.PY => FileIO}/README.md          |   0
 Class-2/{FileIO.PY => FileIO}/bytes-io.py        |   0
 Class-2/{FileIO.PY => FileIO}/file-directory.py  |   0
 Class-2/{FileIO.PY => FileIO}/file-pickling.py   |   0
 Class-2/{FileIO.PY => FileIO}/file-read.py       |   0
 Class-2/{FileIO.PY => FileIO}/file-write.py      |   0
 Class-2/{FileIO.PY => FileIO}/string-io.py       |   0
 Class-2/{FileIO.PY => FileIO}/testfile.txt       |   0
 Class-2/{Graphics.PY => Graphics}/README.md      |   0
 .../{Graphics.PY => Graphics}/graph-tkinter.py   |   0
 .../{Graphics.PY => Graphics}/graph-turtle.py    |   0
 Class-2/{Json.PY => Json}/README.md              |   0
 Class-2/{Json.PY => Json}/json-dumps.py          |   0
 Class-2/{Json.PY => Json}/json-loads.py          |   0
 Class-2/{Network.PY => Network}/README.md        |   0
 Class-2/{Network.PY => Network}/tcp_client.py    |   0
 Class-2/{Network.PY => Network}/tcp_server.py    |   0
 Class-2/{Network.PY => Network}/tcp_server2.py   |   0
 Class-2/{Network.PY => Network}/tcp_server3.py   |   0
 Class-2/{Network.PY => Network}/udp_client.py    |   0
 Class-2/{Network.PY => Network}/udp_server.py    |   0
 Class-2/{OpenCV.PY => OpenCV}/README.md          |   0
 Class-2/{OpenCV.PY => OpenCV}/cvbase-image.py    |   0
 Class-2/{OpenCV.PY => OpenCV}/cvbase-video.py    |   0
 Class-2/{Process.PY => Process}/README.md        |   0
 .../{Process.PY => Process}/daemon-mulproc.py    |   0
 Class-2/{Process.PY => Process}/daemon-unix.py   |   0
 Class-2/{Process.PY => Process}/process-lock.py  |   0
 .../{Process.PY => Process}/process-manager.py   |   0
 Class-2/{Process.PY => Process}/process-pipe.py  |   0
 Class-2/{Process.PY => Process}/process-pool.py  |   0
 Class-2/{Process.PY => Process}/process-queue.py |   0
 .../{Process.PY => Process}/process-subproc.py   |   0
 Class-2/{Process.PY => Process}/process-unix.py  |   0
 Class-2/{Process.PY => Process}/process.py       |   0
 Class-2/{QRCode.PY => QRCode}/README.md          |   0
 Class-2/{QRCode.PY => QRCode}/qr-read.py         |   0
 Class-2/{QRCode.PY => QRCode}/qr-simple.png      | Bin
 Class-2/{QRCode.PY => QRCode}/qr-write.py        |   0
 Class-2/README.md                                |   1 +
 Class-2/{Thread.PY => Thread}/README.md          |   0
 .../{Thread.PY => Thread}/daemon-threading.py    |   0
 .../{Thread.PY => Thread}/thread-condition.py    |   0
 Class-2/{Thread.PY => Thread}/thread-event.py    |   0
 Class-2/{Thread.PY => Thread}/thread-lock.py     |   0
 Class-2/{Thread.PY => Thread}/thread-pool.py     |   0
 Class-2/{Thread.PY => Thread}/thread-queue.py    |   0
 Class-2/{Thread.PY => Thread}/thread-rlock.py    |   0
 .../{Thread.PY => Thread}/thread-semaphore.py    |   0
 Class-2/{Thread.PY => Thread}/thread.py          |   0
 Class-2/{Timebase.PY => Timebase}/README.md      |   0
 .../{Timebase.PY => Timebase}/timebase-alarm.py  |   0
 .../{Timebase.PY => Timebase}/timebase-ntp.py    |   0
 .../{Timebase.PY => Timebase}/timebase-show.py   |   0
 Class-2/{Web.PY => Web}/README.md                |   0
 Class-2/{Web.PY => Web}/client-aiohttp.py        |   0
 Class-2/{Web.PY => Web}/client-get.py            |   0
 Class-2/{Web.PY => Web}/client-post.py           |   0
 Class-2/{Web.PY => Web}/server-aiohttp.py        |   0
 Class-2/{Web.PY => Web}/server-flask.py          |   0
 Class-2/{Web.PY => Web}/server-wsgi.py           |   0
 .../{Web.PY => Web}/templates/calculator.html    |   0
 Class-2/{XML.PY => XML}/README.md                |   0
 Class-2/{XML.PY => XML}/dom-decode.py            |   0
 Class-2/{XML.PY => XML}/dom-encode.py            |   0
 Class-2/{XML.PY => XML}/fruits.xml               |   0
 Class-2/{XML.PY => XML}/sax-decode.py            |   0
 Class-2/{XML.PY => XML}/sax-encode.py            |   0
 Class-3/{Openvino.PY => Openvino}/README.md      |   0
 .../image-classification-async.py                |   0
 .../image-classification.py                      |   0
 .../{Openvino.PY => Openvino}/image-ssd-v1.py    |   0
 .../{Openvino.PY => Openvino}/image-ssd-v2.py    |   0
 .../imagenet_classes.txt                         |   0
 Class-3/{Pytorch.PY => Pytorch}/README.md        |   0
 Class-3/{Pytorch.PY => Pytorch}/base-linear.py   |   0
 Class-3/README.md                                |   1 +
 README.md                                        |  15 +++++++++++++++
 102 files changed, 17 insertions(+)
 rename Class-2/{Compress.PY => Compress}/README.md (100%)
 rename Class-2/{Compress.PY => Compress}/compress-7z.py (100%)
 rename Class-2/{Compress.PY => Compress}/compress-bz2.py (100%)
 rename Class-2/{Compress.PY => Compress}/compress-gz.py (100%)
 rename Class-2/{Compress.PY => Compress}/compress-tar.py (100%)
 rename Class-2/{Compress.PY => Compress}/compress-xz.py (100%)
 rename Class-2/{Compress.PY => Compress}/compress-zip.py (100%)
 rename Class-2/{Coroutine.PY => Coroutine}/README.md (100%)
 rename Class-2/{Coroutine.PY => Coroutine}/coroutine-async.py (100%)
 rename Class-2/{Coroutine.PY => Coroutine}/coroutine-asyncio.py (100%)
 rename Class-2/{Coroutine.PY => Coroutine}/coroutine-yield.py (100%)
 rename Class-2/{Database.PY => Database}/README.md (100%)
 rename Class-2/{Database.PY => Database}/db-mongodb.py (100%)
 rename Class-2/{Database.PY => Database}/db-mysql.py (100%)
 rename Class-2/{Database.PY => Database}/db-sqlite3.py (100%)
 rename Class-2/{Email.PY => Email}/README.md (100%)
 rename Class-2/{Email.PY => Email}/email-imap.py (100%)
 rename Class-2/{Email.PY => Email}/email-pop3.py (100%)
 rename Class-2/{Email.PY => Email}/email-smtp.py (100%)
 rename Class-2/{Encryption.PY => Encryption}/README.md (100%)
 rename Class-2/{Encryption.PY => Encryption}/encrypt-aes.py (100%)
 rename Class-2/{Encryption.PY => Encryption}/encrypt-des.py (100%)
 rename Class-2/{Encryption.PY => Encryption}/encrypt-md5.py (100%)
 rename Class-2/{Encryption.PY => Encryption}/encrypt-sha.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/README.md (100%)
 rename Class-2/{FileIO.PY => FileIO}/bytes-io.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/file-directory.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/file-pickling.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/file-read.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/file-write.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/string-io.py (100%)
 rename Class-2/{FileIO.PY => FileIO}/testfile.txt (100%)
 rename Class-2/{Graphics.PY => Graphics}/README.md (100%)
 rename Class-2/{Graphics.PY => Graphics}/graph-tkinter.py (100%)
 rename Class-2/{Graphics.PY => Graphics}/graph-turtle.py (100%)
 rename Class-2/{Json.PY => Json}/README.md (100%)
 rename Class-2/{Json.PY => Json}/json-dumps.py (100%)
 rename Class-2/{Json.PY => Json}/json-loads.py (100%)
 rename Class-2/{Network.PY => Network}/README.md (100%)
 rename Class-2/{Network.PY => Network}/tcp_client.py (100%)
 rename Class-2/{Network.PY => Network}/tcp_server.py (100%)
 rename Class-2/{Network.PY => Network}/tcp_server2.py (100%)
 rename Class-2/{Network.PY => Network}/tcp_server3.py (100%)
 rename Class-2/{Network.PY => Network}/udp_client.py (100%)
 rename Class-2/{Network.PY => Network}/udp_server.py (100%)
 rename Class-2/{OpenCV.PY => OpenCV}/README.md (100%)
 rename Class-2/{OpenCV.PY => OpenCV}/cvbase-image.py (100%)
 rename Class-2/{OpenCV.PY => OpenCV}/cvbase-video.py (100%)
 rename Class-2/{Process.PY => Process}/README.md (100%)
 rename Class-2/{Process.PY => Process}/daemon-mulproc.py (100%)
 rename Class-2/{Process.PY => Process}/daemon-unix.py (100%)
 rename Class-2/{Process.PY => Process}/process-lock.py (100%)
 rename Class-2/{Process.PY => Process}/process-manager.py (100%)
 rename Class-2/{Process.PY => Process}/process-pipe.py (100%)
 rename Class-2/{Process.PY => Process}/process-pool.py (100%)
 rename Class-2/{Process.PY => Process}/process-queue.py (100%)
 rename Class-2/{Process.PY => Process}/process-subproc.py (100%)
 rename Class-2/{Process.PY => Process}/process-unix.py (100%)
 rename Class-2/{Process.PY => Process}/process.py (100%)
 rename Class-2/{QRCode.PY => QRCode}/README.md (100%)
 rename Class-2/{QRCode.PY => QRCode}/qr-read.py (100%)
 rename Class-2/{QRCode.PY => QRCode}/qr-simple.png (100%)
 rename Class-2/{QRCode.PY => QRCode}/qr-write.py (100%)
 rename Class-2/{Thread.PY => Thread}/README.md (100%)
 rename Class-2/{Thread.PY => Thread}/daemon-threading.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-condition.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-event.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-lock.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-pool.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-queue.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-rlock.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread-semaphore.py (100%)
 rename Class-2/{Thread.PY => Thread}/thread.py (100%)
 rename Class-2/{Timebase.PY => Timebase}/README.md (100%)
 rename Class-2/{Timebase.PY => Timebase}/timebase-alarm.py (100%)
 rename Class-2/{Timebase.PY => Timebase}/timebase-ntp.py (100%)
 rename Class-2/{Timebase.PY => Timebase}/timebase-show.py (100%)
 rename Class-2/{Web.PY => Web}/README.md (100%)
 rename Class-2/{Web.PY => Web}/client-aiohttp.py (100%)
 rename Class-2/{Web.PY => Web}/client-get.py (100%)
 rename Class-2/{Web.PY => Web}/client-post.py (100%)
 rename Class-2/{Web.PY => Web}/server-aiohttp.py (100%)
 rename Class-2/{Web.PY => Web}/server-flask.py (100%)
 rename Class-2/{Web.PY => Web}/server-wsgi.py (100%)
 rename Class-2/{Web.PY => Web}/templates/calculator.html (100%)
 rename Class-2/{XML.PY => XML}/README.md (100%)
 rename Class-2/{XML.PY => XML}/dom-decode.py (100%)
 rename Class-2/{XML.PY => XML}/dom-encode.py (100%)
 rename Class-2/{XML.PY => XML}/fruits.xml (100%)
 rename Class-2/{XML.PY => XML}/sax-decode.py (100%)
 rename Class-2/{XML.PY => XML}/sax-encode.py (100%)
 rename Class-3/{Openvino.PY => Openvino}/README.md (100%)
 rename Class-3/{Openvino.PY => Openvino}/image-classification-async.py (100%)
 rename Class-3/{Openvino.PY => Openvino}/image-classification.py (100%)
 rename Class-3/{Openvino.PY => Openvino}/image-ssd-v1.py (100%)
 rename Class-3/{Openvino.PY => Openvino}/image-ssd-v2.py (100%)
 rename Class-3/{Openvino.PY => Openvino}/imagenet_classes.txt (100%)
 rename Class-3/{Pytorch.PY => Pytorch}/README.md (100%)
 rename Class-3/{Pytorch.PY => Pytorch}/base-linear.py (100%)

diff --git a/Class-2/Compress.PY/README.md b/Class-2/Compress/README.md
similarity index 100%
rename from Class-2/Compress.PY/README.md
rename to Class-2/Compress/README.md
diff --git a/Class-2/Compress.PY/compress-7z.py b/Class-2/Compress/compress-7z.py
similarity index 100%
rename from Class-2/Compress.PY/compress-7z.py
rename to Class-2/Compress/compress-7z.py
diff --git a/Class-2/Compress.PY/compress-bz2.py b/Class-2/Compress/compress-bz2.py
similarity index 100%
rename from Class-2/Compress.PY/compress-bz2.py
rename to Class-2/Compress/compress-bz2.py
diff --git a/Class-2/Compress.PY/compress-gz.py b/Class-2/Compress/compress-gz.py
similarity index 100%
rename from Class-2/Compress.PY/compress-gz.py
rename to Class-2/Compress/compress-gz.py
diff --git a/Class-2/Compress.PY/compress-tar.py b/Class-2/Compress/compress-tar.py
similarity index 100%
rename from Class-2/Compress.PY/compress-tar.py
rename to Class-2/Compress/compress-tar.py
diff --git a/Class-2/Compress.PY/compress-xz.py b/Class-2/Compress/compress-xz.py
similarity index 100%
rename from Class-2/Compress.PY/compress-xz.py
rename to Class-2/Compress/compress-xz.py
diff --git a/Class-2/Compress.PY/compress-zip.py b/Class-2/Compress/compress-zip.py
similarity index 100%
rename from Class-2/Compress.PY/compress-zip.py
rename to Class-2/Compress/compress-zip.py
diff --git a/Class-2/Coroutine.PY/README.md b/Class-2/Coroutine/README.md
similarity index 100%
rename from Class-2/Coroutine.PY/README.md
rename to Class-2/Coroutine/README.md
diff --git a/Class-2/Coroutine.PY/coroutine-async.py b/Class-2/Coroutine/coroutine-async.py
similarity index 100%
rename from Class-2/Coroutine.PY/coroutine-async.py
rename to Class-2/Coroutine/coroutine-async.py
diff --git a/Class-2/Coroutine.PY/coroutine-asyncio.py b/Class-2/Coroutine/coroutine-asyncio.py
similarity index 100%
rename from Class-2/Coroutine.PY/coroutine-asyncio.py
rename to Class-2/Coroutine/coroutine-asyncio.py
diff --git a/Class-2/Coroutine.PY/coroutine-yield.py b/Class-2/Coroutine/coroutine-yield.py
similarity index 100%
rename from Class-2/Coroutine.PY/coroutine-yield.py
rename to Class-2/Coroutine/coroutine-yield.py
diff --git a/Class-2/Database.PY/README.md b/Class-2/Database/README.md
similarity index 100%
rename from Class-2/Database.PY/README.md
rename to Class-2/Database/README.md
diff --git a/Class-2/Database.PY/db-mongodb.py b/Class-2/Database/db-mongodb.py
similarity index 100%
rename from Class-2/Database.PY/db-mongodb.py
rename to Class-2/Database/db-mongodb.py
diff --git a/Class-2/Database.PY/db-mysql.py b/Class-2/Database/db-mysql.py
similarity index 100%
rename from Class-2/Database.PY/db-mysql.py
rename to Class-2/Database/db-mysql.py
diff --git a/Class-2/Database.PY/db-sqlite3.py b/Class-2/Database/db-sqlite3.py
similarity index 100%
rename from Class-2/Database.PY/db-sqlite3.py
rename to Class-2/Database/db-sqlite3.py
diff --git a/Class-2/Email.PY/README.md b/Class-2/Email/README.md
similarity index 100%
rename from Class-2/Email.PY/README.md
rename to Class-2/Email/README.md
diff --git a/Class-2/Email.PY/email-imap.py b/Class-2/Email/email-imap.py
similarity index 100%
rename from Class-2/Email.PY/email-imap.py
rename to Class-2/Email/email-imap.py
diff --git a/Class-2/Email.PY/email-pop3.py b/Class-2/Email/email-pop3.py
similarity index 100%
rename from Class-2/Email.PY/email-pop3.py
rename to Class-2/Email/email-pop3.py
diff --git a/Class-2/Email.PY/email-smtp.py b/Class-2/Email/email-smtp.py
similarity index 100%
rename from Class-2/Email.PY/email-smtp.py
rename to Class-2/Email/email-smtp.py
diff --git a/Class-2/Encryption.PY/README.md b/Class-2/Encryption/README.md
similarity index 100%
rename from Class-2/Encryption.PY/README.md
rename to Class-2/Encryption/README.md
diff --git a/Class-2/Encryption.PY/encrypt-aes.py b/Class-2/Encryption/encrypt-aes.py
similarity index 100%
rename from Class-2/Encryption.PY/encrypt-aes.py
rename to Class-2/Encryption/encrypt-aes.py
diff --git a/Class-2/Encryption.PY/encrypt-des.py b/Class-2/Encryption/encrypt-des.py
similarity index 100%
rename from Class-2/Encryption.PY/encrypt-des.py
rename to Class-2/Encryption/encrypt-des.py
diff --git a/Class-2/Encryption.PY/encrypt-md5.py b/Class-2/Encryption/encrypt-md5.py
similarity index 100%
rename from Class-2/Encryption.PY/encrypt-md5.py
rename to Class-2/Encryption/encrypt-md5.py
diff --git a/Class-2/Encryption.PY/encrypt-sha.py b/Class-2/Encryption/encrypt-sha.py
similarity index 100%
rename from Class-2/Encryption.PY/encrypt-sha.py
rename to Class-2/Encryption/encrypt-sha.py
diff --git a/Class-2/FileIO.PY/README.md b/Class-2/FileIO/README.md
similarity index 100%
rename from Class-2/FileIO.PY/README.md
rename to Class-2/FileIO/README.md
diff --git a/Class-2/FileIO.PY/bytes-io.py b/Class-2/FileIO/bytes-io.py
similarity index 100%
rename from Class-2/FileIO.PY/bytes-io.py
rename to Class-2/FileIO/bytes-io.py
diff --git a/Class-2/FileIO.PY/file-directory.py b/Class-2/FileIO/file-directory.py
similarity index 100%
rename from Class-2/FileIO.PY/file-directory.py
rename to Class-2/FileIO/file-directory.py
diff --git a/Class-2/FileIO.PY/file-pickling.py b/Class-2/FileIO/file-pickling.py
similarity index 100%
rename from Class-2/FileIO.PY/file-pickling.py
rename to Class-2/FileIO/file-pickling.py
diff --git a/Class-2/FileIO.PY/file-read.py b/Class-2/FileIO/file-read.py
similarity index 100%
rename from Class-2/FileIO.PY/file-read.py
rename to Class-2/FileIO/file-read.py
diff --git a/Class-2/FileIO.PY/file-write.py b/Class-2/FileIO/file-write.py
similarity index 100%
rename from Class-2/FileIO.PY/file-write.py
rename to Class-2/FileIO/file-write.py
diff --git a/Class-2/FileIO.PY/string-io.py b/Class-2/FileIO/string-io.py
similarity index 100%
rename from Class-2/FileIO.PY/string-io.py
rename to Class-2/FileIO/string-io.py
diff --git a/Class-2/FileIO.PY/testfile.txt b/Class-2/FileIO/testfile.txt
similarity index 100%
rename from Class-2/FileIO.PY/testfile.txt
rename to Class-2/FileIO/testfile.txt
diff --git a/Class-2/Graphics.PY/README.md b/Class-2/Graphics/README.md
similarity index 100%
rename from Class-2/Graphics.PY/README.md
rename to Class-2/Graphics/README.md
diff --git a/Class-2/Graphics.PY/graph-tkinter.py b/Class-2/Graphics/graph-tkinter.py
similarity index 100%
rename from Class-2/Graphics.PY/graph-tkinter.py
rename to Class-2/Graphics/graph-tkinter.py
diff --git a/Class-2/Graphics.PY/graph-turtle.py b/Class-2/Graphics/graph-turtle.py
similarity index 100%
rename from Class-2/Graphics.PY/graph-turtle.py
rename to Class-2/Graphics/graph-turtle.py
diff --git a/Class-2/Json.PY/README.md b/Class-2/Json/README.md
similarity index 100%
rename from Class-2/Json.PY/README.md
rename to Class-2/Json/README.md
diff --git a/Class-2/Json.PY/json-dumps.py b/Class-2/Json/json-dumps.py
similarity index 100%
rename from Class-2/Json.PY/json-dumps.py
rename to Class-2/Json/json-dumps.py
diff --git a/Class-2/Json.PY/json-loads.py b/Class-2/Json/json-loads.py
similarity index 100%
rename from Class-2/Json.PY/json-loads.py
rename to Class-2/Json/json-loads.py
diff --git a/Class-2/Network.PY/README.md b/Class-2/Network/README.md
similarity index 100%
rename from Class-2/Network.PY/README.md
rename to Class-2/Network/README.md
diff --git a/Class-2/Network.PY/tcp_client.py b/Class-2/Network/tcp_client.py
similarity index 100%
rename from Class-2/Network.PY/tcp_client.py
rename to Class-2/Network/tcp_client.py
diff --git a/Class-2/Network.PY/tcp_server.py b/Class-2/Network/tcp_server.py
similarity index 100%
rename from Class-2/Network.PY/tcp_server.py
rename to Class-2/Network/tcp_server.py
diff --git a/Class-2/Network.PY/tcp_server2.py b/Class-2/Network/tcp_server2.py
similarity index 100%
rename from Class-2/Network.PY/tcp_server2.py
rename to Class-2/Network/tcp_server2.py
diff --git a/Class-2/Network.PY/tcp_server3.py b/Class-2/Network/tcp_server3.py
similarity index 100%
rename from Class-2/Network.PY/tcp_server3.py
rename to Class-2/Network/tcp_server3.py
diff --git a/Class-2/Network.PY/udp_client.py b/Class-2/Network/udp_client.py
similarity index 100%
rename from Class-2/Network.PY/udp_client.py
rename to Class-2/Network/udp_client.py
diff --git a/Class-2/Network.PY/udp_server.py b/Class-2/Network/udp_server.py
similarity index 100%
rename from Class-2/Network.PY/udp_server.py
rename to Class-2/Network/udp_server.py
diff --git a/Class-2/OpenCV.PY/README.md b/Class-2/OpenCV/README.md
similarity index 100%
rename from Class-2/OpenCV.PY/README.md
rename to Class-2/OpenCV/README.md
diff --git a/Class-2/OpenCV.PY/cvbase-image.py b/Class-2/OpenCV/cvbase-image.py
similarity index 100%
rename from Class-2/OpenCV.PY/cvbase-image.py
rename to Class-2/OpenCV/cvbase-image.py
diff --git a/Class-2/OpenCV.PY/cvbase-video.py b/Class-2/OpenCV/cvbase-video.py
similarity index 100%
rename from Class-2/OpenCV.PY/cvbase-video.py
rename to Class-2/OpenCV/cvbase-video.py
diff --git a/Class-2/Process.PY/README.md b/Class-2/Process/README.md
similarity index 100%
rename from Class-2/Process.PY/README.md
rename to Class-2/Process/README.md
diff --git a/Class-2/Process.PY/daemon-mulproc.py b/Class-2/Process/daemon-mulproc.py
similarity index 100%
rename from Class-2/Process.PY/daemon-mulproc.py
rename to Class-2/Process/daemon-mulproc.py
diff --git a/Class-2/Process.PY/daemon-unix.py b/Class-2/Process/daemon-unix.py
similarity index 100%
rename from Class-2/Process.PY/daemon-unix.py
rename to Class-2/Process/daemon-unix.py
diff --git a/Class-2/Process.PY/process-lock.py b/Class-2/Process/process-lock.py
similarity index 100%
rename from Class-2/Process.PY/process-lock.py
rename to Class-2/Process/process-lock.py
diff --git a/Class-2/Process.PY/process-manager.py b/Class-2/Process/process-manager.py
similarity index 100%
rename from Class-2/Process.PY/process-manager.py
rename to Class-2/Process/process-manager.py
diff --git a/Class-2/Process.PY/process-pipe.py b/Class-2/Process/process-pipe.py
similarity index 100%
rename from Class-2/Process.PY/process-pipe.py
rename to Class-2/Process/process-pipe.py
diff --git a/Class-2/Process.PY/process-pool.py b/Class-2/Process/process-pool.py
similarity index 100%
rename from Class-2/Process.PY/process-pool.py
rename to Class-2/Process/process-pool.py
diff --git a/Class-2/Process.PY/process-queue.py b/Class-2/Process/process-queue.py
similarity index 100%
rename from Class-2/Process.PY/process-queue.py
rename to Class-2/Process/process-queue.py
diff --git a/Class-2/Process.PY/process-subproc.py b/Class-2/Process/process-subproc.py
similarity index 100%
rename from Class-2/Process.PY/process-subproc.py
rename to Class-2/Process/process-subproc.py
diff --git a/Class-2/Process.PY/process-unix.py b/Class-2/Process/process-unix.py
similarity index 100%
rename from Class-2/Process.PY/process-unix.py
rename to Class-2/Process/process-unix.py
diff --git a/Class-2/Process.PY/process.py b/Class-2/Process/process.py
similarity index 100%
rename from Class-2/Process.PY/process.py
rename to Class-2/Process/process.py
diff --git a/Class-2/QRCode.PY/README.md b/Class-2/QRCode/README.md
similarity index 100%
rename from Class-2/QRCode.PY/README.md
rename to Class-2/QRCode/README.md
diff --git a/Class-2/QRCode.PY/qr-read.py b/Class-2/QRCode/qr-read.py
similarity index 100%
rename from Class-2/QRCode.PY/qr-read.py
rename to Class-2/QRCode/qr-read.py
diff --git a/Class-2/QRCode.PY/qr-simple.png b/Class-2/QRCode/qr-simple.png
similarity index 100%
rename from Class-2/QRCode.PY/qr-simple.png
rename to Class-2/QRCode/qr-simple.png
diff --git a/Class-2/QRCode.PY/qr-write.py b/Class-2/QRCode/qr-write.py
similarity index 100%
rename from Class-2/QRCode.PY/qr-write.py
rename to Class-2/QRCode/qr-write.py
diff --git a/Class-2/README.md b/Class-2/README.md
index 2af30f2..b39ce06 100644
--- a/Class-2/README.md
+++ b/Class-2/README.md
@@ -1,3 +1,4 @@
+
 # Python example.
 
 Python example.
diff --git a/Class-2/Thread.PY/README.md b/Class-2/Thread/README.md
similarity index 100%
rename from Class-2/Thread.PY/README.md
rename to Class-2/Thread/README.md
diff --git a/Class-2/Thread.PY/daemon-threading.py b/Class-2/Thread/daemon-threading.py
similarity index 100%
rename from Class-2/Thread.PY/daemon-threading.py
rename to Class-2/Thread/daemon-threading.py
diff --git a/Class-2/Thread.PY/thread-condition.py b/Class-2/Thread/thread-condition.py
similarity index 100%
rename from Class-2/Thread.PY/thread-condition.py
rename to Class-2/Thread/thread-condition.py
diff --git a/Class-2/Thread.PY/thread-event.py b/Class-2/Thread/thread-event.py
similarity index 100%
rename from Class-2/Thread.PY/thread-event.py
rename to Class-2/Thread/thread-event.py
diff --git a/Class-2/Thread.PY/thread-lock.py b/Class-2/Thread/thread-lock.py
similarity index 100%
rename from Class-2/Thread.PY/thread-lock.py
rename to Class-2/Thread/thread-lock.py
diff --git a/Class-2/Thread.PY/thread-pool.py b/Class-2/Thread/thread-pool.py
similarity index 100%
rename from Class-2/Thread.PY/thread-pool.py
rename to Class-2/Thread/thread-pool.py
diff --git a/Class-2/Thread.PY/thread-queue.py b/Class-2/Thread/thread-queue.py
similarity index 100%
rename from Class-2/Thread.PY/thread-queue.py
rename to Class-2/Thread/thread-queue.py
diff --git a/Class-2/Thread.PY/thread-rlock.py b/Class-2/Thread/thread-rlock.py
similarity index 100%
rename from Class-2/Thread.PY/thread-rlock.py
rename to Class-2/Thread/thread-rlock.py
diff --git a/Class-2/Thread.PY/thread-semaphore.py b/Class-2/Thread/thread-semaphore.py
similarity index 100%
rename from Class-2/Thread.PY/thread-semaphore.py
rename to Class-2/Thread/thread-semaphore.py
diff --git a/Class-2/Thread.PY/thread.py b/Class-2/Thread/thread.py
similarity index 100%
rename from Class-2/Thread.PY/thread.py
rename to Class-2/Thread/thread.py
diff --git a/Class-2/Timebase.PY/README.md b/Class-2/Timebase/README.md
similarity index 100%
rename from Class-2/Timebase.PY/README.md
rename to Class-2/Timebase/README.md
diff --git a/Class-2/Timebase.PY/timebase-alarm.py b/Class-2/Timebase/timebase-alarm.py
similarity index 100%
rename from Class-2/Timebase.PY/timebase-alarm.py
rename to Class-2/Timebase/timebase-alarm.py
diff --git a/Class-2/Timebase.PY/timebase-ntp.py b/Class-2/Timebase/timebase-ntp.py
similarity index 100%
rename from Class-2/Timebase.PY/timebase-ntp.py
rename to Class-2/Timebase/timebase-ntp.py
diff --git a/Class-2/Timebase.PY/timebase-show.py b/Class-2/Timebase/timebase-show.py
similarity index 100%
rename from Class-2/Timebase.PY/timebase-show.py
rename to Class-2/Timebase/timebase-show.py
diff --git a/Class-2/Web.PY/README.md b/Class-2/Web/README.md
similarity index 100%
rename from Class-2/Web.PY/README.md
rename to Class-2/Web/README.md
diff --git a/Class-2/Web.PY/client-aiohttp.py b/Class-2/Web/client-aiohttp.py
similarity index 100%
rename from Class-2/Web.PY/client-aiohttp.py
rename to Class-2/Web/client-aiohttp.py
diff --git a/Class-2/Web.PY/client-get.py b/Class-2/Web/client-get.py
similarity index 100%
rename from Class-2/Web.PY/client-get.py
rename to Class-2/Web/client-get.py
diff --git a/Class-2/Web.PY/client-post.py b/Class-2/Web/client-post.py
similarity index 100%
rename from Class-2/Web.PY/client-post.py
rename to Class-2/Web/client-post.py
diff --git a/Class-2/Web.PY/server-aiohttp.py b/Class-2/Web/server-aiohttp.py
similarity index 100%
rename from Class-2/Web.PY/server-aiohttp.py
rename to Class-2/Web/server-aiohttp.py
diff --git a/Class-2/Web.PY/server-flask.py b/Class-2/Web/server-flask.py
similarity index 100%
rename from Class-2/Web.PY/server-flask.py
rename to Class-2/Web/server-flask.py
diff --git a/Class-2/Web.PY/server-wsgi.py b/Class-2/Web/server-wsgi.py
similarity index 100%
rename from Class-2/Web.PY/server-wsgi.py
rename to Class-2/Web/server-wsgi.py
diff --git a/Class-2/Web.PY/templates/calculator.html b/Class-2/Web/templates/calculator.html
similarity index 100%
rename from Class-2/Web.PY/templates/calculator.html
rename to Class-2/Web/templates/calculator.html
diff --git a/Class-2/XML.PY/README.md b/Class-2/XML/README.md
similarity index 100%
rename from Class-2/XML.PY/README.md
rename to Class-2/XML/README.md
diff --git a/Class-2/XML.PY/dom-decode.py b/Class-2/XML/dom-decode.py
similarity index 100%
rename from Class-2/XML.PY/dom-decode.py
rename to Class-2/XML/dom-decode.py
diff --git a/Class-2/XML.PY/dom-encode.py b/Class-2/XML/dom-encode.py
similarity index 100%
rename from Class-2/XML.PY/dom-encode.py
rename to Class-2/XML/dom-encode.py
diff --git a/Class-2/XML.PY/fruits.xml b/Class-2/XML/fruits.xml
similarity index 100%
rename from Class-2/XML.PY/fruits.xml
rename to Class-2/XML/fruits.xml
diff --git a/Class-2/XML.PY/sax-decode.py b/Class-2/XML/sax-decode.py
similarity index 100%
rename from Class-2/XML.PY/sax-decode.py
rename to Class-2/XML/sax-decode.py
diff --git a/Class-2/XML.PY/sax-encode.py b/Class-2/XML/sax-encode.py
similarity index 100%
rename from Class-2/XML.PY/sax-encode.py
rename to Class-2/XML/sax-encode.py
diff --git a/Class-3/Openvino.PY/README.md b/Class-3/Openvino/README.md
similarity index 100%
rename from Class-3/Openvino.PY/README.md
rename to Class-3/Openvino/README.md
diff --git a/Class-3/Openvino.PY/image-classification-async.py b/Class-3/Openvino/image-classification-async.py
similarity index 100%
rename from Class-3/Openvino.PY/image-classification-async.py
rename to Class-3/Openvino/image-classification-async.py
diff --git a/Class-3/Openvino.PY/image-classification.py b/Class-3/Openvino/image-classification.py
similarity index 100%
rename from Class-3/Openvino.PY/image-classification.py
rename to Class-3/Openvino/image-classification.py
diff --git a/Class-3/Openvino.PY/image-ssd-v1.py b/Class-3/Openvino/image-ssd-v1.py
similarity index 100%
rename from Class-3/Openvino.PY/image-ssd-v1.py
rename to Class-3/Openvino/image-ssd-v1.py
diff --git a/Class-3/Openvino.PY/image-ssd-v2.py b/Class-3/Openvino/image-ssd-v2.py
similarity index 100%
rename from Class-3/Openvino.PY/image-ssd-v2.py
rename to Class-3/Openvino/image-ssd-v2.py
diff --git a/Class-3/Openvino.PY/imagenet_classes.txt b/Class-3/Openvino/imagenet_classes.txt
similarity index 100%
rename from Class-3/Openvino.PY/imagenet_classes.txt
rename to Class-3/Openvino/imagenet_classes.txt
diff --git a/Class-3/Pytorch.PY/README.md b/Class-3/Pytorch/README.md
similarity index 100%
rename from Class-3/Pytorch.PY/README.md
rename to Class-3/Pytorch/README.md
diff --git a/Class-3/Pytorch.PY/base-linear.py b/Class-3/Pytorch/base-linear.py
similarity index 100%
rename from Class-3/Pytorch.PY/base-linear.py
rename to Class-3/Pytorch/base-linear.py
diff --git a/Class-3/README.md b/Class-3/README.md
index 39ffffa..cdb426b 100644
--- a/Class-3/README.md
+++ b/Class-3/README.md
@@ -1,3 +1,4 @@
+
 # Python Project
 
 Python project.
diff --git a/README.md b/README.md
index c2979c2..8bcbc8c 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,17 @@
+
 # Python-Helper
+
 Python advanced sample code.
+
+
+# Tree
+
+- Class-0: Base tutorials.
+- Class-1: Data structure.
+- Class-2: Little sample code.
+- Class-3: Project.
+
+
+# License
+
+MIT license.

From 6886e918cf1333a32d6f7c41ce64f90064678516 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 19 Jul 2024 16:01:55 +0800
Subject: [PATCH 02/38] [Py] Add picture format converter.

---
 Class-2/Format/README.md        | 30 +++++++++++++++++++++++++++++
 Class-2/Format/multi_format.py  | 34 +++++++++++++++++++++++++++++++++
 Class-2/Format/single_format.py | 27 ++++++++++++++++++++++++++
 3 files changed, 91 insertions(+)
 create mode 100644 Class-2/Format/README.md
 create mode 100644 Class-2/Format/multi_format.py
 create mode 100644 Class-2/Format/single_format.py

diff --git a/Class-2/Format/README.md b/Class-2/Format/README.md
new file mode 100644
index 0000000..71d25c4
--- /dev/null
+++ b/Class-2/Format/README.md
@@ -0,0 +1,30 @@
+
+# Introduction
+
+Image format conversion example code for python3.
+
+
+# Usage
+
+1. Single picture conversion:
+
+Replace key value for 'original_pic', 'result_pic'.
+
+```bash
+$ pip install pillow
+$ python single_format.py
+```
+
+2. Multi picture conversion:
+
+Replace key value for 'path'.
+
+```bash
+$ pip install numpy opencv-python
+$ python multi_format.py
+```
+
+
+# License
+
+MIT license.
diff --git a/Class-2/Format/multi_format.py b/Class-2/Format/multi_format.py
new file mode 100644
index 0000000..b9236bb
--- /dev/null
+++ b/Class-2/Format/multi_format.py
@@ -0,0 +1,34 @@
+###
+# Multi picture conversion example.
+# 
+# License - MIT.
+###
+
+import os
+# pip install opencv-python
+import cv2
+
+
+# Main function.
+def main():
+# {
+    i = 0
+
+    for x in os.listdir(path):
+        # Read original picture.
+        image = cv2.imread(r'{}\{}'.format(path, x))
+
+        # Conversion pic format to PNG.
+        cv2.imwrite(r'{}\{}.png'.format(path, i), image)
+
+        i += 1
+# }
+
+
+# Program entry.
+if '__main__' == __name__:
+
+    # Replace a real folder.
+    path = r'potatos'
+
+    main()
diff --git a/Class-2/Format/single_format.py b/Class-2/Format/single_format.py
new file mode 100644
index 0000000..b73bbfc
--- /dev/null
+++ b/Class-2/Format/single_format.py
@@ -0,0 +1,27 @@
+###
+# Single picture conversion example.
+# 
+# License - MIT.
+###
+
+import os
+# pip install pillow
+from PIL import Image
+
+
+# Main function.
+def main():
+# {
+    image = Image.open(original_pic)
+    image.save(result_pic)
+# }
+
+
+# Program entry.
+if '__main__' == __name__:
+
+    # Replace it with an actual image.
+    original_pic = 'potato1.jpg'
+    result_pic   = 'potato1.png'
+
+    main()

From d69d5132ba254c4e661dcd448f97ae66c4a036fd Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 22 Jul 2024 10:24:15 +0800
Subject: [PATCH 03/38] [Py] Add rename file example.

---
 Class-2/Format/README.md                      | 12 +++++--
 .../{multi_format.py => multi_pic_conv.py}    |  2 ++
 Class-2/Format/rename_files.py                | 35 +++++++++++++++++++
 .../{single_format.py => single_pic_conv.py}  |  0
 4 files changed, 47 insertions(+), 2 deletions(-)
 rename Class-2/Format/{multi_format.py => multi_pic_conv.py} (96%)
 create mode 100644 Class-2/Format/rename_files.py
 rename Class-2/Format/{single_format.py => single_pic_conv.py} (100%)

diff --git a/Class-2/Format/README.md b/Class-2/Format/README.md
index 71d25c4..ffa3db5 100644
--- a/Class-2/Format/README.md
+++ b/Class-2/Format/README.md
@@ -12,7 +12,7 @@ Replace key value for 'original_pic', 'result_pic'.
 
 ```bash
 $ pip install pillow
-$ python single_format.py
+$ python single_pic_conv.py
 ```
 
 2. Multi picture conversion:
@@ -21,7 +21,15 @@ Replace key value for 'path'.
 
 ```bash
 $ pip install numpy opencv-python
-$ python multi_format.py
+$ python multi_pic_conv.py
+```
+
+3. Rename folder all file name:
+
+Replace key value for 'folder_path', 'original_name', 'target_name'.
+
+```bash
+$ python rename_files.py
 ```
 
 
diff --git a/Class-2/Format/multi_format.py b/Class-2/Format/multi_pic_conv.py
similarity index 96%
rename from Class-2/Format/multi_format.py
rename to Class-2/Format/multi_pic_conv.py
index b9236bb..10c2343 100644
--- a/Class-2/Format/multi_format.py
+++ b/Class-2/Format/multi_pic_conv.py
@@ -15,6 +15,7 @@ def main():
     i = 0
 
     for x in os.listdir(path):
+    # {
         # Read original picture.
         image = cv2.imread(r'{}\{}'.format(path, x))
 
@@ -22,6 +23,7 @@ def main():
         cv2.imwrite(r'{}\{}.png'.format(path, i), image)
 
         i += 1
+    # }
 # }
 
 
diff --git a/Class-2/Format/rename_files.py b/Class-2/Format/rename_files.py
new file mode 100644
index 0000000..f0440a2
--- /dev/null
+++ b/Class-2/Format/rename_files.py
@@ -0,0 +1,35 @@
+###
+# Replace all filenames for which the folder is eligible example.
+# 
+# License - MIT.
+###
+
+import os
+
+
+# Replace all filenames for which the folder is eligible.
+def replace_in_filenames(directory, old_str, new_str):
+# {
+    for filename in os.listdir(directory):
+    # {
+        if old_str in filename:
+            new_filename = filename.replace(old_str, new_str)
+            os.rename(os.path.join(directory, filename), os.path.join(directory, new_filename))
+    # }
+# }
+
+
+# Main function
+def main():
+# {
+    folder_path   = 'D:/tulip'
+    original_name = 'tulip'
+    target_name   = 'tulip_flower'
+
+    replace_in_filenames(folder_path, original_name, target_name)
+# }
+
+
+# Program entry.
+if '__main__' == __name__:
+    main()
diff --git a/Class-2/Format/single_format.py b/Class-2/Format/single_pic_conv.py
similarity index 100%
rename from Class-2/Format/single_format.py
rename to Class-2/Format/single_pic_conv.py

From 60754e54be450f5e24cd5490240e950e78688c37 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Thu, 25 Jul 2024 17:58:54 +0800
Subject: [PATCH 04/38] [Py] Add tensorflow fruits recognition sample code.

---
 Class-3/Tensorflow/README.md                  |   9 +
 .../fruits_recognition_tf2/README.md          | 100 ++++++++++
 .../data/train/apple/.empty                   |   0
 .../data/train/banana/.empty                  |   0
 .../data/train/orange/.empty                  |   0
 .../data/train/watermelon/.empty              |   0
 .../data/val/apple/.empty                     |   0
 .../data/val/banana/.empty                    |   0
 .../data/val/orange/.empty                    |   0
 .../data/val/watermelon/.empty                |   0
 .../fruits_recognition_tf2/images/apple.jpg   | Bin 0 -> 9249 bytes
 .../Tensorflow/fruits_recognition_tf2/main.py | 175 ++++++++++++++++++
 .../fruits_recognition_tf2/requirements.txt   |   4 +
 .../fruits_recognition_tf2/train_mobilenet.py | 107 +++++++++++
 14 files changed, 395 insertions(+)
 create mode 100644 Class-3/Tensorflow/README.md
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/README.md
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/train/apple/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/train/banana/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/train/orange/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/train/watermelon/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/val/apple/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/val/banana/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/val/orange/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/data/val/watermelon/.empty
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/images/apple.jpg
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/main.py
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/requirements.txt
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py

diff --git a/Class-3/Tensorflow/README.md b/Class-3/Tensorflow/README.md
new file mode 100644
index 0000000..7b20f3f
--- /dev/null
+++ b/Class-3/Tensorflow/README.md
@@ -0,0 +1,9 @@
+
+# Introduction
+
+Tensorflow for python.
+
+
+# Platform
+
+Python 3 on Windows/Linux/MacOS.
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/README.md b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
new file mode 100644
index 0000000..dc8f1f6
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
@@ -0,0 +1,100 @@
+
+# 1. Introduction
+
+Tensorflow image recognition for fruits.
+
+
+# 2. Enviorment
+
+On Windows:
+
+Such as tensorflow-2.10.1:
+
+- Python-3.10.11.exe.
+
+optional:
+
+- cuda_11.2.0_460.89_win10.exe
+- cudnn-11.2-windows-x64-v8.1.1.33.zip
+
+
+# 3. Usage
+
+Train the model (3.1 step), then use the model (3.2 step).
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install -r requirements.txt
+```
+
+
+## 3.1 Train model
+
+- Copy some pictures to "data/train" and "data/val" folder.
+- The "data/train" folder contains 80% of the images, "data/val" contains 20%.
+- The picture format need is jpeg, png, gif or bmp.
+
+Directory structure:
+
+"data/train" folder: 100 pictures per folder, "data/val" folder: 25 pictures per folder,
+100 is just an example, you can use any number.
+
+```bash
+.
+├─train
+│  ├─apple
+│  │      apple1.png
+│  │      ...
+│  │      apple100.png
+│  │
+│  ├─banana
+│  │      banana1.png
+│  │      ...
+│  │      banana100.png
+│  │
+│  ├─orange
+│  │      orange1.png
+│  │      ...
+│  │      orange100.png
+│  │
+│  └─watermelon
+│          watermelon1.png
+│          ...
+│          watermelon100.png
+│
+└─val
+    ├─apple
+    │      apple1.png
+    │      ...
+    │      apple25.png
+    │
+    ├─banana
+    │      banana1.png
+    │      ...
+    │      banana25.png
+    │
+    ├─orange
+    │      orange1.png
+    │      ...
+    │      orange25.png
+    │
+    └─watermelon
+            watermelon1.png
+            ...
+            watermelon25.png
+```
+
+Note: You can add fruits class, such as pear, grape, mango, etc.
+
+```bash
+$ python train_mobilenet.py
+```
+
+If everything goes well, you get a model in "models" folder.
+
+
+## 3.2 Use model
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/train/apple/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/train/apple/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/train/banana/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/train/banana/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/train/orange/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/train/orange/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/train/watermelon/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/train/watermelon/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/val/apple/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/val/apple/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/val/banana/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/val/banana/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/val/orange/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/val/orange/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/data/val/watermelon/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/data/val/watermelon/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/images/apple.jpg b/Class-3/Tensorflow/fruits_recognition_tf2/images/apple.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..15fccedeab346c897b255bd231f6142569d654e5
GIT binary patch
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/main.py b/Class-3/Tensorflow/fruits_recognition_tf2/main.py
new file mode 100644
index 0000000..383a5ea
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/main.py
@@ -0,0 +1,175 @@
+###
+# Tensorflow image recognition for fruits.
+#
+# License - MIT.
+###
+
+import tensorflow as tf
+from PyQt5.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtWidgets import *
+import sys
+import cv2
+from PIL import Image
+import numpy as np
+
+
+class MainWindow(QWidget):
+# {
+    def __init__(self):
+    # {
+        super().__init__()
+
+        # Application title.
+        self.setWindowTitle('Fruits recognition')
+
+        # Model.
+        self.model = tf.keras.models.load_model(default_model)
+
+        # Default display picture.
+        self.display_picture = default_picture
+
+        # Index of fruits class name.
+        self.class_names = [
+            'apple',
+            'banana',
+            'orange',
+            'watermelon'
+        ]
+
+        self.resize(900, 700)
+        self.initUI()
+    # }
+
+
+    # Set UI.
+    def initUI(self):
+    # {
+        # Left Layout.
+        # --------------------------------
+        left_widget    = QWidget()
+        left_layout    = QVBoxLayout()
+        self.img_label = QLabel()
+
+        # Image preprocessing.
+        img_init = cv2.imread(self.display_picture)
+        h, w, c  = img_init.shape
+        scale    = 400 / h
+        img_init = cv2.resize(img_init, (224, 224))
+        cv2.imwrite('images/target.png', img_init)
+
+        # Image label.
+        self.img_label.setPixmap(QPixmap('images/target.png'))
+
+        left_layout.addWidget(self.img_label, 1, Qt.AlignCenter)
+        left_widget.setLayout(left_layout)
+
+
+        # Right layout.
+        # --------------------------------
+        right_widget = QWidget()
+        right_layout = QVBoxLayout()
+        font         = QFont('Helvetica', 15)
+
+        # Button 1.
+        btn_change   = QPushButton('Upload picture')
+        btn_change.clicked.connect(self.change_img)
+        btn_change.setFont(font)
+
+        # Button 2.
+        btn_predict  = QPushButton('Start recognition')
+        btn_predict.clicked.connect(self.predict_img)
+        btn_predict.setFont(font)
+
+        # Label 1.
+        label_result = QLabel('Fruit name')
+        label_result.setFont(QFont('Helvetica', 16))
+
+        # Label 2.
+        self.result  = QLabel('Waiting for recognition')
+        self.result.setFont(QFont('Helvetica', 24))
+
+        right_layout.addStretch()
+        right_layout.addWidget(label_result, 0, Qt.AlignCenter)
+        right_layout.addStretch()
+        right_layout.addWidget(self.result,  0, Qt.AlignCenter)
+        right_layout.addStretch()
+        right_layout.addStretch()
+        right_layout.addWidget(btn_change)
+        right_layout.addWidget(btn_predict)
+        right_layout.addStretch()
+
+        right_widget.setLayout(right_layout)
+
+
+        # Main layout
+        # --------------------------------
+        main_layout = QHBoxLayout()
+        main_layout.addWidget(left_widget)
+        main_layout.addWidget(right_widget)
+
+        self.setLayout(main_layout)
+    # }
+
+
+    # Load local image and display.
+    def change_img(self):
+    # {
+        openfile_name = QFileDialog.getOpenFileName(
+                            self, 'chose files', '', 'Image files(*.jpg *.png *jpeg)')
+        img_name = openfile_name[0]
+
+        if img_name == '':
+            pass
+        else:
+            img_init = cv2.imread(img_name)
+            h, w, c  = img_init.shape
+            scale    = 400 / h
+
+            img_init = cv2.resize(img_init, (224, 224)) # Resize the image to 224 * 224.
+            cv2.imwrite('images/target.png', img_init)  # Save image to png.
+
+            # Display selected image.
+            self.img_label.setPixmap(QPixmap('images/target.png'))
+            self.result.setText('Waiting for recognition')
+    # }
+
+
+    # Reasoning image.
+    def predict_img(self):
+    # {
+        img          = Image.open('images/target.png')  # Read image.
+        img          = np.asarray(img)                  # Convert the image to a numpy array.
+
+        # Inference.
+        outputs      = self.model.predict(img.reshape(1, 224, 224, 3))
+
+        result_index = int(np.argmax(outputs))          # Get result index.
+
+        if (result_index <= len(self.class_names)):
+            result   = self.class_names[result_index]   # Get the corresponding fruit name.
+        else:
+            result   = "Not found"
+
+        self.result.setText(result)
+    # }
+
+
+    # Close.
+    def closeEvent(self, event):
+    # {
+        self.close()
+        event.accept()
+    # }
+# }
+
+
+# Program entry.
+if '__main__' == __name__:
+    default_model   = 'models/mobilenet_fruits.h5'
+    default_picture = 'images/apple.jpg'
+
+    app = QApplication(sys.argv)
+    x = MainWindow()
+    x.show()
+    sys.exit(app.exec_())
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/requirements.txt b/Class-3/Tensorflow/fruits_recognition_tf2/requirements.txt
new file mode 100644
index 0000000..bd17b15
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/requirements.txt
@@ -0,0 +1,4 @@
+tensorflow == 2.10.1
+pyqt5
+pillow
+opencv-python
\ No newline at end of file
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py b/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py
new file mode 100644
index 0000000..3a07bd6
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py
@@ -0,0 +1,107 @@
+###
+# Tensorflow train mobilenet model.
+#
+# License - MIT.
+###
+
+import tensorflow as tf
+import matplotlib.pyplot as plt
+from time import *
+
+
+# Loading dataset.
+# Specify the location of the dataset and treat it as imgheight * imgwidth, and set the batch.
+def data_load(data_dir, test_data_dir, img_height, img_width, batch_size):
+# {
+    # Loading the training set.
+    train_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    # Loading the test set.
+    val_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        test_data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    class_names = train_ds.class_names
+
+    # Returns the processed training set, validation set, and class names.
+    return train_ds, val_ds, class_names
+# }
+
+
+# Building the mobilenet model.
+# Load the model, specify the size of the image processing and whether to perform transfer learning.
+def model_load(IMG_SHAPE=(224, 224, 3), class_num=12):
+# {
+    # Normalization is not needed in the process of fine-tuning.
+    # Loading the pre-trained mobilenet model.
+    base_model = tf.keras.applications.MobileNetV2(input_shape = IMG_SHAPE,
+                                                   include_top = False,
+                                                   weights     = 'imagenet')
+
+    # The backbone parameters of the model are frozen.
+    base_model.trainable = False
+    model = tf.keras.models.Sequential([
+        # Perform normalization.
+        tf.keras.layers.experimental.preprocessing.Rescaling(1. / 127.5, offset=-1, input_shape=IMG_SHAPE),
+
+        # Set up the backbone model.
+        base_model,
+
+        # Global average pooling is performed on the output of the backbone model.
+        tf.keras.layers.GlobalAveragePooling2D(),
+
+        # It is mapped to the final number of classes through the fully connected layer.
+        tf.keras.layers.Dense(class_num, activation='softmax')
+    ])
+
+    model.summary()
+
+    # The optimizer of the model training is adam optimizer,
+    # and the loss function of the model is the cross-entropy loss function.
+    model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
+
+    return model
+# }
+
+
+# Train model.
+def train(epochs):
+# {
+    # Start training and record the start time.
+    begin_time = time()
+
+    # Loading the dataset.
+    train_ds, val_ds, class_names = data_load(train_folder, val_folder, 224, 224, 16)
+    print(class_names)
+
+    # Loading the model.
+    model = model_load(class_num=len(class_names))
+
+    # Specify the number of training epochs and start training.
+    history = model.fit(train_ds, validation_data=val_ds, epochs=epochs)
+
+    # Save the model.
+    model.save(default_model)
+
+    # Record end time.
+    end_time = time()
+    run_time = end_time - begin_time
+
+    print('Total running time', run_time, 's')
+# }
+
+
+if '__main__' == __name__:
+    train_folder  = 'data/train'
+    val_folder    = 'data/val'
+    default_model = 'models/mobilenet_fruits.h5'
+
+    train(epochs=50)

From d7d56b69d1593fd71841dc810076dd7a4b6c9fce Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 29 Jul 2024 16:55:34 +0800
Subject: [PATCH 05/38] [Py] Add train CNN model file.

---
 .../fruits_recognition_tf2/README.md          |  10 ++
 .../fruits_recognition_tf2/train_cnn.py       | 117 ++++++++++++++++++
 .../fruits_recognition_tf2/train_mobilenet.py |  20 +--
 3 files changed, 138 insertions(+), 9 deletions(-)
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py

diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/README.md b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
index dc8f1f6..d11dc10 100644
--- a/Class-3/Tensorflow/fruits_recognition_tf2/README.md
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
@@ -86,15 +86,25 @@ Directory structure:
 
 Note: You can add fruits class, such as pear, grape, mango, etc.
 
+1. Train mobilenet model:
+
 ```bash
 $ python train_mobilenet.py
 ```
 
+2. Train CNN model:
+
+```bash
+$ python train_cnn.py
+```
+
 If everything goes well, you get a model in "models" folder.
 
 
 ## 3.2 Use model
 
+Default use mobilenet model, you can edit "default_model" to use CNN model:
+
 ```bash
 $ python main.py
 ```
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py b/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py
new file mode 100644
index 0000000..31c4866
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py
@@ -0,0 +1,117 @@
+###
+# Tensorflow2 train CNN model.
+#
+# License - MIT.
+###
+
+import tensorflow as tf
+import matplotlib.pyplot as plt
+from time import *
+
+
+# Loading dataset.
+# Specify the location of the dataset and treat it as imgheight * imgwidth, and set the batch.
+def data_load(data_dir, test_data_dir, img_height, img_width, batch_size):
+# {
+    # Loading the training set.
+    train_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    # Loading the test set.
+    val_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        test_data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    class_names = train_ds.class_names
+
+    # Returns the processed training set, validation set, and class names.
+    return train_ds, val_ds, class_names
+# }
+
+
+# Building the CNN model.
+def model_load(IMG_SHAPE = (224, 224, 3), class_num = 12):
+# {
+    # Building the Model.
+    model = tf.keras.models.Sequential([
+        # Normalize the model and convert numbers between 0 and 255 to between 0 and 1.
+        tf.keras.layers.experimental.preprocessing.Rescaling(1. / 255, input_shape = IMG_SHAPE),
+
+        # Convolution layer, the output of this convolution layer is 32 channels,
+        # the size of the convolution kernel is 3 * 3, and the activation function is relu.
+        tf.keras.layers.Conv2D(32, (3, 3), activation = 'relu'),
+
+        # Add a pooling layer, the kernel size of the pooling is 2 * 2.
+        tf.keras.layers.MaxPooling2D(2, 2),
+
+        # Add another convolution.
+        # Convolution layer, output is 64 channels,
+        # convolution kernel size is 3 * 3, activation function is relu.
+        tf.keras.layers.Conv2D(64, (3, 3), activation = 'relu'),
+
+        # Pooling layer, maximum pooling, pooling operation on 2 * 2 area.
+        tf.keras.layers.MaxPooling2D(2, 2),
+
+        # Convert the two-dimensional output to one-dimensional.
+        tf.keras.layers.Flatten(),
+
+        # The same 128 dense layers, and 10 output layers as in the pre-convolution example:
+        tf.keras.layers.Dense(128, activation = 'relu'),
+
+        # The model is output as a neuron of class name length through the softmax function,
+        # and the activation function uses the probability value corresponding to softmax.
+        tf.keras.layers.Dense(class_num, activation = 'softmax')
+    ])
+
+    # Output information.
+    model.summary()
+
+    # The optimizer of the model training is sgd optimizer,
+    # and the loss function of the model is the cross-entropy loss function.
+    model.compile(optimizer = 'sgd', loss = 'categorical_crossentropy', metrics = ['accuracy'])
+
+    return model
+# }
+
+
+# Train model.
+def train(epochs):
+# {
+    # Start training and record the start time.
+    begin_time = time()
+
+    # Loading the dataset.
+    train_ds, val_ds, class_names = data_load(train_folder, val_folder, 224, 224, 16)
+    print(class_names)
+
+    # Loading the model.
+    model = model_load(class_num = len(class_names))
+
+    # Specify the number of training epochs and start training.
+    history = model.fit(train_ds, validation_data = val_ds, epochs = epochs)
+
+    # Save the model.
+    model.save(default_model)
+
+    # Record end time.
+    end_time = time()
+    run_time = end_time - begin_time
+
+    print('Total running time: ', run_time, "s")
+# }
+
+
+if '__main__' == __name__:
+    train_folder  = 'data/train'
+    val_folder    = 'data/val'
+    default_model = 'models/cnn_fruits.h5'
+
+    # train times.
+    train(epochs = 50)
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py b/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py
index 3a07bd6..9a71214 100644
--- a/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/train_mobilenet.py
@@ -1,5 +1,5 @@
 ###
-# Tensorflow train mobilenet model.
+# Tensorflow2 train mobilenet model.
 #
 # License - MIT.
 ###
@@ -38,7 +38,7 @@ def data_load(data_dir, test_data_dir, img_height, img_width, batch_size):
 
 # Building the mobilenet model.
 # Load the model, specify the size of the image processing and whether to perform transfer learning.
-def model_load(IMG_SHAPE=(224, 224, 3), class_num=12):
+def model_load(IMG_SHAPE = (224, 224, 3), class_num = 12):
 # {
     # Normalization is not needed in the process of fine-tuning.
     # Loading the pre-trained mobilenet model.
@@ -50,7 +50,7 @@ def model_load(IMG_SHAPE=(224, 224, 3), class_num=12):
     base_model.trainable = False
     model = tf.keras.models.Sequential([
         # Perform normalization.
-        tf.keras.layers.experimental.preprocessing.Rescaling(1. / 127.5, offset=-1, input_shape=IMG_SHAPE),
+        tf.keras.layers.experimental.preprocessing.Rescaling(1. / 127.5, offset = -1, input_shape = IMG_SHAPE),
 
         # Set up the backbone model.
         base_model,
@@ -59,14 +59,15 @@ def model_load(IMG_SHAPE=(224, 224, 3), class_num=12):
         tf.keras.layers.GlobalAveragePooling2D(),
 
         # It is mapped to the final number of classes through the fully connected layer.
-        tf.keras.layers.Dense(class_num, activation='softmax')
+        tf.keras.layers.Dense(class_num, activation = 'softmax')
     ])
 
+    # Output information.
     model.summary()
 
     # The optimizer of the model training is adam optimizer,
     # and the loss function of the model is the cross-entropy loss function.
-    model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
+    model.compile(optimizer = 'adam', loss = 'categorical_crossentropy', metrics = ['accuracy'])
 
     return model
 # }
@@ -83,10 +84,10 @@ def train(epochs):
     print(class_names)
 
     # Loading the model.
-    model = model_load(class_num=len(class_names))
+    model = model_load(class_num = len(class_names))
 
     # Specify the number of training epochs and start training.
-    history = model.fit(train_ds, validation_data=val_ds, epochs=epochs)
+    history = model.fit(train_ds, validation_data = val_ds, epochs = epochs)
 
     # Save the model.
     model.save(default_model)
@@ -95,7 +96,7 @@ def train(epochs):
     end_time = time()
     run_time = end_time - begin_time
 
-    print('Total running time', run_time, 's')
+    print('Total running time: ', run_time, 's')
 # }
 
 
@@ -104,4 +105,5 @@ def train(epochs):
     val_folder    = 'data/val'
     default_model = 'models/mobilenet_fruits.h5'
 
-    train(epochs=50)
+    # train times.
+    train(epochs = 50)

From 13417a938d952dc9e76f73227712070fcc49b059 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 30 Jul 2024 10:07:16 +0800
Subject: [PATCH 06/38] [Py] Add models folder.

---
 Class-3/Tensorflow/fruits_recognition_tf2/models/.empty | 0
 Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py  | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/models/.empty

diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/models/.empty b/Class-3/Tensorflow/fruits_recognition_tf2/models/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py b/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py
index 31c4866..98cc33b 100644
--- a/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/train_cnn.py
@@ -104,7 +104,7 @@ def train(epochs):
     end_time = time()
     run_time = end_time - begin_time
 
-    print('Total running time: ', run_time, "s")
+    print('Total running time: ', run_time, 's')
 # }
 
 

From 43c686db55aa95ac8d1010d949a6587e23dfa0d1 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 30 Jul 2024 10:10:41 +0800
Subject: [PATCH 07/38] [Py] Change OpenCV Class.

---
 {Class-2 => Class-3}/OpenCV/README.md       | 0
 {Class-2 => Class-3}/OpenCV/cvbase-image.py | 0
 {Class-2 => Class-3}/OpenCV/cvbase-video.py | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 rename {Class-2 => Class-3}/OpenCV/README.md (100%)
 rename {Class-2 => Class-3}/OpenCV/cvbase-image.py (100%)
 rename {Class-2 => Class-3}/OpenCV/cvbase-video.py (100%)

diff --git a/Class-2/OpenCV/README.md b/Class-3/OpenCV/README.md
similarity index 100%
rename from Class-2/OpenCV/README.md
rename to Class-3/OpenCV/README.md
diff --git a/Class-2/OpenCV/cvbase-image.py b/Class-3/OpenCV/cvbase-image.py
similarity index 100%
rename from Class-2/OpenCV/cvbase-image.py
rename to Class-3/OpenCV/cvbase-image.py
diff --git a/Class-2/OpenCV/cvbase-video.py b/Class-3/OpenCV/cvbase-video.py
similarity index 100%
rename from Class-2/OpenCV/cvbase-video.py
rename to Class-3/OpenCV/cvbase-video.py

From 2ae9c70242da405ff56d1ee63044c245229b8ec6 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 30 Jul 2024 18:06:50 +0800
Subject: [PATCH 08/38] [Py] Update tensorflow example readme.

---
 .../fruits_recognition_tf2/README.md          | 55 ++++++++++++++++++-
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/README.md b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
index d11dc10..90a639a 100644
--- a/Class-3/Tensorflow/fruits_recognition_tf2/README.md
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
@@ -6,17 +6,40 @@ Tensorflow image recognition for fruits.
 
 # 2. Enviorment
 
-On Windows:
+Windows 11:
 
 Such as tensorflow-2.10.1:
 
 - Python-3.10.11.exe.
 
-optional:
+Optional:
 
 - cuda_11.2.0_460.89_win10.exe
 - cudnn-11.2-windows-x64-v8.1.1.33.zip
 
+Linux (Ubuntu 22.04):
+
+```bash
+$ sudo apt update
+$ sudo apt install python3 python3-venv
+```
+
+Optional:
+
+- Cuda 11.2
+
+```bash
+$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
+$ sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
+$ wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.deb
+$ sudo dpkg -i cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.deb
+$ sudo apt-key add /var/cuda-repo-ubuntu2004-11-2-local/7fa2af80.pub
+$ sudo apt update
+$ sudo apt -y install cuda
+```
+
+- libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
+
 
 # 3. Usage
 
@@ -27,6 +50,34 @@ $ python -m pip install --upgrade pip
 $ pip install -r requirements.txt
 ```
 
+Or, you can use python virtual enviorment:
+
+Windows 11:
+
+```bash
+$ py -3.10 -m venv "PyEnv1"
+$ & PyEnv1\Scripts\Activate.ps1
+(PyEnv1) $ python -m pip install --upgrade pip
+(PyEnv1) $ pip install -r requirements.txt
+```
+
+Linux (Ubuntu 22.04):
+
+```bash
+$ sudo apt update
+$ sudo apt install python3 python3-venv
+$ python3 -m venv "PyEnv1"
+$ source PyEnv/bin/activate
+(PyEnv1) $ python3 -m pip install --upgrade pip 
+(PyEnv1) $ pip install -r requirements.txt 
+```
+
+finally, on the end (optional):
+
+```bash
+(PyEnv1) $ deactivate
+```
+
 
 ## 3.1 Train model
 

From 67f637b59a3186bdd826e3cfb2290f800206e2a7 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Wed, 31 Jul 2024 10:59:00 +0800
Subject: [PATCH 09/38] [Py] Add test cnn and mobilenet model file.

---
 .../fruits_recognition_tf2/README.md          |   9 +-
 .../fruits_recognition_tf2/test_model.py      | 153 ++++++++++++++++++
 2 files changed, 161 insertions(+), 1 deletion(-)
 create mode 100644 Class-3/Tensorflow/fruits_recognition_tf2/test_model.py

diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/README.md b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
index 90a639a..79950db 100644
--- a/Class-3/Tensorflow/fruits_recognition_tf2/README.md
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/README.md
@@ -152,7 +152,14 @@ $ python train_cnn.py
 If everything goes well, you get a model in "models" folder.
 
 
-## 3.2 Use model
+## 3.2 Test model
+
+```bash
+$ python test_model.py
+```
+
+
+## 3.3 Use model
 
 Default use mobilenet model, you can edit "default_model" to use CNN model:
 
diff --git a/Class-3/Tensorflow/fruits_recognition_tf2/test_model.py b/Class-3/Tensorflow/fruits_recognition_tf2/test_model.py
new file mode 100644
index 0000000..fbacb9e
--- /dev/null
+++ b/Class-3/Tensorflow/fruits_recognition_tf2/test_model.py
@@ -0,0 +1,153 @@
+###
+# Test ai model.
+#
+# License - MIT.
+###
+
+import tensorflow as tf
+import numpy as np
+
+
+# Loading dataset.
+# Load the training set and validation set from the training dataset folder
+# and the test folder respectively.
+def data_load(data_dir, test_data_dir, img_height, img_width, batch_size):
+# {
+    # Loading the training set.
+    train_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    # Loading the test set.
+    val_ds = tf.keras.preprocessing.image_dataset_from_directory(
+        test_data_dir,
+        label_mode = 'categorical',
+        seed       = 123,
+        image_size = (img_height, img_width),
+        batch_size = batch_size)
+
+    class_names = train_ds.class_names
+
+    # Returns the processed training set, validation set, and class names.
+    return train_ds, val_ds, class_names
+# }
+
+
+# Test the accuracy of the mobilenet model.
+def test_mobilenet():
+# {
+    # Load data.
+    train_ds, test_ds, class_names = data_load(train_folder, val_folder, 224, 224, 16)
+
+    # Load model.
+    model = tf.keras.models.load_model(mobilenet_model)
+    model.summary()
+
+    # Test.
+    loss, accuracy = model.evaluate(test_ds)
+
+    print('Mobilenet model loss: %.3f, accuracy: %.3f' % (loss, accuracy))
+    print('--------------------------------')
+
+    # Reasoning about the model separately.
+    test_real_labels = []
+    test_pre_labels  = []
+
+    for test_batch_images, test_batch_labels in test_ds:
+        test_batch_labels = test_batch_labels.numpy()
+        test_batch_pres   = model.predict(test_batch_images)
+
+        test_batch_labels_max = np.argmax(test_batch_labels, axis = 1)
+        test_batch_pres_max   = np.argmax(test_batch_pres,   axis = 1)
+
+        # The label corresponding to the inference is taken out.
+        for i in test_batch_labels_max:
+            test_real_labels.append(i)
+
+        for i in test_batch_pres_max:
+            test_pre_labels.append(i)
+
+    class_names_length = len(class_names)
+    heat_maps          = np.zeros((class_names_length, class_names_length))
+
+    for test_real_label, test_pre_label in zip(test_real_labels, test_pre_labels):
+        heat_maps[test_real_label][test_pre_label] = heat_maps[test_real_label][test_pre_label] + 1
+
+    print(heat_maps)
+    print('--------------------------------')
+
+    heat_maps_sum   = np.sum(heat_maps, axis = 1).reshape(-1, 1)
+    heat_maps_float = heat_maps / heat_maps_sum
+
+    print(heat_maps_float)
+    print('--------------------------------')
+# }
+
+
+# Test the accuracy of the CNN model.
+def test_cnn():
+# {
+    # Load data.
+    train_ds, test_ds, class_names = data_load(train_folder, val_folder, 224, 224, 16)
+
+    # Load model.
+    model = tf.keras.models.load_model(cnn_model)
+    model.summary()
+
+    # Test model.
+    loss, accuracy = model.evaluate(test_ds)
+
+    print('CNN model loss: %.3f, accuracy: %.3f' % (loss, accuracy))
+    print('--------------------------------')
+
+    # Reasoning about the model separately.
+    test_real_labels = []
+    test_pre_labels  = []
+
+    for test_batch_images, test_batch_labels in test_ds:
+        test_batch_labels = test_batch_labels.numpy()
+        test_batch_pres   = model.predict(test_batch_images)
+
+        test_batch_labels_max = np.argmax(test_batch_labels, axis = 1)
+        test_batch_pres_max   = np.argmax(test_batch_pres, axis = 1)
+
+        # The label corresponding to the inference is taken out.
+        for i in test_batch_labels_max:
+            test_real_labels.append(i)
+
+        for i in test_batch_pres_max:
+            test_pre_labels.append(i)
+
+    class_names_length = len(class_names)
+    heat_maps          = np.zeros((class_names_length, class_names_length))
+
+    for test_real_label, test_pre_label in zip(test_real_labels, test_pre_labels):
+        heat_maps[test_real_label][test_pre_label] = heat_maps[test_real_label][test_pre_label] + 1
+
+    print(heat_maps)
+    print('--------------------------------')
+
+    heat_maps_sum   = np.sum(heat_maps, axis = 1).reshape(-1, 1)
+    heat_maps_float = heat_maps / heat_maps_sum
+
+    print(heat_maps_float)
+    print('--------------------------------')
+# }
+
+
+if '__main__' == __name__:
+    train_folder    = 'data/train'
+    val_folder      = 'data/val'
+    mobilenet_model = 'models/mobilenet_fruits.h5'
+    cnn_model       = 'models/cnn_fruits.h5'
+
+    print('====================================')
+    print('--------Test Mobilenet model--------')
+    test_mobilenet()
+
+    print('====================================')
+    print('--------Test CNN model--------------')
+    test_cnn()

From b4a18ac8580110957453b5c92367529f6ac0e797 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Thu, 1 Aug 2024 10:14:25 +0800
Subject: [PATCH 10/38] [Py] Add PyQt6 Skeleton.

---
 Class-3/PyQt6/Class-0/README.md |  4 ++++
 Class-3/PyQt6/Class-1/README.md | 19 +++++++++++++++++
 Class-3/PyQt6/README.md         | 36 +++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/README.md
 create mode 100644 Class-3/PyQt6/Class-1/README.md
 create mode 100644 Class-3/PyQt6/README.md

diff --git a/Class-3/PyQt6/Class-0/README.md b/Class-3/PyQt6/Class-0/README.md
new file mode 100644
index 0000000..2bdbb76
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/README.md
@@ -0,0 +1,4 @@
+
+# Introduction
+
+Class-0 is PyQt6 documents.
diff --git a/Class-3/PyQt6/Class-1/README.md b/Class-3/PyQt6/Class-1/README.md
new file mode 100644
index 0000000..ff25514
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/README.md
@@ -0,0 +1,19 @@
+
+# Introduction
+
+Class-1 is PyQt6 base example.
+
+
+# Enviorment
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyqt6
+```
+
+in China:
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyqt6 -i https://pypi.tuna.tsinghua.edu.cn/simple
+```
diff --git a/Class-3/PyQt6/README.md b/Class-3/PyQt6/README.md
new file mode 100644
index 0000000..4484733
--- /dev/null
+++ b/Class-3/PyQt6/README.md
@@ -0,0 +1,36 @@
+
+# Introduction
+
+QT6 for python.
+
+- Class-0 : PyQt6 documents.
+- Class-1 : PyQt6 base example.
+
+
+# Platform
+
+Python 3 on Windows/Linux/MacOS.
+
+
+# Enviorment
+
+Install pyqt6:
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyqt6
+```
+
+Or, you can install pyside6:
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyside6
+```
+
+PyQt6 and PySide6 are like twins, here uses PyQt6.
+
+
+# License
+
+MIT license.

From 9b5390e7fed6fc66e0258d91ec72cf78ae3629aa Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Thu, 1 Aug 2024 10:15:59 +0800
Subject: [PATCH 11/38] [Py] Add first pyqt demo, hello world.

---
 Class-3/PyQt6/Class-1/01-hello/README.md | 26 ++++++++++++++++
 Class-3/PyQt6/Class-1/01-hello/main.py   | 39 ++++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-1/01-hello/README.md
 create mode 100644 Class-3/PyQt6/Class-1/01-hello/main.py

diff --git a/Class-3/PyQt6/Class-1/01-hello/README.md b/Class-3/PyQt6/Class-1/01-hello/README.md
new file mode 100644
index 0000000..3d77007
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/01-hello/README.md
@@ -0,0 +1,26 @@
+
+# Introduction
+
+PyQt6 QLabel example.
+
+
+# Enviorment
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyqt6
+```
+
+in China:
+
+```bash
+$ python -m pip install --upgrade pip
+$ pip install pyqt6 -i https://pypi.tuna.tsinghua.edu.cn/simple
+```
+
+
+# Usage
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/01-hello/main.py b/Class-3/PyQt6/Class-1/01-hello/main.py
new file mode 100644
index 0000000..d0b6214
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/01-hello/main.py
@@ -0,0 +1,39 @@
+###
+# PyQt6 QLabel example.
+#
+# License - MIT.
+###
+
+from PyQt6.QtWidgets import *
+
+
+def main():
+# {
+    # Create application.
+    app   = QApplication([])
+
+    # Create Label.
+    label = QLabel('Hello World!')
+
+    # Display Window.
+    label.show()
+
+    # Running and loop.
+    app.exec()
+# }
+
+
+'''
+1. (__name__   == '__main__') : is OK.
+2. ('__main__' == __name__  ) : is OK.
+
+When you lose a "=", such as:
+
+3. (__name__   = '__main__')  : No error information.
+4. ('__main__' = __name__)    : Generate error information.
+
+So, we should prefer style 2.
+'''
+
+if '__main__' == __name__:
+    main()

From 4007daf6dfb8484966d66121a6a90099c86ef296 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Thu, 1 Aug 2024 17:51:50 +0800
Subject: [PATCH 12/38] [Py] Add demo screenshot.

---
 Class-3/PyQt6/Class-0/README.md          |   5 +++++
 Class-3/PyQt6/Class-1/01-hello/README.md |   5 +++++
 Class-3/PyQt6/Class-1/README.md          |   7 ++++++-
 Class-3/PyQt6/Class-1/res/01-Hello.png   | Bin 0 -> 3689 bytes
 Class-3/PyQt6/Class-2/README.md          |   9 +++++++++
 Class-3/PyQt6/README.md                  |   3 ++-
 6 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 Class-3/PyQt6/Class-1/res/01-Hello.png
 create mode 100644 Class-3/PyQt6/Class-2/README.md

diff --git a/Class-3/PyQt6/Class-0/README.md b/Class-3/PyQt6/Class-0/README.md
index 2bdbb76..3a549ed 100644
--- a/Class-3/PyQt6/Class-0/README.md
+++ b/Class-3/PyQt6/Class-0/README.md
@@ -2,3 +2,8 @@
 # Introduction
 
 Class-0 is PyQt6 documents.
+
+
+# License
+
+MIT License.
diff --git a/Class-3/PyQt6/Class-1/01-hello/README.md b/Class-3/PyQt6/Class-1/01-hello/README.md
index 3d77007..0202e9c 100644
--- a/Class-3/PyQt6/Class-1/01-hello/README.md
+++ b/Class-3/PyQt6/Class-1/01-hello/README.md
@@ -19,6 +19,11 @@ $ pip install pyqt6 -i https://pypi.tuna.tsinghua.edu.cn/simple
 ```
 
 
+# Screenshot
+
+![Hello](../res/01-Hello.png)
+
+
 # Usage
 
 ```bash
diff --git a/Class-3/PyQt6/Class-1/README.md b/Class-3/PyQt6/Class-1/README.md
index ff25514..1548d4d 100644
--- a/Class-3/PyQt6/Class-1/README.md
+++ b/Class-3/PyQt6/Class-1/README.md
@@ -1,7 +1,7 @@
 
 # Introduction
 
-Class-1 is PyQt6 base example.
+Class-1 is PyQt6 control examples.
 
 
 # Enviorment
@@ -17,3 +17,8 @@ in China:
 $ python -m pip install --upgrade pip
 $ pip install pyqt6 -i https://pypi.tuna.tsinghua.edu.cn/simple
 ```
+
+
+# License
+
+MIT License.
diff --git a/Class-3/PyQt6/Class-1/res/01-Hello.png b/Class-3/PyQt6/Class-1/res/01-Hello.png
new file mode 100644
index 0000000000000000000000000000000000000000..7a32c92f4176108349d5c1051de882d3f7ff54d3
GIT binary patch
diff --git a/Class-3/PyQt6/Class-2/README.md b/Class-3/PyQt6/Class-2/README.md
new file mode 100644
index 0000000..2a6a187
--- /dev/null
+++ b/Class-3/PyQt6/Class-2/README.md
@@ -0,0 +1,9 @@
+
+# Introduction
+
+Class-2 is PyQt6 applications.
+
+
+# License
+
+MIT License.
diff --git a/Class-3/PyQt6/README.md b/Class-3/PyQt6/README.md
index 4484733..b1e71bb 100644
--- a/Class-3/PyQt6/README.md
+++ b/Class-3/PyQt6/README.md
@@ -4,7 +4,8 @@
 QT6 for python.
 
 - Class-0 : PyQt6 documents.
-- Class-1 : PyQt6 base example.
+- Class-1 : PyQt6 control examples.
+- Class-2 : PyQt6 applications.
 
 
 # Platform

From 3d5cd48f8eb0a72d45b1fe586c9d26c536f254d2 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 2 Aug 2024 10:30:11 +0800
Subject: [PATCH 13/38] [Py] Add pyqt ui example.

---
 Class-3/PyQt6/Class-1/02-UI/README.md |  31 +++++++++++++++++++++++
 Class-3/PyQt6/Class-1/02-UI/hello.ui  |  35 ++++++++++++++++++++++++++
 Class-3/PyQt6/Class-1/02-UI/main.py   |  22 ++++++++++++++++
 Class-3/PyQt6/Class-1/res/02-UI.png   | Bin 0 -> 5980 bytes
 4 files changed, 88 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-1/02-UI/README.md
 create mode 100644 Class-3/PyQt6/Class-1/02-UI/hello.ui
 create mode 100644 Class-3/PyQt6/Class-1/02-UI/main.py
 create mode 100644 Class-3/PyQt6/Class-1/res/02-UI.png

diff --git a/Class-3/PyQt6/Class-1/02-UI/README.md b/Class-3/PyQt6/Class-1/02-UI/README.md
new file mode 100644
index 0000000..4ee89db
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/02-UI/README.md
@@ -0,0 +1,31 @@
+
+# Introduction
+
+PyQt6 QLabel UI example.
+
+
+# QT Designer
+
+Windows 11:
+
+```bash
+${Python}/Lib/site-packages/qt6_applications/Qt/bin/designer.exe
+```
+
+Linux (Ubuntu 22.04):
+
+```bash
+${Python}/lib/python3.10/site-packages/qt6_applications/Qt/bin/designer
+```
+
+
+# Screenshot
+
+![UI](../res/02-UI.png)
+
+
+# Usage
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/02-UI/hello.ui b/Class-3/PyQt6/Class-1/02-UI/hello.ui
new file mode 100644
index 0000000..1c48cf0
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/02-UI/hello.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>160</x>
+     <y>120</y>
+     <width>81</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Hello World!</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignCenter</set>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/Class-3/PyQt6/Class-1/02-UI/main.py b/Class-3/PyQt6/Class-1/02-UI/main.py
new file mode 100644
index 0000000..a2f038f
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/02-UI/main.py
@@ -0,0 +1,22 @@
+###
+# PyQt6 QLabel UI example.
+#
+# License - MIT.
+###
+
+from PyQt6 import uic
+from PyQt6.QtWidgets import QApplication
+
+
+def main():
+# {
+    app = QApplication([])
+
+    ui = uic.loadUi('hello.ui')
+    ui.show()
+
+    app.exec()
+# }
+
+if '__main__' == __name__:
+    main()
diff --git a/Class-3/PyQt6/Class-1/res/02-UI.png b/Class-3/PyQt6/Class-1/res/02-UI.png
new file mode 100644
index 0000000000000000000000000000000000000000..b8cef0dacc6dc0087a7ea421108f5fcac455657a
GIT binary patch

From 3f1a757e955e2c0231d7865cf464f589e466ed5f Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 2 Aug 2024 17:22:51 +0800
Subject: [PATCH 14/38] [PyQt] Add use ui control.

---
 Class-3/PyQt6/Class-1/02-UI/main.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Class-3/PyQt6/Class-1/02-UI/main.py b/Class-3/PyQt6/Class-1/02-UI/main.py
index a2f038f..9523f46 100644
--- a/Class-3/PyQt6/Class-1/02-UI/main.py
+++ b/Class-3/PyQt6/Class-1/02-UI/main.py
@@ -15,6 +15,8 @@ def main():
     ui = uic.loadUi('hello.ui')
     ui.show()
 
+    print(ui.label.text())
+
     app.exec()
 # }
 

From 15c2b3dcf520352d7535a901012b7a08fcfcf355 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 2 Aug 2024 18:05:10 +0800
Subject: [PATCH 15/38] [PyQt] Add documents and resource.

---
 Class-3/PyQt6/Class-0/QtWidget/QLabel.md      |   0
 .../PyQt6/Class-0/QtWidget/qt_widget_list.md  |   0
 Class-3/PyQt6/Class-0/README.md               |   5 +
 Class-3/PyQt6/Class-0/qt_api_list.md          | 119 ++++++++++++++++++
 Class-3/PyQt6/Class-1/res/03-TranslateUI.png  | Bin 0 -> 6015 bytes
 Class-3/PyQt6/Class-1/res/04-Label.png        | Bin 0 -> 5860 bytes
 Class-3/PyQt6/Class-1/res/05-PushButton.png   | Bin 0 -> 5719 bytes
 7 files changed, 124 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QLabel.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/qt_widget_list.md
 create mode 100644 Class-3/PyQt6/Class-0/qt_api_list.md
 create mode 100644 Class-3/PyQt6/Class-1/res/03-TranslateUI.png
 create mode 100644 Class-3/PyQt6/Class-1/res/04-Label.png
 create mode 100644 Class-3/PyQt6/Class-1/res/05-PushButton.png

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLabel.md b/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/PyQt6/Class-0/QtWidget/qt_widget_list.md b/Class-3/PyQt6/Class-0/QtWidget/qt_widget_list.md
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/PyQt6/Class-0/README.md b/Class-3/PyQt6/Class-0/README.md
index 3a549ed..e98e0c9 100644
--- a/Class-3/PyQt6/Class-0/README.md
+++ b/Class-3/PyQt6/Class-0/README.md
@@ -4,6 +4,11 @@
 Class-0 is PyQt6 documents.
 
 
+# Modules API
+
+[Api List](qt_api_list.md)
+
+
 # License
 
 MIT License.
diff --git a/Class-3/PyQt6/Class-0/qt_api_list.md b/Class-3/PyQt6/Class-0/qt_api_list.md
new file mode 100644
index 0000000..6c9942b
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/qt_api_list.md
@@ -0,0 +1,119 @@
+
+# Basic modules
+
+- [QtCore](https://doc.qt.io/qtforpython-6/PySide6/QtCore/index.html)
+
+- [QtGui](https://doc.qt.io/qtforpython-6/PySide6/QtGui/index.html)
+
+- [QtWidget](QtWidget/qt_widget_list.md)
+
+
+# All modules by qt for python
+
+- [QtBluetooth](https://doc.qt.io/qtforpython-6/PySide6/QtBluetooth/index.html)
+
+- [QtCharts](https://doc.qt.io/qtforpython-6/PySide6/QtCharts/index.html)
+
+- [QtConcurrent](https://doc.qt.io/qtforpython-6/PySide6/QtConcurrent/index.html)
+
+- [QtCore](https://doc.qt.io/qtforpython-6/PySide6/QtCore/index.html)
+
+- [QtDataVisualization]()
+
+- [QtDBus](https://doc.qt.io/qtforpython-6/PySide6/QtDBus/index.html)
+
+- [QtDesigner](https://doc.qt.io/qtforpython-6/PySide6/QtDesigner/index.html)
+
+- [QtGui](https://doc.qt.io/qtforpython-6/PySide6/QtGui/index.html)
+
+- [QtHelp](https://doc.qt.io/qtforpython-6/PySide6/QtHelp/index.html)
+
+- [Qt Multimedia](https://doc.qt.io/qtforpython-6/PySide6/QtMultimedia/index.html)
+
+- [Qt Multimedia Widgets](https://doc.qt.io/qtforpython-6/PySide6/QtMultimediaWidgets/index.html)
+
+- [QtNetwork](https://doc.qt.io/qtforpython-6/PySide6/QtNetwork/index.html)
+
+- [Qt Network Authorization](https://doc.qt.io/qtforpython-6/PySide6/QtNetworkAuth/index.html)
+
+- [QtNfc](https://doc.qt.io/qtforpython-6/PySide6/QtNfc/index.html)
+
+- [QtOpenGL](https://doc.qt.io/qtforpython-6/PySide6/QtOpenGL/index.html)
+
+- [QtOpenGL Widgets](https://doc.qt.io/qtforpython-6/PySide6/QtOpenGLWidgets/index.html)
+
+- [Qt Positioning](https://doc.qt.io/qtforpython-6/PySide6/QtPositioning/index.html)
+
+- [Qt PDF](https://doc.qt.io/qtforpython-6/PySide6/QtPdf/index.html)
+
+- [Qt PDF Widgets](https://doc.qt.io/qtforpython-6/PySide6/QtPdfWidgets/index.html)
+
+- [QtPrintSupport](https://doc.qt.io/qtforpython-6/PySide6/QtPrintSupport/index.html)
+
+- [QtQml](https://doc.qt.io/qtforpython-6/PySide6/QtQml/index.html)
+
+- [QtQuick](https://doc.qt.io/qtforpython-6/PySide6/QtQuick/index.html)
+
+- [QtQuickControls2](https://doc.qt.io/qtforpython-6/PySide6/QtQuickControls2/index.html)
+
+- [QtQuickTest](https://doc.qt.io/qtforpython-6/PySide6/QtQuickTest/index.html)
+
+- [QtQuickWidgets](https://doc.qt.io/qtforpython-6/PySide6/QtQuickWidgets/index.html)
+
+- [QtRemoteObjects](https://doc.qt.io/qtforpython-6/PySide6/QtRemoteObjects/index.html)
+
+- [Qt Scxml](https://doc.qt.io/qtforpython-6/PySide6/QtScxml/index.html)
+
+- [Qt Sensors](https://doc.qt.io/qtforpython-6/PySide6/QtSensors/index.html)
+
+- [Qt Serial Bus](https://doc.qt.io/qtforpython-6/PySide6/QtSerialBus/index.html)
+
+- [Qt Serial Port](https://doc.qt.io/qtforpython-6/PySide6/QtSerialPort/index.html)
+
+- [Qt Spatial Audio](https://doc.qt.io/qtforpython-6/PySide6/QtSpatialAudio/index.html)
+
+- [QtSql](https://doc.qt.io/qtforpython-6/PySide6/QtSql/index.html)
+
+- [QtStateMachine](https://doc.qt.io/qtforpython-6/PySide6/QtStateMachine/index.html)
+
+- [QtSvg](https://doc.qt.io/qtforpython-6/PySide6/QtSvg/index.html)
+
+- [QtSvgWidgets](https://doc.qt.io/qtforpython-6/PySide6/QtSvgWidgets/index.html)
+
+- [QtTest](https://doc.qt.io/qtforpython-6/PySide6/QtTest/index.html)
+
+- [QtUiTools](https://doc.qt.io/qtforpython-6/PySide6/QtUiTools/index.html)
+
+- [Qt WebChannel](https://doc.qt.io/qtforpython-6/PySide6/QtWebChannel/index.html)
+
+- [QtWebEngine Core C++ Classes](https://doc.qt.io/qtforpython-6/PySide6/QtWebEngineCore/index.html)
+
+- [QtWebEngine Widgets C++ Classes](https://doc.qt.io/qtforpython-6/PySide6/QtWebEngineWidgets/index.html)
+
+- [QtWebEngine QML Types](https://doc.qt.io/qtforpython-6/PySide6/QtWebEngineQuick/index.html)
+
+- [Qt WebSockets](https://doc.qt.io/qtforpython-6/PySide6/QtWebSockets/index.html)
+
+- [QtWidgets](https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/index.html)
+
+- [QtXml](https://doc.qt.io/qtforpython-6/PySide6/QtXml/index.html)
+
+- [Qt3DAnimation](https://doc.qt.io/qtforpython-6/PySide6/Qt3DAnimation/index.html)
+
+- [Qt3D Core](https://doc.qt.io/qtforpython-6/PySide6/Qt3DCore/index.html)
+
+- [Qt3D Extras](https://doc.qt.io/qtforpython-6/PySide6/Qt3DExtras/index.html)
+
+- [Qt3D Input](https://doc.qt.io/qtforpython-6/PySide6/Qt3DInput/index.html)
+
+- [Qt3D Logic](https://doc.qt.io/qtforpython-6/PySide6/Qt3DLogic/index.html)
+
+- [Qt3D Render](https://doc.qt.io/qtforpython-6/PySide6/Qt3DRender/index.html)
+
+- [QtAsyncio](https://doc.qt.io/qtforpython-6/PySide6/QtAsyncio/index.html)
+
+- [Qt CoAP](https://doc.qt.io/qtforpython-6/PySide6/QtCoap/index.html)
+
+- [Qt OPC UA](https://doc.qt.io/qtforpython-6/PySide6/QtOpcUa/index.html)
+
+- [Qt MQTT](https://doc.qt.io/qtforpython-6/PySide6/QtMqtt/index.html)
diff --git a/Class-3/PyQt6/Class-1/res/03-TranslateUI.png b/Class-3/PyQt6/Class-1/res/03-TranslateUI.png
new file mode 100644
index 0000000000000000000000000000000000000000..39898c8afd039c856dd2a3cedc477f7eda240e0b
GIT binary patch
diff --git a/Class-3/PyQt6/Class-1/res/04-Label.png b/Class-3/PyQt6/Class-1/res/04-Label.png
new file mode 100644
index 0000000000000000000000000000000000000000..c13910b2c743514ee647db2fad93516df08ab5a7
GIT binary patch
diff --git a/Class-3/PyQt6/Class-1/res/05-PushButton.png b/Class-3/PyQt6/Class-1/res/05-PushButton.png
new file mode 100644
index 0000000000000000000000000000000000000000..e92035bee1f6799b667c438b41d770e62377bff3
GIT binary patch

From 3f2574ccc0684ee136d04ec3d66d6c1848f401f3 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Sat, 3 Aug 2024 09:33:42 +0800
Subject: [PATCH 16/38] [PyQt] Add QLabel API doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QLabel.md | 674 +++++++++++++++++++++++
 1 file changed, 674 insertions(+)

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLabel.md b/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
index e69de29..c01637e 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
@@ -0,0 +1,674 @@
+
+# class QLabel
+
+The QLabel widget provides a text or image display.
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    The alignment of the label’s contents
+
+- [hasSelectedText](#property-hasselectedtext--bool)
+
+    Whether there is any text selected
+
+- [indent](#property-indent--int)
+
+    The label’s text indent in pixels
+
+- [margin](#property-margin--int)
+
+    The width of the margin
+
+- [openExternalLinks](#property-openexternallinks--bool)
+
+- [pixmap](#property-pixmap--qpixmap)
+
+    The label’s pixmap
+
+- [scaledContents](#property-scaledcontents--bool)
+
+    Whether the label will scale its contents to fill all available space
+
+- [selectedText](#property-selectedtext--str)
+
+    The selected text
+
+- [text](#property-text--str)
+
+    The label’s text
+
+- [textFormat](#property-textformat--qttextformat)
+
+    The label’s text format
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+- [wordWrap](#property-wordwrap--bool)
+
+    The label’s word-wrapping policy
+
+
+## Methods
+
+- [def \_\_init__()](#__init__text-parentnone-fqtwindowflags)
+
+- [def alignment()](#alignment)
+
+- [def buddy()](#buddy)
+
+- [def hasScaledContents()](#hasScaledContents)
+
+- [def hasSelectedText()](#hasselectedtext)
+
+- [def indent()](#indent)
+
+- [def margin()](#margin)
+
+- [def movie()](#movie)
+
+- [def openExternalLinks()](#openexternallinks)
+
+- [def picture()](#picture)
+
+- [def pixmap()](#pixmap)
+
+- [def selectedText()](#selectedtext)
+
+- [def selectionStart()](#selectionstart)
+
+- [def setAlignment()](#setalignmentarg__1)
+
+- [def setBuddy()](#setbuddyarg__1)
+
+- [def setIndent()](#setindentarg__1)
+
+- [def setMargin()](#setmarginarg__1)
+
+- [def setOpenExternalLinks()](#setopenexternallinksopen)
+
+- [def setScaledContents()](#setscaledcontentsarg__1)
+
+- [def setSelection()](#setselectionarg__1-arg__2)
+
+- [def setTextFormat()](#settextformatarg__1)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setWordWrap()](#setwordwrapon)
+
+- [def text()](#text)
+
+- [def textFormat()](#textformat)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+- [def wordWrap()](#wordwrap)
+
+
+## Slots
+
+- [def clear()](#clear)
+
+- [def setMovie()](#setmoviemovie)
+
+- [def setNum()](#setnumarg__1)
+
+- [def setPicture()](#setpicturearg__1)
+
+- [def setPixmap()](#setpixmaparg__1)
+
+- [def setText()](#settextarg__1)
+
+
+## Signals
+
+- [def linkActivated()](#linkactivatedlink)
+
+- [def linkHovered()](#linkhoveredlink)
+
+
+# Detailed Description
+
+QLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus mnemonic key for another widget.
+
+A QLabel can contain any of the following content types:
+
+| Content    | Setting                                                                       |
+| ---------- | ----------------------------------------------------------------------------- |
+| Plain text | Pass a QString to setText()                                                   |
+| Rich text  | Pass a QString that contains rich text to setText()                           |
+| A pixmap   | Pass a QPixmap to setPixmap()                                                 |
+| A movie    | Pass a QMovie to setMovie()                                                   |
+| A number   | Pass an int or a double to setNum() , which converts the number to plain text |
+| Nothing    | The same as an empty plain text. This is the default. Set by clear()          |
+
+When the content is changed using any of these functions, any previous content is cleared.
+
+By default, labels display left-aligned, vertically-centered text and images, where any tabs in the text to be displayed are automatically expanded. However, the look of a QLabel can be adjusted and fine-tuned in several ways.
+
+The positioning of the content within the QLabel widget area can be tuned with setAlignment() and setIndent() . Text content can also wrap lines along word boundaries with setWordWrap() . For example, this code sets up a sunken panel with a two-line text in the bottom right corner (both lines being flush with the right side of the label):
+
+```python
+label = QLabel(self)
+label.setFrameStyle(QFrame.Panel | QFrame.Sunken)
+label.setText("first line\nsecond line")
+label.setAlignment(Qt.AlignBottom | Qt.AlignRight)
+```
+
+The properties and functions QLabel inherits from QFrame can also be used to specify the widget frame to be used for any given label.
+
+A QLabel is often used as a label for an interactive widget. For this use QLabel provides a useful mechanism for adding an mnemonic (see QKeySequence) that will set the keyboard focus to the other widget (called the QLabel ‘s “buddy”). For example:
+
+```python
+phoneEdit = QLineEdit(self)
+phoneLabel = QLabel("Phone:", self)
+phoneLabel.setBuddy(phoneEdit)
+```
+
+In this example, keyboard focus is transferred to the label’s buddy (the QLineEdit ) when the user presses Alt+P. If the buddy was a button (inheriting from QAbstractButton ), triggering the mnemonic would emulate a button click.
+
+--------------------------------
+## `property alignment` : Combination of Qt.AlignmentFlag
+
+This property holds the alignment of the label’s contents.
+
+By default, the contents of the label are left-aligned and vertically-centered.
+
+Access functions:
+
+- alignment()
+- setAlignment()
+
+--------------------------------
+## `property hasSelectedText` : bool
+
+This property holds whether there is any text selected.
+
+hasSelectedText() returns true if some or all of the text has been selected by the user; otherwise returns false.
+
+By default, this property is false.
+
+Access functions:
+
+- hasSelectedText()
+
+--------------------------------
+## `property indent` : int
+
+This property holds the label’s text indent in pixels.
+
+If a label displays text, the indent applies to the left edge if alignment() is Qt::AlignLeft, to the right edge if alignment() is Qt::AlignRight, to the top edge if alignment() is Qt::AlignTop, and to the bottom edge if alignment() is Qt::AlignBottom.
+
+If indent is negative, or if no indent has been set, the label computes the effective indent as follows: If frameWidth() is 0, the effective indent becomes 0. If frameWidth() is greater than 0, the effective indent becomes half the width of the “x” character of the widget’s current font() .
+
+By default, the indent is -1, meaning that an effective indent is calculating in the manner described above.
+
+Access functions:
+
+- indent()
+- setIndent()
+
+--------------------------------
+## `property margin` : int
+
+This property holds the width of the margin.
+
+The margin is the distance between the innermost pixel of the frame and the outermost pixel of contents.
+
+The default margin is 0.
+
+Access functions:
+
+- margin()
+- setMargin()
+
+--------------------------------
+## `property openExternalLinks` : bool
+
+Specifies whether QLabel should automatically open links using QDesktopServices::openUrl() instead of emitting the linkActivated() signal.
+
+The default value is false.
+
+Access functions:
+
+- openExternalLinks()
+- setOpenExternalLinks()
+
+--------------------------------
+## `property pixmap` : QPixmap
+
+This property holds the label’s pixmap..
+
+Setting the pixmap clears any previous content. The buddy shortcut, if any, is disabled.
+
+Access functions:
+
+- pixmap()
+- setPixmap()
+
+--------------------------------
+## `property scaledContents` : bool
+
+This property holds whether the label will scale its contents to fill all available space..
+
+When enabled and the label shows a pixmap, it will scale the pixmap to fill the available space.
+
+This property’s default is false.
+
+Access functions:
+
+- hasScaledContents()
+- setScaledContents()
+
+--------------------------------
+## `property selectedText` : str
+
+This property holds the selected text.
+
+If there is no selected text this property’s value is an empty string.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- selectedText()
+
+--------------------------------
+## `property text` : str
+
+This property holds the label’s text.
+
+If no text has been set this will return an empty string. Setting the text clears any previous content.
+
+The text will be interpreted either as plain text or as rich text, depending on the text format setting; see setTextFormat() . The default setting is Qt::AutoText; i.e. QLabel will try to auto-detect the format of the text set. See Supported HTML Subset for the definition of rich text.
+
+If a buddy has been set, the buddy mnemonic key is updated from the new text.
+
+Note that QLabel is well-suited to display small rich text documents, such as small documents that get their document specific settings (font, text color, link color) from the label’s palette and font properties. For large documents, use QTextEdit in read-only mode instead. QTextEdit can also provide a scroll bar when necessary.
+
+Access functions:
+
+- text()
+- setText()
+
+--------------------------------
+## `property textFormat` : Qt.TextFormat
+
+This property holds the label’s text format.
+
+See the Qt::TextFormat enum for an explanation of the possible options.
+
+The default format is Qt::AutoText.
+
+Access functions:
+
+- textFormat()
+- setTextFormat()
+
+--------------------------------
+## `property textInteractionFlags` : Combination of Qt.TextInteractionFlag
+
+Specifies how the label should interact with user input if it displays text.
+
+If the flags contain Qt::LinksAccessibleByKeyboard the focus policy is also automatically set to Qt::StrongFocus. If Qt::TextSelectableByKeyboard is set then the focus policy is set to Qt::ClickFocus.
+
+The default value is Qt::LinksAccessibleByMouse.
+
+Access functions:
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+--------------------------------
+## `property wordWrap` : bool
+
+This property holds the label’s word-wrapping policy.
+
+If this property is true then label text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all.
+
+By default, word wrap is disabled.
+
+Access functions:
+
+- wordWrap()
+- setWordWrap()
+
+--------------------------------
+## `__init__(text[, parent=None[, f=Qt.WindowFlags()]])`
+
+PARAMETERS:
+
+- text – str
+- parent – QWidget
+- f – Combination of WindowType
+
+Constructs a label that displays the text, text.
+
+The parent and widget flag f, arguments are passed to the QFrame constructor.
+
+--------------------------------
+## `__init__([parent=None[, f=Qt.WindowFlags()]])`
+
+PARAMETERS:
+
+- parent – QWidget
+- f – Combination of WindowType
+
+Constructs an empty label.
+
+The parent and widget flag f, arguments are passed to the QFrame constructor.
+
+--------------------------------
+## `alignment()`
+
+RETURN TYPE: Combination of AlignmentFlag
+
+Getter of property alignment.
+
+--------------------------------
+## `buddy()`
+
+RETURN TYPE: QWidget
+
+Returns this label’s buddy, or nullptr if no buddy is currently set.
+
+--------------------------------
+## `clear()`
+
+Clears any label contents.
+
+--------------------------------
+## `hasScaledContents()`
+
+RETURN TYPE: bool
+
+Getter of property scaledContents.
+
+--------------------------------
+## `hasSelectedText()`
+
+RETURN TYPE: bool
+
+Getter of property hasSelectedText.
+
+--------------------------------
+## `indent()`
+
+RETURN TYPE: int
+
+Getter of property indent.
+
+--------------------------------
+## `linkActivated(link)`
+
+PARAMETERS:
+
+- link – str
+
+This signal is emitted when the user clicks a link. The URL referred to by the anchor is passed in link.
+
+--------------------------------
+## `linkHovered(link)`
+
+PARAMETERS:
+
+- link – str
+
+This signal is emitted when the user hovers over a link. The URL referred to by the anchor is passed in link.
+
+--------------------------------
+## `margin()`
+
+RETURN TYPE: int
+
+Getter of property margin.
+
+--------------------------------
+## `movie()`
+
+RETURN TYPE: QMovie
+
+Returns a pointer to the label’s movie, or nullptr if no movie has been set.
+
+--------------------------------
+## `openExternalLinks()`
+
+RETURN TYPE: bool
+
+Getter of property openExternalLinks.
+
+--------------------------------
+## `picture()`
+
+RETURN TYPE: QPicture
+
+Returns the label’s picture.
+
+--------------------------------
+## `pixmap()`
+
+RETURN TYPE: QPixmap
+
+Getter of property pixmap.
+
+--------------------------------
+## `selectedText()`
+
+RETURN TYPE: str
+
+Getter of property selectedText.
+
+--------------------------------
+## `selectionStart()`
+
+RETURN TYPE: int
+
+selectionStart() returns the index of the first selected character in the label or -1 if no text is selected.
+
+--------------------------------
+## `setAlignment(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – Combination of AlignmentFlag
+
+Setter of property alignment.
+
+--------------------------------
+## `setBuddy(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – QWidget
+
+Sets this label’s buddy to buddy.
+
+When the user presses the shortcut key indicated by this label, the keyboard focus is transferred to the label’s buddy widget.
+
+The buddy mechanism is only available for QLabels that contain text in which one character is prefixed with an ampersand, ‘&’. This character is set as the shortcut key. See the QKeySequence::mnemonic() documentation for details (to display an actual ampersand, use ‘&&’).
+
+In a dialog, you might create two data entry widgets and a label for each, and set up the geometry layout so each label is just to the left of its data entry widget (its “buddy”), for example:
+
+```python
+nameEdit = QLineEdit(self)
+QLabel nameLabel = QLabel("Name:", self)
+nameLabel.setBuddy(nameEdit)
+phoneEdit = QLineEdit(self)
+QLabel phoneLabel = QLabel("Phone:", self)
+phoneLabel.setBuddy(phoneEdit)
+# (layout setup not shown)
+```
+
+With the code above, the focus jumps to the Name field when the user presses Alt+N, and to the Phone field when the user presses Alt+P.
+
+To unset a previously set buddy, call this function with buddy set to nullptr.
+
+--------------------------------
+## `setIndent(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – int
+
+Setter of property indent.
+
+--------------------------------
+## `setMargin(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – int
+
+Setter of property margin.
+
+--------------------------------
+## `setMovie(movie)`
+
+PARAMETERS:
+
+- movie – QMovie
+
+Sets the label contents to movie. Any previous content is cleared. The label does NOT take ownership of the movie.
+
+The buddy shortcut, if any, is disabled.
+
+--------------------------------
+## `setNum(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – float
+
+This is an overloaded function.
+
+Sets the label contents to plain text containing the textual representation of double num. Any previous content is cleared. Does nothing if the double’s string representation is the same as the current contents of the label.
+
+The buddy shortcut, if any, is disabled.
+
+--------------------------------
+## `setNum(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – int
+
+Sets the label contents to plain text containing the textual representation of integer num. Any previous content is cleared. Does nothing if the integer’s string representation is the same as the current contents of the label.
+
+The buddy shortcut, if any, is disabled.
+
+--------------------------------
+## `setOpenExternalLinks(open)`
+
+PARAMETERS:
+
+- open – bool
+
+Setter of property openExternalLinks.
+
+--------------------------------
+## `setPicture(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – QPicture
+
+Sets the label contents to picture. Any previous content is cleared.
+
+The buddy shortcut, if any, is disabled.
+
+--------------------------------
+## `setPixmap(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – QPixmap
+
+Setter of property pixmap.
+
+--------------------------------
+## `setScaledContents(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – bool
+
+Setter of property scaledContents.
+
+--------------------------------
+## `setSelection(arg__1, arg__2)`
+
+P1ARAMETERS:
+
+- arg__1 – int
+- arg__2 – int
+
+Selects text from position start and for length characters.
+
+--------------------------------
+## `setText(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – str
+
+Setter of property text.
+
+--------------------------------
+## `setTextFormat(arg__1)`
+
+PARAMETERS:
+
+- arg__1 – TextFormat
+
+Setter of property textFormat.
+
+--------------------------------
+## `setTextInteractionFlags(flags)`
+
+PARAMETERS:
+
+- flags – Combination of TextInteractionFlag
+
+Setter of property textInteractionFlags.
+
+--------------------------------
+## `setWordWrap(on)`
+
+PARAMETERS:
+
+- on – bool
+
+Setter of property wordWrap.
+
+--------------------------------
+## `text()`
+
+RETURN TYPE: str
+
+Getter of property text.
+
+--------------------------------
+## `textFormat()`
+
+RETURN TYPE: TextFormat
+
+Getter of property textFormat.
+
+--------------------------------
+## `textInteractionFlags()`
+
+RETURN TYPE: Combination of TextInteractionFlag
+
+Getter of property textInteractionFlags.
+
+--------------------------------
+## `wordWrap()`
+
+RETURN TYPE: bool
+
+Getter of property wordWrap.

From 0bc381538ff026ca77a8901dfa5affbdf1994739 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Sun, 4 Aug 2024 23:34:05 +0800
Subject: [PATCH 17/38] [PyQt] Add QPushButton API doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QPushButton.md | 279 ++++++++++++++++++
 1 file changed, 279 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QPushButton.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md
new file mode 100644
index 0000000..feaf55b
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md
@@ -0,0 +1,279 @@
+
+# class QPushButton
+
+The QPushButton widget provides a command button.
+
+
+# Synopsis
+
+## Properties
+
+- [autoDefault](#property-autodefault--bool)
+
+    Whether the push button is an auto default button.
+
+- [default](#property-default--bool)
+
+    Whether the push button is the default button.
+
+- [flat](#property-flat--bool)
+
+    Whether the button border is raised.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def autoDefault()](#autodefault)
+
+- [def isDefault()](#isdefault)
+
+- [def isFlat()](#isflat)
+
+- [def menu()](#menu)
+
+- [def setAutoDefault()](#setautodefaultarg__1)
+
+- [def setDefault()](#setdefaultarg__1)
+
+- [def setFlat()](#setflatarg__1)
+
+- [def setMenu()](#setmenumenu)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def showMenu()](#showmenu)
+
+
+# Detailed Description
+
+The push button, or command button, is perhaps the most commonly used widget in any graphical user interface. Push (click) a button to command the computer to perform some action, or to answer a question. Typical buttons are OK, Apply, Cancel, Close, Yes, No and Help.
+
+A command button is rectangular and typically displays a text label describing its action. A shortcut key can be specified by preceding the preferred character with an ampersand in the text. For example:
+
+```python
+button = QPushButton("Download", self)
+```
+
+In this example the shortcut is Alt+D. See the QShortcut documentation for details (to display an actual ampersand, use ‘&&’).
+
+Push buttons display a textual label, and optionally a small icon. These can be set using the constructors and changed later using setText() and setIcon() . If the button is disabled, the appearance of the text and icon will be manipulated with respect to the GUI style to make the button look “disabled”.
+
+A push button emits the signal clicked() when it is activated by the mouse, the Spacebar or by a keyboard shortcut. Connect to this signal to perform the button’s action. Push buttons also provide less commonly used signals, for example pressed() and released() .
+
+Command buttons in dialogs are by default auto-default buttons, i.e., they become the default push button automatically when they receive the keyboard input focus. A default button is a push button that is activated when the user presses the Enter or Return key in a dialog. You can change this with setAutoDefault() . Note that auto-default buttons reserve a little extra space which is necessary to draw a default-button indicator. If you do not want this space around your buttons, call setAutoDefault (false).
+
+Being so central, the button widget has grown to accommodate a great many variations in the past decade. The Microsoft style guide now shows about ten different states of Windows push buttons and the text implies that there are dozens more when all the combinations of features are taken into consideration.
+
+The most important modes or states are:
+
+- Available or not (grayed out, disabled).
+
+- Standard push button, toggling push button or menu button.
+
+- On or off (only for toggling push buttons).
+
+- Default or normal. The default button in a dialog can generally be “clicked” using the Enter or Return key.
+
+- Auto-repeat or not.
+
+- Pressed down or not.
+
+As a general rule, use a push button when the application or dialog window performs an action when the user clicks on it (such as Apply, Cancel, Close and Help) and when the widget is supposed to have a wide, rectangular shape with a text label. Small, typically square buttons that change the state of the window rather than performing an action (such as the buttons in the top-right corner of the QFileDialog ) are not command buttons, but tool buttons. Qt provides a special class ( QToolButton ) for these buttons.
+
+If you need toggle behavior (see setCheckable() ) or a button that auto-repeats the activation signal when being pushed down like the arrows in a scroll bar (see setAutoRepeat() ), a command button is probably not what you want. When in doubt, use a tool button.
+
+A variation of a command button is a menu button. These provide not just one command, but several, since when they are clicked they pop up a menu of options. Use the method setMenu() to associate a popup menu with a push button.
+
+Other classes of buttons are option buttons (see QRadioButton ) and check boxes (see QCheckBox ).
+
+In Qt, the QAbstractButton base class provides most of the modes and other API, and QPushButton provides GUI logic. See QAbstractButton for more information about the API.
+
+
+--------------------------------
+### property autoDefault : bool
+
+This property holds whether the push button is an auto default button.
+
+If this property is set to true then the push button is an auto default button.
+
+In some GUI styles a default button is drawn with an extra frame around it, up to 3 pixels or more. Qt automatically keeps this space free around auto-default buttons, i.e., auto-default buttons may have a slightly larger size hint.
+
+This property’s default is true for buttons that have a QDialog parent; otherwise it defaults to false.
+
+See the default property for details of how default and auto-default interact.
+
+Access functions:
+
+- autoDefault()
+- setAutoDefault()
+
+
+--------------------------------
+## property default : bool
+
+This property holds whether the push button is the default button.
+
+Default and autodefault buttons decide what happens when the user presses enter in a dialog.
+
+A button with this property set to true (i.e., the dialog’s default button,) will automatically be pressed when the user presses enter, with one exception: if an autoDefault button currently has focus, the autoDefault button is pressed. When the dialog has autoDefault buttons but no default button, pressing enter will press either the autoDefault button that currently has focus, or if no button has focus, the next autoDefault button in the focus chain.
+
+In a dialog, only one push button at a time can be the default button. This button is then displayed with an additional frame (depending on the GUI style).
+
+The default button behavior is provided only in dialogs. Buttons can always be clicked from the keyboard by pressing Spacebar when the button has focus.
+
+If the default property is set to false on the current default button while the dialog is visible, a new default will automatically be assigned the next time a push button in the dialog receives focus.
+
+This property’s default is false.
+
+Access functions:
+
+- isDefault()
+- setDefault()
+
+
+--------------------------------
+## property flat : bool
+
+This property holds whether the button border is raised.
+
+This property’s default is false. If this property is set, most styles will not paint the button background unless the button is being pressed. setAutoFillBackground() can be used to ensure that the background is filled using the QPalette::Button brush.
+
+Access functions:
+
+- isFlat()
+- setFlat()
+
+
+--------------------------------
+## __init__([parent=None])
+
+PARAMETERS:
+
+- parent – QWidget
+
+Constructs a push button with no text and a parent.
+
+
+--------------------------------
+## __init__(icon, text[, parent=None])
+
+PARAMETERS:
+
+- icon – QIcon
+- text – str
+- parent – QWidget
+
+Constructs a push button with an icon and a text, and a parent.
+
+Note that you can also pass a QPixmap object as an icon (thanks to the implicit type conversion provided by C++).
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+PARAMETERS:
+
+- text – str
+- parent – QWidget
+
+Constructs a push button with the parent parent and the text text.
+
+
+--------------------------------
+## autoDefault()
+
+RETURN TYPE: bool
+
+Getter of property autoDefault.
+
+
+--------------------------------
+## initStyleOption(option)
+
+PARAMETERS:
+
+- option – QStyleOptionButton
+
+Initialize option with the values from this QPushButton . This method is useful for subclasses when they need a QStyleOptionButton , but don’t want to fill in all the information themselves.
+
+
+--------------------------------
+## isDefault()
+
+RETURN TYPE: bool
+
+Getter of property default.
+
+
+--------------------------------
+## isFlat()
+
+RETURN TYPE: bool
+
+Getter of property flat.
+
+
+--------------------------------
+## menu()
+
+RETURN TYPE: QMenu
+
+Returns the button’s associated popup menu or None if no popup menu has been set.
+
+
+--------------------------------
+## setAutoDefault(arg__1)
+
+PARAMETERS:
+
+- arg__1 – bool
+
+Setter of property autoDefault.
+
+
+--------------------------------
+## setDefault(arg__1)
+
+PARAMETERS:
+
+- arg__1 – bool
+
+Setter of property default.
+
+
+--------------------------------
+## setFlat(arg__1)
+
+PARAMETERS:
+
+- arg__1 – bool
+
+Setter of property flat.
+
+
+--------------------------------
+## setMenu(menu)
+
+PARAMETERS:
+
+- menu – QMenu
+
+Associates the popup menu menu with this push button. This turns the button into a menu button, which in some styles will produce a small triangle to the right of the button’s text.
+
+Ownership of the menu is not transferred to the push button.
+
+A push button with popup menus shown in the Fusion widget style .
+
+
+--------------------------------
+## showMenu()
+
+Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.

From 28e7e2c317b12441ecef7d430d96456caeccec40 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 10:40:56 +0800
Subject: [PATCH 18/38] [PyQt] Add QLabel Chinese doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md | 674 ++++++++++++++++++++
 1 file changed, 674 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md
new file mode 100644
index 0000000..38b377d
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md
@@ -0,0 +1,674 @@
+
+# class QLabel
+
+QLabel 小部件提供文本或图像显示。
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    标签内容的对齐方式。
+
+- [hasSelectedText](#property-hasselectedtext--bool)
+
+    是否选择了任何文本。
+
+- [indent](#property-indent--int)
+
+    标签的文本缩进（以像素为单位）。
+
+- [margin](#property-margin--int)
+
+    边距的宽度。
+
+- [openExternalLinks](#property-openexternallinks--bool)
+
+- [pixmap](#property-pixmap--qpixmap)
+
+    标签的像素图。
+
+- [scaledContents](#property-scaledcontents--bool)
+
+    标签是否会缩放其内容以填充所有可用空间。
+
+- [selectedText](#property-selectedtext--str)
+
+    选定的文本。
+
+- [text](#property-text--str)
+
+    标签的文本。
+
+- [textFormat](#property-textformat--qttextformat)
+
+    标签的文本格式。
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+- [wordWrap](#property-wordwrap--bool)
+
+    标签的自动换行策略。
+
+
+## Methods
+
+- [def \_\_init__()](#__init__text-parentnone-fqtwindowflags)
+
+- [def alignment()](#alignment)
+
+- [def buddy()](#buddy)
+
+- [def hasScaledContents()](#hasScaledContents)
+
+- [def hasSelectedText()](#hasselectedtext)
+
+- [def indent()](#indent)
+
+- [def margin()](#margin)
+
+- [def movie()](#movie)
+
+- [def openExternalLinks()](#openexternallinks)
+
+- [def picture()](#picture)
+
+- [def pixmap()](#pixmap)
+
+- [def selectedText()](#selectedtext)
+
+- [def selectionStart()](#selectionstart)
+
+- [def setAlignment()](#setalignmentarg__1)
+
+- [def setBuddy()](#setbuddyarg__1)
+
+- [def setIndent()](#setindentarg__1)
+
+- [def setMargin()](#setmarginarg__1)
+
+- [def setOpenExternalLinks()](#setopenexternallinksopen)
+
+- [def setScaledContents()](#setscaledcontentsarg__1)
+
+- [def setSelection()](#setselectionarg__1-arg__2)
+
+- [def setTextFormat()](#settextformatarg__1)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setWordWrap()](#setwordwrapon)
+
+- [def text()](#text)
+
+- [def textFormat()](#textformat)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+- [def wordWrap()](#wordwrap)
+
+
+## Slots
+
+- [def clear()](#clear)
+
+- [def setMovie()](#setmoviemovie)
+
+- [def setNum()](#setnumarg__1)
+
+- [def setPicture()](#setpicturearg__1)
+
+- [def setPixmap()](#setpixmaparg__1)
+
+- [def setText()](#settextarg__1)
+
+
+## Signals
+
+- [def linkActivated()](#linkactivatedlink)
+
+- [def linkHovered()](#linkhoveredlink)
+
+
+# Detailed Description
+
+QLabel 用于显示文本或图像。不提供用户交互功能。标签的外观可以以多种方式配置，并且可用于为另一个小部件指定焦点助记键。
+
+QLabel 可以包含以下任意内容类型：
+
+| Content    | Setting                                                                       |
+| ---------- | ----------------------------------------------------------------------------- |
+| Plain text | 将 QString 传递给 setText()                                                   |
+| Rich text  | 将包含富文本的 QString 传递给 setText()                           |
+| A pixmap   | 将 QPixmap 传递给 setPixmap()                                                 |
+| A movie    | 将 QMovie 传递给 setMovie()                                                   |
+| A number   | 将 int 或 double 传递给 setNum() ，它将数字转换为纯文本 |
+| Nothing    | 与空纯文本相同。这是默认值。通过 clear() 设置          |
+
+当使用其中任何一项功能更改内容时，所有先前的内容都会被清除。
+
+默认情况下，标签显示左对齐、垂直居中的文本和图像，其中要显示的文本中的任何选项卡都会自动展开。但是，QLabel 的外观可以通过多种方式进行调整和微调。
+
+可以使用 setAlignment() 和 setIndent() 调整 QLabel 小部件区域内内容的定位。文本内容还可以使用 setWordWrap() 沿单词边界换行。例如，此代码设置了一个凹陷面板，右下角有两行文本（两行都与标签的右侧齐平）：
+
+```python
+label = QLabel(self)
+label.setFrameStyle(QFrame.Panel | QFrame.Sunken)
+label.setText("first line\nsecond line")
+label.setAlignment(Qt.AlignBottom | Qt.AlignRight)
+```
+
+QLabel 从 QFrame 继承的属性和函数也可用于指定用于任何给定标签的小部件框架。
+
+QLabel 通常用作交互式小部件的标签。对于此用途，QLabel 提供了一种有用的机制来添加助记符（参见 QKeySequence），该助记符将键盘焦点设置到另一个小部件（称为 QLabel 的“伙伴”）。例如：
+
+```python
+phoneEdit = QLineEdit(self)
+phoneLabel = QLabel("Phone:", self)
+phoneLabel.setBuddy(phoneEdit)
+```
+
+在此示例中，当用户按下 Alt+P 时，键盘焦点将转移到标签的伙伴（QLineEdit）。如果伙伴是一个按钮（继承自 QAbstractButton），则触发助记符将模拟按钮单击。
+
+--------------------------------
+## `property alignment` : Combination of Qt.AlignmentFlag
+
+此属性保存标签内容的对齐方式。
+
+默认情况下，标签的内容是左对齐且垂直居中。
+
+访问功能：
+
+- alignment()
+- setAlignment()
+
+--------------------------------
+## `property hasSelectedText` : bool
+
+此属性保存的是是否有任何文本被选中。
+
+如果用户选择了部分或全部文本，则 hasSelectedText() 返回 true；否则返回 false。
+
+默认情况下，此属性为 false。
+
+访问功能：
+
+- hasSelectedText()
+
+--------------------------------
+## `property indent` : int
+
+此属性保存标签的文本缩进（以像素为单位）。
+
+如果标签显示文本，则如果 alignment() 为 Qt::AlignLeft，则缩进应用于左边缘；如果 alignment() 为 Qt::AlignRight，则缩进应用于右边缘；如果 alignment() 为 Qt::AlignTop，则缩进应用于上边缘；如果 alignment() 为 Qt::AlignBottom，则缩进应用于下边缘。
+
+如果缩进为负数，或者未设置缩进，则标签将按如下方式计算有效缩进：如果 frameWidth() 为 0，则有效缩进为 0。如果 frameWidth() 大于 0，则有效缩进为小部件当前 font() 的“x”字符宽度的一半。
+
+默认情况下，缩进为 -1，这意味着有效缩进按上面描述的方式计算。
+
+访问功能：
+
+- indent()
+- setIndent()
+
+--------------------------------
+## `property margin` : int
+
+此属性保存边距的宽度。
+
+边距是框架最内像素与内容最外像素之间的距离。
+
+默认边距为 0。
+
+访问功能：
+
+- margin()
+- setMargin()
+
+--------------------------------
+## `property openExternalLinks` : bool
+
+指定 QLabel 是否应使用 QDesktopServices::openUrl() 自动打开链接，而不是发出 linkActivated() 信号。
+
+默认值为 false。
+
+访问功能：
+
+- openExternalLinks()
+- setOpenExternalLinks()
+
+--------------------------------
+## `property pixmap` : QPixmap
+
+此属性保存标签的像素图。
+
+设置像素图会清除所有先前的内容。好友快捷方式（如果有）将被禁用。
+
+访问功能：
+
+- pixmap()
+- setPixmap()
+
+--------------------------------
+## `property scaledContents` : bool
+
+此属性保存标签是否缩放其内容以填充所有可用空间。
+
+启用后，标签​​会显示像素图，它将缩放像素图以填充可用空间。
+
+此属性的默认值为 false。
+
+访问功能：
+
+- hasScaledContents()
+- setScaledContents()
+
+--------------------------------
+## `property selectedText` : str
+
+此属性保存选定的文本。
+
+如果没有选定的文本，则此属性的值为空字符串。
+
+默认情况下，此属性包含一个空字符串。
+
+访问功能：
+
+- selectedText()
+
+--------------------------------
+## `property text` : str
+
+此属性保存标签的文本。
+
+如果未设置文本，则将返回一个空字符串。设置文本将清除所有先前的内容。
+
+根据文本格式设置，文本将被解释为纯文本或富文本；请参阅 setTextFormat() 。默认设置为 Qt::AutoText；即 QLabel 将尝试自动检测文本集的格式。有关富文本的定义，请参阅支持的 HTML 子集。
+
+如果已设置好友，则好友助记键将从新文本更新。
+
+请注意，QLabel 非常适合显示小型富文本文档，例如从标签的调色板和字体属性获取其文档特定设置（字体、文本颜色、链接颜色）的小型文档。对于大型文档，请改用只读模式的 QTextEdit。QTextEdit 还可以在必要时提供滚动条。
+
+访问功能：
+
+- text()
+- setText()
+
+--------------------------------
+## `property textFormat` : Qt.TextFormat
+
+此属性保存标签的文本格式。
+
+有关可能选项的说明，请参阅 Qt::TextFormat 枚举。
+
+默认格式为 Qt::AutoText。
+
+访问功能：
+
+- textFormat()
+- setTextFormat()
+
+--------------------------------
+## `property textInteractionFlags` : Combination of Qt.TextInteractionFlag
+
+指定标签在显示文本时应如何与用户输入交互。
+
+如果标志包含 Qt::LinksAccessibleByKeyboard，则焦点策略也会自动设置为 Qt::StrongFocus。 如果设置了 Qt::TextSelectableByKeyboard，则焦点策略将设置为 Qt::ClickFocus。
+
+默认值为 Qt::LinksAccessibleByMouse。
+
+访问功能：
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+--------------------------------
+## `property wordWrap` : bool
+
+此属性保存标签的自动换行策略。
+
+如果此属性为真，则标签文本在必要时在单词中断处换行；否则根本不换行。
+
+默认情况下，自动换行处于禁用状态。
+
+访问功能：
+
+- wordWrap()
+- setWordWrap()
+
+--------------------------------
+## `__init__(text[, parent=None[, f=Qt.WindowFlags()]])`
+
+参数: 
+
+- text – str
+- parent – QWidget
+- f – Combination of WindowType
+
+构造一个显示文本 text 的标签。
+
+父级和小部件标志 f 参数被传递给 QFrame 构造函数。
+
+--------------------------------
+## `__init__([parent=None[, f=Qt.WindowFlags()]])`
+
+参数: 
+
+- parent – QWidget
+- f – Combination of WindowType
+
+构造一个空标签。
+
+父级和小部件标志 f 参数被传递给 QFrame 构造函数。
+
+--------------------------------
+## `alignment()`
+
+返回值: Combination of AlignmentFlag
+
+属性对齐的获取器。
+
+--------------------------------
+## `buddy()`
+
+返回值: QWidget
+
+返回此标签的伙伴，如果当前未设置伙伴，则返回 nullptr。
+
+--------------------------------
+## `clear()`
+
+清除所有标签内容。
+
+--------------------------------
+## `hasScaledContents()`
+
+返回值: bool
+
+属性 scaledContents 的获取器。
+
+--------------------------------
+## `hasSelectedText()`
+
+返回值: bool
+
+属性 hasSelectedText 的获取器。
+
+--------------------------------
+## `indent()`
+
+返回值: int
+
+属性缩进的获取器。
+
+--------------------------------
+## `linkActivated(link)`
+
+参数: 
+
+- link – str
+
+当用户点击链接时，会发出此信号。锚点所指向的 URL 在链接中传递。
+
+--------------------------------
+## `linkHovered(link)`
+
+参数: 
+
+- link – str
+
+当用户将鼠标悬停在链接上时，会发出此信号。锚点所指的 URL 在链接中传递。
+
+--------------------------------
+## `margin()`
+
+返回值: int
+
+属性 margin 的获取器。
+
+--------------------------------
+## `movie()`
+
+返回值: QMovie
+
+返回指向标签电影的指针，如果未设置电影，则返回 nullptr。
+
+--------------------------------
+## `openExternalLinks()`
+
+返回值: bool
+
+属性 openExternalLinks 的获取器。
+
+--------------------------------
+## `picture()`
+
+返回值: QPicture
+
+返回标签的图片。
+
+--------------------------------
+## `pixmap()`
+
+返回值: QPixmap
+
+属性 pixmap 的获取器。
+
+--------------------------------
+## `selectedText()`
+
+返回值: str
+
+属性 selectedText 的获取器。
+
+--------------------------------
+## `selectionStart()`
+
+返回值: int
+
+SelectionStart() 返回标签中第一个选定字符的索引，如果没有选定文本，则返回 -1。
+
+--------------------------------
+## `setAlignment(arg__1)`
+
+参数: 
+
+- arg__1 – Combination of AlignmentFlag
+
+属性对齐的设置器。
+
+--------------------------------
+## `setBuddy(arg__1)`
+
+参数: 
+
+- arg__1 – QWidget
+
+将此标签的伙伴设置为 buddy。
+
+当用户按下此标签指示的快捷键时，键盘焦点将转移到标签的伙伴小部件。
+
+伙伴机制仅适用于包含一个字符以“&”为前缀的文本的 QLabels。此字符设置为快捷键。有关详细信息，请参阅 QKeySequence::mnemonic() 文档（要显示实际的“&”符号，请使用“&&”）。
+
+在对话框中，您可以创建两个数据输入小部件并为每个小部件创建一个标签，并设置几何布局，以便每个标签都位于其数据输入小部件（其“伙伴”）的左侧，例如：
+
+```python
+nameEdit = QLineEdit(self)
+QLabel nameLabel = QLabel("Name:", self)
+nameLabel.setBuddy(nameEdit)
+phoneEdit = QLineEdit(self)
+QLabel phoneLabel = QLabel("Phone:", self)
+phoneLabel.setBuddy(phoneEdit)
+# (layout setup not shown)
+```
+
+使用上述代码，当用户按下 Alt+N 时，焦点会跳转到“姓名”字段，当用户按下 Alt+P 时，焦点会跳转到“电话”字段。
+
+要取消之前设置的好友，请调用此函数并将好友设置为 nullptr。
+
+--------------------------------
+## `setIndent(arg__1)`
+
+参数: 
+
+- arg__1 – int
+
+属性缩进的设置者。
+
+--------------------------------
+## `setMargin(arg__1)`
+
+参数: 
+
+- arg__1 – int
+
+属性 margin 的设置者。
+
+--------------------------------
+## `setMovie(movie)`
+
+参数: 
+
+- movie – QMovie
+
+将标签内容设置为电影。所有先前的内容都将被清除。标签不会拥有该电影的所有权。
+
+好友快捷方式（如果有）将被禁用。
+
+--------------------------------
+## `setNum(arg__1)`
+
+参数: 
+
+- arg__1 – float
+
+这是一个重载函数。
+
+将标签内容设置为包含双精度数文本表示的纯文本。任何先前的内容都将被清除。如果双精度数的字符串表示与标签的当前内容相同，则不执行任何操作。
+
+好友快捷方式（如果有）被禁用。
+
+--------------------------------
+## `setNum(arg__1)`
+
+参数: 
+
+- arg__1 – int
+
+将标签内容设置为包含整数 num 的文本表示的纯文本。任何先前的内容都将被清除。如果整数的字符串表示与标签的当前内容相同，则不执行任何操作。
+
+好友快捷方式（如果有）被禁用。
+
+--------------------------------
+## `setOpenExternalLinks(open)`
+
+参数: 
+
+- open – bool
+
+属性 openExternalLinks 的设置者。
+
+--------------------------------
+## `setPicture(arg__1)`
+
+参数: 
+
+- arg__1 – QPicture
+
+将标签内容设置为图片。所有先前的内容都将被清除。
+
+好友快捷方式（如果有）将被禁用。
+
+--------------------------------
+## `setPixmap(arg__1)`
+
+参数: 
+
+- arg__1 – QPixmap
+
+属性 pixmap 的设置者。
+
+--------------------------------
+## `setScaledContents(arg__1)`
+
+参数: 
+
+- arg__1 – bool
+
+scaledContents 属性的设置者。
+
+--------------------------------
+## `setSelection(arg__1, arg__2)`
+
+P1ARAMETERS:
+
+- arg__1 – int
+- arg__2 – int
+
+从开始位置选择长度为字符的文本。
+
+--------------------------------
+## `setText(arg__1)`
+
+参数: 
+
+- arg__1 – str
+
+属性文本的设置者。
+
+--------------------------------
+## `setTextFormat(arg__1)`
+
+参数: 
+
+- arg__1 – TextFormat
+
+属性 textFormat 的设置者。
+
+--------------------------------
+## `setTextInteractionFlags(flags)`
+
+参数: 
+
+- flags – Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的设置者。
+
+--------------------------------
+## `setWordWrap(on)`
+
+参数: 
+
+- on – bool
+
+属性 wordWrap 的设置器。
+
+--------------------------------
+## `text()`
+
+返回值: str
+
+属性文本的获取器。
+
+--------------------------------
+## `textFormat()`
+
+返回值: TextFormat
+
+属性 textFormat 的获取方法。
+
+--------------------------------
+## `textInteractionFlags()`
+
+返回值: Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的获取器。
+
+--------------------------------
+## `wordWrap()`
+
+返回值: bool
+
+属性 wordWrap 的获取方法。

From 7c15be83bbd1f500307f31c95263bd84a996a17e Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 10:50:47 +0800
Subject: [PATCH 19/38] [PyQt] Add QPushButton Chinese doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QLabel.md      |   2 +
 .../PyQt6/Class-0/QtWidget/QPushButton.CN.md  | 279 ++++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QPushButton.md |   4 +-
 3 files changed, 284 insertions(+), 1 deletion(-)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLabel.md b/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
index c01637e..39c340a 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLabel.md
@@ -1,4 +1,6 @@
 
+[Chinese Doc](QLabel.CN.md)
+
 # class QLabel
 
 The QLabel widget provides a text or image display.
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md
new file mode 100644
index 0000000..e4d4c4b
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md
@@ -0,0 +1,279 @@
+
+# class QPushButton
+
+QPushButton 小部件提供了一个命令按钮。
+
+
+# Synopsis
+
+## Properties
+
+- [autoDefault](#property-autodefault--bool)
+
+    该按钮是否是自动默认按钮。
+
+- [default](#property-default--bool)
+
+    该按钮是否是默认按钮。
+
+- [flat](#property-flat--bool)
+
+    按钮边框是否凸起。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def autoDefault()](#autodefault)
+
+- [def isDefault()](#isdefault)
+
+- [def isFlat()](#isflat)
+
+- [def menu()](#menu)
+
+- [def setAutoDefault()](#setautodefaultarg__1)
+
+- [def setDefault()](#setdefaultarg__1)
+
+- [def setFlat()](#setflatarg__1)
+
+- [def setMenu()](#setmenumenu)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def showMenu()](#showmenu)
+
+
+# Detailed Description
+
+按钮或命令按钮可能是图形用户界面中最常用的小部件。按下（单击）按钮可命令计算机执行某些操作或回答问题。典型的按钮有确定、应用、取消、关闭、是、否和帮助。
+
+命令按钮是矩形的，通常显示描述其操作的文本标签。可以通过在文本中将首选字符前面加上“与”符号来指定快捷键。例如：
+
+```python
+button = QPushButton("Download", self)
+```
+
+在此示例中，快捷键为 Alt+D。有关详细信息，请参阅 QShortcut 文档（要显示实际的 & 符号，请使用“&&”）。
+
+按钮显示文本标签，并可选显示小图标。可以使用构造函数设置这些，然后使用 setText() 和 setIcon() 进行更改。如果按钮被禁用，则将根据 GUI 样式操纵文本和图标的外观，以使按钮看起来“已禁用”。
+
+当按钮被鼠标、空格键或键盘快捷键激活时，它会发出信号 clicked()。连接到此信号以执行按钮的操作。按钮还提供不太常用的信号，例如 pressed() 和 release()。
+
+对话框中的命令按钮默认为自动默认按钮，即，当它们获得键盘输入焦点时，它们会自动成为默认按钮。默认按钮是当用户在对话框中按下 Enter 或 Return 键时激活的按钮。您可以使用 setAutoDefault() 更改此设置。请注意，自动默认按钮会保留一些额外的空间，这是绘制默认按钮指示器所必需的。如果您不希望按钮周围有此空间，请调用 setAutoDefault (false)。
+
+按钮小部件如此重要，在过去十年中已经发展到可以容纳大量变体。Microsoft 样式指南现在显示了大约十种不同的 Windows 按钮状态，并且文本暗示，如果考虑所有功能组合，则还有几十种不同的状态。
+
+最重要的模式或状态是：
+
+- 可用或不可用（灰色，禁用）。
+
+- 标准按钮、切换按钮或菜单按钮。
+
+- 开启或关闭（仅适用于切换按钮）。
+
+- 默认或正常。对话框中的默认按钮通常可以使用 Enter 或 Return 键“单击”。
+
+- 是否自动重复。
+
+- 是否按下。
+
+作为一般规则，当用户单击应用程序或对话框窗口时执行操作（例如应用、取消、关闭和帮助），并且小部件应该具有带有文本标签的宽矩形形状时，请使用按钮。小型、通常为方形的按钮会更改窗口的状态而不是执行操作（例如 QFileDialog 右上角的按钮）不是命令按钮，而是工具按钮。Qt 为这些按钮提供了一个特殊的类 (QToolButton)。
+
+如果您需要切换行为（请参阅 setCheckable()）或按钮，当按下时会自动重复激活信号，如滚动条中的箭头（请参阅 setAutoRepeat()），则命令按钮可能不是您想要的。如有疑问，请使用工具按钮。
+
+命令按钮的一种变体是菜单按钮。这些按钮不仅提供一个命令，而且提供多个命令，因为单击它们时会弹出一个选项菜单。使用方法 setMenu() 将弹出菜单与按钮关联。
+
+其他按钮类包括选项按钮（参见 QRadioButton ）和复选框（参见 QCheckBox ）。
+
+在 Qt 中，QAbstractButton 基类提供大多数模式和其他 API，而 QPushButton 提供 GUI 逻辑。有关 API 的更多信息，请参阅 QAbstractButton。
+
+
+--------------------------------
+## property autoDefault : bool
+
+此属性用于保存按钮是否为自动默认按钮。
+
+如果此属性设置为 true，则按钮为自动默认按钮。
+
+在某些 GUI 样式中，默认按钮周围会画一个额外的边框，最多 3 个像素或更多。Qt 会自动在自动默认按钮周围保留此空间，即自动默认按钮可能具有稍大的尺寸提示。
+
+对于具有 QDialog 父级的按钮，此属性的默认值为 true；否则默认值为 false。
+
+有关默认和自动默认如何交互的详细信息，请参阅默认属性。
+
+访问功能：
+
+- autoDefault()
+- setAutoDefault()
+
+
+--------------------------------
+## property default : bool
+
+此属性保存按钮是否为默认按钮。
+
+默认按钮和自动默认按钮决定用户在对话框中按下 Enter 键时会发生什么。
+
+将此属性设置为 true 的按钮（即对话框的默认按钮）将在用户按下 Enter 键时自动按下，但有一个例外：如果当前焦点为自动默认按钮，则按下自动默认按钮。当对话框有自动默认按钮但没有默认按钮时，按下 Enter 键将按下当前焦点为自动默认按钮，或者如果没有按钮为焦点，则按下焦点链中的下一个自动默认按钮。
+
+在对话框中，一次只能有一个按钮是默认按钮。然后，此按钮将与附加框架一起显示（取决于 GUI 样式）。
+
+默认按钮行为仅在对话框中提供。当按钮具有焦点时，始终可以通过按空格键从键盘单击按钮。
+
+如果在对话框可见时将当前默认按钮的默认属性设置为 false，则下次对话框中的按钮获得焦点时将自动分配新的默认值。
+
+该属性的默认值为 false。
+
+访问功能：
+
+- isDefault()
+- setDefault()
+
+
+--------------------------------
+## property flat : bool
+
+此属性保存按钮边框是否凸起。
+
+此属性的默认值为 false。如果设置了此属性，则大多数样式将不会绘制按钮背景，除非按下按钮。setAutoFillBackground() 可用于确保使用 QPalette::Button 画笔填充背景。
+
+访问功能：
+
+- isFlat()
+- setFlat()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+构造一个没有文本但有父级的按钮。
+
+
+--------------------------------
+## __init__(icon, text[, parent=None])
+
+参数：
+
+- icon – QIcon
+- text – str
+- parent – QWidget
+
+构造一个带有图标、文本和父级的按钮。
+
+请注意，您还可以将 QPixmap 对象作为图标传递（这要归功于 C++ 提供的隐式类型转换）。
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+参数：
+
+- text – str
+- parent – QWidget
+
+构造一个具有父级parent和文本text的按钮。
+
+
+--------------------------------
+## autoDefault()
+
+返回值：bool
+
+属性 autoDefault 的获取器。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionButton
+
+用此 QPushButton 中的值初始化选项。当子类需要 QStyleOptionButton 但不想自己填写所有信息时，此方法很有用。
+
+
+--------------------------------
+## isDefault()
+
+返回值：bool
+
+属性默认值的获取器。
+
+
+--------------------------------
+## isFlat()
+
+返回值：bool
+
+财产单位的获取者。
+
+
+--------------------------------
+## menu()
+
+返回值：QMenu
+
+返回按钮关联的弹出菜单；如果未设置弹出菜单，则返回 None。
+
+
+--------------------------------
+## setAutoDefault(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性 autoDefault 的设置者。
+
+
+--------------------------------
+## setDefault(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性默认值的设置者。
+
+
+--------------------------------
+## setFlat(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+房产公寓的安置者。
+
+
+--------------------------------
+## setMenu(menu)
+
+参数：
+
+- menu – QMenu
+
+将弹出菜单与此按钮关联。这会将按钮变成菜单按钮，在某些样式中，按钮文本右侧会出现一个小三角形。
+
+菜单的所有权不会转移到按钮。
+
+Fusion 小部件样式中显示的带有弹出菜单的按钮。
+
+
+--------------------------------
+## showMenu()
+
+显示（弹出）关联的弹出菜单。如果没有这样的菜单，则此函数不执行任何操作。直到用户关闭弹出菜单后，此函数才会返回。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md
index feaf55b..aab08e0 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.md
@@ -1,4 +1,6 @@
 
+[Chinese Doc](QPushButton.CN.md)
+
 # class QPushButton
 
 The QPushButton widget provides a command button.
@@ -98,7 +100,7 @@ In Qt, the QAbstractButton base class provides most of the modes and other API,
 
 
 --------------------------------
-### property autoDefault : bool
+## property autoDefault : bool
 
 This property holds whether the push button is an auto default button.
 

From 2c5897c2d30280912cdc916c85d89cf271a9eda0 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 16:19:27 +0800
Subject: [PATCH 20/38] [PyQt] Add QTextEdit doc.

---
 .../PyQt6/Class-0/QtWidget/QTextEdit.CN.md    | 1684 +++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QTextEdit.md   | 1684 +++++++++++++++++
 2 files changed, 3368 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QTextEdit.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
new file mode 100644
index 0000000..d5e97af
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
@@ -0,0 +1,1684 @@
+
+[English doc](QTextEdit.md)
+
+# class QTextEdit
+
+QTextEdit 类提供了一个用于编辑和显示纯文本和富文本的小部件。
+
+
+# Synopsis
+
+## Properties
+
+- [acceptRichText](#property-acceptrichtext--bool)
+
+    文本编辑是否接受用户插入富文本。
+
+- [autoFormatting](#property-autoformatting--combination-of-qtexteditautoformattingflag)
+
+    已启用的自动格式化功能集。
+
+- [cursorWidth](#property-cursorwidth--int)
+
+- [document](#property-document--qtextdocument)
+
+    文本编辑器的底层文档。
+
+- [documentTitle](#property-documenttitle--str)
+
+    从文本中解析出的文档的标题。
+
+- [html](#property-html--str)
+
+- [lineWrapColumnOrWidth](#property-linewrapcolumnorwidth--int)
+
+    文本换行的位置（以像素或列为单位，取决于换行模式）。
+
+- [lineWrapMode](#property-linewrapmode--qtexteditlinewrapmode)
+
+    换行模式。
+
+- [markdown](#property-markdown--str)
+
+- [overwriteMode](#property-overwritemode--bool)
+
+    用户输入的文本是否会覆盖现有文本。
+
+- [placeholderText](#property-placeholdertext--str)
+
+    编辑器占位符文本。
+
+- [plainText](#property-plaintext--str)
+
+    文本编辑器的内容为纯文本。
+
+- [readOnly](#property-readonly--bool)
+
+    文本编辑是否是只读的。
+
+- [tabChangesFocus](#property-tabchangesfocus--bool)
+
+    Tab 是否改变焦点或被接受为输入。
+
+- [tabStopDistance](#property-tabstopdistance--float)
+
+    制表位距离（以像素为单位）。
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+- [undoRedoEnabled](#property-undoredoenabled--bool)
+
+    是否启用撤消和重做。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def acceptRichText()](#acceptrichtext)
+
+- [def alignment()](#alignment)
+
+- [def anchorAt()](#anchoratpos)
+
+- [def autoFormatting()](#autoformatting)
+
+- [def canPaste()](#canpaste)
+
+- [def createStandardContextMenu()](#createstandardcontextmenu)
+
+- [def currentCharFormat()](#currentcharformat)
+
+- [def currentFont()](#currentfont)
+
+- [def cursorForPosition()](#cursorforpositionpos)
+
+- [def cursorRect()](#cursorrect)
+
+- [def cursorWidth()](#cursorwidth)
+
+- [def document()](#document)
+
+- [def documentTitle()](#documenttitle)
+
+- [def ensureCursorVisible()](#ensurecursorvisible)
+
+- [def extraSelections()](#extraselections)
+
+- [def find()](#findexp-optionsqtextdocumentfindflags)
+
+- [def fontFamily()](#fontfamily)
+
+- [def fontItalic()](#fontitalic)
+
+- [def fontPointSize()](#fontpointsize)
+
+- [def fontUnderline()](#fontunderline)
+
+- [def fontWeight()](#fontweight)
+
+- [def inputMethodQuery()](#inputmethodqueryquery-argument)
+
+- [def isReadOnly()](#isreadonly)
+
+- [def isUndoRedoEnabled()](#isundoredoenabled)
+
+- [def lineWrapColumnOrWidth()](#linewrapcolumnorwidth)
+
+- [def lineWrapMode()](#linewrapmode)
+
+- [def mergeCurrentCharFormat()](#mergecurrentcharformatmodifier)
+
+- [def moveCursor()](#movecursoroperation-modeqtextcursormoveanchor)
+
+- [def overwriteMode()](#overwritemode)
+
+- [def placeholderText()](#placeholdertext)
+
+- [def print_()](#print_printer)
+
+- [def setAcceptRichText()](#setacceptrichtextaccept)
+
+- [def setAutoFormatting()](#setautoformattingfeatures)
+
+- [def setCurrentCharFormat()](#setcurrentcharformatformat)
+
+- [def setCursorWidth()](#setcursorwidthwidth)
+
+- [def setDocument()](#setdocumentdocument)
+
+- [def setDocumentTitle()](#setdocumenttitletitle)
+
+- [def setExtraSelections()](#setextraselectionsselections)
+
+- [def setLineWrapColumnOrWidth()](#setlinewrapcolumnorwidthw)
+
+- [def setLineWrapMode()](#setlinewrapmodemode)
+
+- [def setOverwriteMode()](#setoverwritemodeoverwrite)
+
+- [def setPlaceholderText()](#setplaceholdertextplaceholdertext)
+
+- [def setReadOnly()](#setreadonlyro)
+
+- [def setTabChangesFocus()](#settabchangesfocusb)
+
+- [def setTabStopDistance()](#settabstopdistancedistance)
+
+- [def setTextCursor()](#settextcursorcursor)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setUndoRedoEnabled()](#setundoredoenabledenable)
+
+- [def setWordWrapMode()](#setwordwrapmodepolicy)
+
+- [def tabChangesFocus()](#tabchangesfocus)
+
+- [def tabStopDistance()](#tabstopdistance)
+
+- [def textBackgroundColor()](#textbackgroundcolor)
+
+- [def textColor()](#textcolor)
+
+- [def textCursor()](#textcursor)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+- [def toHtml()](#tohtml)
+
+- [def toMarkdown()](#tomarkdownfeaturesqtextdocumentmarkdowndialectgithub)
+
+- [def toPlainText()](#toplaintext)
+
+- [def wordWrapMode()](#wordwrapmode)
+
+- [def zoomInF()](#zoominfrange)
+
+
+## Virtual methods
+
+- [def canInsertFromMimeData()](#caninsertfrommimedatasource)
+
+- [def createMimeDataFromSelection()](#createmimedatafromselection)
+
+- [def doSetTextCursor()](#dosettextcursorcursor)
+
+- [def insertFromMimeData()](#insertfrommimedatasource)
+
+- [def loadResource()](#loadresourcetype-name)
+
+
+## Slots
+
+- [def append()](#appendtext)
+
+- [def clear()](#clear)
+
+- [def copy()](#copy)
+
+- [def cut()](#cut)
+
+- [def insertHtml()](#inserthtmltext)
+
+- [def insertPlainText()](#insertplaintexttext)
+
+- [def paste()](#paste)
+
+- [def redo()](#redo)
+
+- [def scrollToAnchor()](#scrolltoanchorname)
+
+- [def selectAll()](#selectall)
+
+- [def setAlignment()](#setalignmenta)
+
+- [def setCurrentFont()](#setcurrentfontf)
+
+- [def setFontFamily()](#setfontfamilyfontfamily)
+
+- [def setFontItalic()](#setfontitalicb)
+
+- [def setFontPointSize()](#setfontpointsizes)
+
+- [def setFontUnderline()](#setfontunderlineb)
+
+- [def setFontWeight()](#setfontweightw)
+
+- [def setHtml()](#sethtmltext)
+
+- [def setMarkdown()](#setmarkdownmarkdown)
+
+- [def setPlainText()](#setplaintexttext)
+
+- [def setText()](#settextcolorc)
+
+- [def setTextBackgroundColor()](#settextbackgroundcolorc)
+
+- [def setTextColor()](#settextcolorc)
+
+- [def undo()](#undo)
+
+- [def zoomIn()](#zoominrange1)
+
+- [def zoomOut()](#zoomoutrange1)
+
+
+## Signals
+
+- [def copyAvailable()](#copyavailableb)
+
+- [def currentCharFormatChanged()](#currentcharformatchangedformat)
+
+- [def cursorPositionChanged()](#cursorpositionchanged)
+
+- [def redoAvailable()](#redoavailableb)
+
+- [def selectionChanged()](#selectionchanged)
+
+- [def textChanged()](#textchanged)
+
+- [def undoAvailable()](#undoavailableb)
+
+
+# Detailed Description
+
+## Introduction and Concepts
+
+QTextEdit 是一个高级所见即所得的查看器/编辑器，支持使用 HTML 样式标签或 Markdown 格式的富文本格式。它经过优化，可以处理大型文档并快速响应用户输入。
+
+QTextEdit 适用于段落和字符。段落是一个格式化的字符串，它会自动换行以适应小部件的宽度。默认情况下，在阅读纯文本时，一个换行符表示一个段落。文档由零个或多个段落组成。段落中的单词根据段落的对齐方式对齐。段落由硬换行符分隔。段落中的每个字符都有自己的属性，例如字体和颜色。
+
+QTextEdit 可以显示图像、列表和表格。如果文本太大而无法在文本编辑的视口中查看，则会出现滚动条。文本编辑可以加载纯文本和富文本文件。富文本可以使用 HTML 4 标记的子集来描述；有关更多信息，请参阅支持的 HTML 子集页面。
+
+如果您只需要显示一小段富文本，请使用 QLabel 。
+
+Qt 中的富文本支持旨在提供一种快速、便携且高效的方式，为应用程序添加合理的在线帮助功能，并为富文本编辑器提供基础。如果您发现 HTML 支持不足以满足您的需求，您可以考虑使用 Qt WebKit，它提供了一个功能齐全的 Web 浏览器小部件。
+
+QTextEdit 上的鼠标光标形状默认为 Qt::IBeamCursor。它可以通过 viewport() 的 cursor 属性进行更改。
+
+
+## Using QTextEdit as a Display Widget
+
+QTextEdit 可以显示大量 HTML 子集，包括表格和图像。
+
+可以使用 setHtml() 设置或替换文本，该方法会删除任何现有文本并将其替换为 setHtml() 调用中传递的文本。如果您使用旧版 HTML 调用 setHtml()，然后调用 toHtml()，则返回的文本可能具有不同的标记，但会呈现相同的内容。可以使用 clear() 删除整个文本。
+
+还可以使用 setMarkdown() 设置或替换文本，并且适用相同的注意事项：如果您随后调用 toMarkdown()，则返回的文本可能不同，但含义会尽可能保留。可以解析带有一些嵌入 HTML 的 Markdown，其限制与 setHtml() 相同；但 toMarkdown() 仅写入“纯”Markdown，没有任何嵌入的 HTML。
+
+可以使用 QTextCursor 类或使用便捷函数 insertHtml() 、 insertPlainText() 、 append() 或 paste() 插入文本本身。 QTextCursor 还能够将表格或列表等复杂对象插入文档，并处理创建选择并将更改应用于选定文本。
+
+默认情况下，文本编辑会在空白处换行以适合文本编辑小部件。setLineWrapMode() 函数用于指定所需的换行类型，如果您不想要任何换行，则使用 NoWrap。调用 setLineWrapMode() 以设置固定像素宽度 FixedPixelWidth 或字符列（例如 80 列） FixedColumnWidth，并使用 setLineWrapColumnOrWidth() 指定的像素或列。如果您对小部件的宽度 WidgetWidth 使用自动换行，则可以使用 setWordWrapMode() 指定是在空白处还是在任何地方换行。
+
+find() 函数可用于在文本中查找和选择给定的字符串。
+
+如果您想限制 QTextEdit 中的段落总数，例如它在日志查看器中经常有用，那么您可以使用 QTextDocument 的 maximumBlockCount 属性来实现。
+
+
+## Read-only Key Bindings
+
+当 QTextEdit 以只读方式使用时，键绑定仅限于导航，并且只能使用鼠标选择文本：
+
+| Keypresses | Action                               |
+| ---------- | ------------------------------------ |
+| Up         | 向上移动一行。                        |
+| Down       | 向下移动一行。                        |
+| Left       | 向左移动一个字符。                    |
+| Right      | 向右移动一个字符。                    |
+| PageUp     | 向上移动一页（视口）。                 |
+| PageDown   | 向下移动一页（视口）。                 |
+| Home       | 移至文本开头。                        |
+| End        | 移至文本末尾。                        |
+| Alt+Wheel  | 水平滚动页面（滚轮是鼠标滚轮）。        |
+| Ctrl+Wheel | 缩放文本。                            |
+| Ctrl+A     | 选择所有文本。                        |
+
+文本编辑可能能够提供一些元信息。例如，documentTitle() 函数将返回 HTML <title> 标签内的文本。
+
+
+## Using QTextEdit as an Editor
+
+有关使用 QTextEdit 作为显示小部件的所有信息也适用于此处。
+
+当前字符格式的属性使用 setFontItalic() 、 setFontWeight() 、 setFontUnderline() 、 setFontFamily() 、 setFontPointSize() 、 setTextColor() 和 setCurrentFont() 设置。当前段落的对齐方式使用 setAlignment() 设置。
+
+文本选择由 QTextCursor 类处理，该类提供创建选择、检索文本内容或删除选择的功能。您可以使用 textCursor() 方法检索与用户可见光标相对应的对象。如果您想在 QTextEdit 中设置选择，只需在 QTextCursor 对象上创建一个，然后使用 setTextCursor() 使该光标成为可见光标。可以使用 copy() 将选择复制到剪贴板，或使用 cut() 剪切到剪贴板。可以使用 selectAll() 选择整个文本。
+
+当光标移动并且底层格式属性发生变化时，将发出 currentCharFormatChanged() 信号以反映新光标位置的新属性。
+
+每当文本发生变化时（作为 setText() 的结果或通过编辑器本身），都会发出 textChanged() 信号。
+
+QTextEdit 包含一个 QTextDocument 对象，可以使用 document() 方法检索该对象。您还可以使用 setDocument() 设置自己的文档对象。
+
+QTextDocument 提供了一个 isModified() 函数，如果文本自加载以来或自上次使用 false 作为参数调用 setModified 以来已被修改，则该函数将返回 true。此外，它还提供了撤消和重做的方法。
+
+
+## Drag and Drop
+
+QTextEdit 还支持自定义拖放行为。默认情况下，当用户将这些 MIME 类型的数据拖放到文档上时，QTextEdit 将插入纯文本、HTML 和富文本。重新实现 canInsertFromMimeData() 和 insertFromMimeData() 以添加对其他 MIME 类型的支持。
+
+例如，要允许用户将图像拖放到 QTextEdit 上，您可以按以下方式实现这些函数：
+
+```python
+def canInsertFromMimeData(self, QMimeData source ):
+
+    if source.hasImage():
+        return True
+else:
+        return QTextEdit.canInsertFromMimeData(source)
+```
+
+我们通过返回 true 来添加对图像 MIME 类型的支持。对于所有其他 MIME 类型，我们使用默认实现。
+
+```bash
+def insertFromMimeData(self, source):
+
+    if source.hasImage():
+
+        image = QImage(source.imageData())
+        cursor = self.textCursor()
+        document = self.document()
+        document.addResource(QTextDocument.ImageResource, QUrl("image"), image)
+        cursor.insertImage("image")
+```
+
+我们从 MIME 源持有的 QVariant 中解压图像并将其作为资源插入到文档中。
+
+
+## Editing Key Bindings
+
+为编辑而实现的键绑定列表：
+
+| Keypresses   | Action                         |
+| ------------ | ------------------------------ |
+| Backspace    | 删除光标左边的字符。             |
+| Delete       | 删除光标右侧的字符。             |
+| Ctrl+C       | 将选定的文本复制到剪贴板。        |
+| Ctrl+Insert  | 将选定的文本复制到剪贴板。        |
+| Ctrl+K       | 删除至行末。                     |
+| Ctrl+V       | 将剪贴板文本粘贴到文本编辑中。     |
+| Shift+Insert | 将剪贴板文本粘贴到文本编辑中。     |
+| Ctrl+X       | 删除选定的文本并将其复制到剪贴板。 |
+| Shift+Delete | 删除选定的文本并将其复制到剪贴板。 |
+| Ctrl+Z       | 撤消上一个操作。                 |
+| Ctrl+Y       | 重做上一个操作。                 |
+| Left         | 将光标向左移动一个字符。          |
+| Ctrl+Left    | 将光标向左移动一个单词。          |
+| Right        | 将光标向右移动一个字符。          |
+| Ctrl+Right   | 将光标向右移动一个单词。          |
+| Up           | 将光标向上移动一行。              |
+| Down         | 将光标向下移动一行。              |
+| PageUp       | 将光标向上移动一页。              |
+| PageDown     | 将光标向下移动一页。              |
+| Home         | 将光标移至行首。                  |
+| Ctrl+Home    | 将光标移动到文本的开头。          |
+| End          | 将光标移动到行尾。                |
+| Ctrl+End     | 将光标移动到文本末尾。            |
+| Alt+Wheel    | 水平滚动页面（滚轮是鼠标滚轮）。   |
+
+要选择（标记）文本，请按住 Shift 键并按下某个移动键，例如，Shift+Right 将选择右侧的字符，Shift+Ctrl+Right 将选择右侧的单词，等等。
+
+
+--------------------------------
+## class LineWrapMode
+
+| Constant                   | Description |
+| -------------------------- | ----------- |
+| QTextEdit.NoWrap           |             |
+| QTextEdit.WidgetWidth      |             |
+| QTextEdit.FixedPixelWidth  |             |
+| QTextEdit.FixedColumnWidth |             |
+
+
+--------------------------------
+## class AutoFormattingFlag
+
+| Constant                 | Description |
+| ------------------------ | ----------- |
+| QTextEdit.AutoNone       | （继承 enum.Flag）不进行任何自动格式化。 |
+| QTextEdit.AutoBulletList | 自动创建项目符号列表，例如当用户在最左边的列中输入星号（“*”）或在现有列表项中按下 Enter 键时。 |
+| QTextEdit.AutoAll        | 应用所有自动格式。目前仅支持自动项目符号列表。 |
+
+
+--------------------------------
+## property acceptRichText : bool
+
+此属性保存文本编辑是否接受用户的富文本插入。
+
+当此属性设置为 false 时，文本编辑将仅接受用户的纯文本输入。例如通过剪贴板或拖放。
+
+此属性的默认值为 true。
+
+访问功能：
+
+- acceptRichText()
+- setAcceptRichText()
+
+
+--------------------------------
+## property autoFormatting : Combination of QTextEdit.AutoFormattingFlag
+
+此属性保存已启用的自动格式化功能集。
+
+该值可以是 AutoFormattingFlag 枚举中的值的任意组合。默认值为 AutoNone 。选择 AutoAll 可启用所有自动格式化。
+
+目前，提供的唯一自动格式化功能是 AutoBulletList ；Qt 的未来版本可能会提供更多功能。
+
+访问功能：
+
+- autoFormatting()
+- setAutoFormatting()
+
+
+--------------------------------
+## property cursorWidth : int
+
+此属性指定光标的宽度（以像素为单位）。默认值为 1。
+
+访问功能：
+
+- cursorWidth()
+- setCursorWidth()
+
+
+--------------------------------
+## property document : QTextDocument
+
+此属性保存文本编辑器的底层文档。
+
+访问功能：
+
+- document()
+- setDocument()
+
+
+--------------------------------
+## property documentTitle : str
+
+此属性保存从文本解析出的文档的标题。
+
+默认情况下，对于新创建的空文档，此属性包含一个空字符串。
+
+访问功能：
+
+- documentTitle()
+- setDocumentTitle()
+
+
+--------------------------------
+## property html : str
+
+此属性为文本编辑的文本提供 HTML 界面。
+
+toHtml() 将文本编辑的文本作为 html 返回。
+
+setHtml() 更改文本编辑的文本。任何先前的文本都将被删除，撤消/重做历史记录将被清除。输入文本将被解释为 html 格式的富文本。除非 textCursor() 已位于文档开头，否则 currentCharFormat() 也会被重置。
+
+默认情况下，对于新创建的空文档，此属性包含用于描述没有正文的 HTML 4.0 文档的文本。
+
+访问功能：
+
+- toHtml()
+- setHtml()
+- Signal textChanged()
+
+
+--------------------------------
+## property lineWrapColumnOrWidth : int
+
+此属性保存文本换行的位置（以像素或列为单位，具体取决于换行模式）。
+
+如果换行模式为 FixedPixelWidth ，则该值是从文本编辑左边缘开始的文本应换行的像素数。 如果换行模式为 FixedColumnWidth ，则该值是从文本编辑左边缘开始的文本应换行的列数（以字符列为单位）。
+
+默认情况下，此属性包含 0 值。
+
+访问功能：
+
+- lineWrapColumnOrWidth()
+- setLineWrapColumnOrWidth()
+
+
+--------------------------------
+## property lineWrapMode : QTextEdit.LineWrapMode
+
+此属性保存换行模式。
+
+默认模式为 WidgetWidth，这会导致单词在文本编辑的右边缘换行。换行发生在空白处，保持整个单词完整。如果您希望在单词内换行，请使用 setWordWrapMode() 。如果您设置了 FixedPixelWidth 或 FixedColumnWidth 的换行模式，您还应该使用所需的宽度调用 setLineWrapColumnOrWidth()。
+
+访问功能：
+
+- lineWrapMode()
+- setLineWrapMode()
+
+
+--------------------------------
+## property markdown : str
+
+此属性为文本编辑的文本提供 Markdown 接口。
+
+toMarkdown() 将文本编辑的文本作为“纯”Markdown 返回，不包含任何嵌入的 HTML 格式。QTextDocument 支持的某些功能（例如使用特定颜色和命名字体）无法在“纯”Markdown 中表达，因此将被省略。
+
+setMarkdown() 更改文本编辑的文本。任何先前的文本都将被删除，撤消/重做历史记录将被清除。输入文本被解释为 Markdown 格式的富文本。
+
+markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是，不支持 HTML 块内的 Markdown 格式。
+
+可以通过 features 参数启用或禁用解析器的某些功能：
+
+- MarkdownNoHTML
+- Any HTML tags in the Markdown text will be discarded
+
+默认是MarkdownDialectGitHub。
+
+访问功能：
+
+- toMarkdown()
+- setMarkdown()
+- Signal textChanged()
+
+
+--------------------------------
+## property overwriteMode : bool
+
+此属性用于控制用户输入的文本是否会覆盖现有文本。
+
+与许多文本编辑器一样，文本编辑器小部件可以配置为插入或用用户输入的新文本覆盖现有文本。
+
+如果此属性为 true，则现有文本将被新文本逐个字符地覆盖；否则，文本将插入到光标位置，取代现有文本。
+
+默认情况下，此属性为 false（新文本不会覆盖现有文本）。
+
+访问功能：
+
+- overwriteMode()
+- setOverwriteMode()
+
+
+--------------------------------
+## property placeholderText : str
+
+此属性保存编辑器占位符文本。
+
+设置此属性会使编辑器在 document() 为空时显示灰色占位符文本。
+
+默认情况下，此属性包含一个空字符串。
+
+访问功能：
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property plainText : str
+
+此属性将文本编辑器的内容保存为纯文本。
+
+设置此属性后，将删除先前的内容并重置撤消/重做历史记录。除非 textCursor() 已位于文档开头，否则 currentCharFormat() 也会重置。
+
+如果文本编辑具有其他内容类型，则调用 toPlainText() 时不会将其替换为纯文本。唯一的例外是非中断空格，nbsp;，它将转换为标准空格。
+
+默认情况下，对于没有内容的编辑器，此属性包含一个空字符串。
+
+访问功能：
+
+- toPlainText()
+- setPlainText()
+
+
+--------------------------------
+## property readOnly : bool
+
+此属性保存文本编辑是否为只读。
+
+在只读文本编辑中，用户只能浏览文本并选择文本；无法修改文本。
+
+此属性的默认值为 false。
+
+访问功能：
+
+- isReadOnly()
+- setReadOnly()
+
+
+--------------------------------
+## property tabChangesFocus : bool
+
+此属性保存 Tab 键是否改变焦点或被接受为输入。
+​​
+在某些情况下，文本编辑不应允许用户使用 Tab 键输入制表符或更改缩进，因为这会破坏焦点链。默认值为 false。
+
+访问功能：
+
+- tabChangesFocus()
+- setTabChangesFocus()
+
+
+--------------------------------
+## property tabStopDistance : float
+
+此属性保存制表位距离（以像素为单位）。
+
+默认情况下，此属性包含 80 像素的值。
+
+请勿设置小于 QChar::VisualTabCharacter 字符的 Horizo​​ntalAdvance() 的值，否则制表符将绘制不完整。
+
+访问功能：
+
+- tabStopDistance()
+- setTabStopDistance()
+
+
+--------------------------------
+## property textInteractionFlags : Combination of Qt.TextInteractionFlag
+
+指定小部件应如何与用户输入交互。
+
+默认值取决于 QTextEdit 是只读的还是可编辑的，以及它是否是 QTextBrowser。
+
+访问功能：
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+
+--------------------------------
+## property undoRedoEnabled : bool
+
+此属性保存是否启用了撤消和重做。
+
+仅当此属性为真，并且存在可以撤消（或重做）的操作时，用户才可以撤消或重做操作。
+
+访问功能：
+
+- isUndoRedoEnabled()
+- setUndoRedoEnabled()
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+参数：
+
+- text – str
+- parent – QWidget
+
+构造一个具有父级parent的QTextEdit。文本编辑将显示文本text。文本被解释为html。
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+构造一个具有父级parent的空的QTextEdit。
+
+
+--------------------------------
+## acceptRichText()
+
+返回值：bool
+
+属性 acceptRichText 的获取器。
+
+
+--------------------------------
+## alignment()
+
+返回值：Combination of AlignmentFlag
+
+返回当前段落的对齐方式。
+
+
+--------------------------------
+## anchorAt(pos)
+
+参数：
+
+- pos – QPoint
+
+返回值：str
+
+返回位置 pos 处锚点的引用，如果该点不存在锚点，则返回空字符串。
+
+
+--------------------------------
+## append(text)
+
+参数：
+
+- text – str
+
+将包含文本的新段落附加到文本编辑的末尾。
+
+
+--------------------------------
+## autoFormatting()
+
+返回值：Combination of AutoFormattingFlag
+
+属性 autoFormatting 的获取器。
+
+
+--------------------------------
+## canInsertFromMimeData(source)
+
+参数：
+
+- source – QMimeData
+
+返回值：bool
+
+如果源指定的 MIME 数据对象的内容可以解码并插入文档，则此函数返回 true。例如，在拖动操作期间鼠标进入此小部件时，会调用此函数，并且需要确定是否可以接受拖放操作。
+
+重新实现此函数以启用对其他 MIME 类型的拖放支持。
+
+
+--------------------------------
+## canPaste()
+
+返回值：bool
+
+返回是否可以将文本从剪贴板粘贴到文本编辑中。
+
+
+--------------------------------
+## clear()
+
+删除文本编辑中的所有文本。
+
+
+--------------------------------
+## copy()
+
+将任何选定的文本复制到剪贴板。
+
+
+--------------------------------
+## copyAvailable(b)
+
+参数：
+
+- b – bool
+
+当在文本编辑中选择或取消选择文本时，将发出此信号。
+
+当选择文本时，将发出此信号，并将 yes 设置为 true。 如果未选择任何文本或取消选择所选文本，则将发出此信号，并将 yes 设置为 false。
+
+如果 yes 为 true，则可以使用 copy() 将所选内容复制到剪贴板。 如果 yes 为 false，则 copy() 不执行任何操作。
+
+
+--------------------------------
+## createMimeDataFromSelection()
+
+返回值：QMimeData
+
+此函数返回一个新的 MIME 数据对象，以表示文本编辑的当前选择的内容。当需要将选择封装到新的 QMimeData 对象中时，会调用此函数；例如，当启动拖放操作时，或者当将数据复制到剪贴板时。
+
+如果您重新实现此函数，请注意，返回的 QMimeData 对象的所有权将传递给调用者。可以使用 textCursor() 函数检索选择。
+
+
+--------------------------------
+## createStandardContextMenu()
+
+返回值：QMenu
+
+此函数创建标准上下文菜单，当用户用鼠标右键单击文本编辑时，将显示该菜单。它从默认 contextMenuEvent() 处理程序调用。弹出菜单的所有权将转移给调用者。
+
+我们建议您改用 createStandardContextMenu(QPoint) 版本，它将启用对用户单击位置敏感的操作。
+
+
+--------------------------------
+## createStandardContextMenu(position)
+
+参数：
+
+- position – QPoint
+
+返回值：QMenu
+
+此函数创建标准上下文菜单，当用户用鼠标右键单击文本编辑时，将显示该菜单。它由默认的 contextMenuEvent() 处理程序调用，并获取鼠标单击在文档坐标中的位置。这可以启用对用户单击位置敏感的操作。弹出菜单的所有权将转移给调用者。
+
+
+--------------------------------
+## currentCharFormat()
+
+返回值：QTextCharFormat
+
+返回插入新文本时使用的字符格式。
+
+
+--------------------------------
+## currentCharFormatChanged(format)
+
+参数：
+
+- format – QTextCharFormat
+
+如果当前字符格式发生变化（例如由于光标位置发生变化），则会发出此信号。
+
+新格式为 f。
+
+
+--------------------------------
+## currentFont()
+
+返回值：QFont
+
+返回当前格式的字体。
+
+
+--------------------------------
+## cursorForPosition(pos)
+
+参数：
+
+- pos – QPoint
+
+返回值：QTextCursor
+
+返回位于位置 pos（在视口坐标中）的 QTextCursor。
+
+
+--------------------------------
+## cursorPositionChanged()
+
+只要光标位置改变就会发出此信号。
+
+
+--------------------------------
+## cursorRect()
+
+返回值：QRect
+
+返回一个包含文本编辑光标的矩形（在视口坐标中）。
+
+
+--------------------------------
+## cursorRect(cursor)
+
+参数：
+
+- cursor – QTextCursor
+
+返回值：QRect
+
+返回一个包含光标的矩形（在视口坐标中）。
+
+
+--------------------------------
+## cursorWidth()
+
+返回值：int
+
+属性 cursorWidth 的获取器。
+
+
+--------------------------------
+## cut()
+
+将选定的文本复制到剪贴板并从文本编辑中删除。
+
+如果没有选定的文本，则不会发生任何事情。
+
+
+--------------------------------
+## doSetTextCursor(cursor)
+
+参数：
+
+- cursor – QTextCursor
+
+
+--------------------------------
+## document()
+
+返回值：QTextDocument
+
+属性文档的获取器。
+
+
+--------------------------------
+## documentTitle()
+
+返回值：str
+
+属性 documentTitle 的获取器。
+
+
+--------------------------------
+## ensureCursorVisible()
+
+如有必要，通过滚动文本编辑来确保光标可见。
+
+
+--------------------------------
+## extraSelections()
+
+返回值：list of QTextEdit.ExtraSelection
+
+返回先前设置的额外选择。
+
+
+--------------------------------
+## find(exp[, options=QTextDocument.FindFlags()])
+
+参数：
+
+- exp – QRegularExpression
+- options – Combination of FindFlag
+
+返回值：bool
+
+这是一个重载函数。
+
+使用给定的选项查找下一个与正则表达式 exp 匹配的出现情况。
+
+如果找到匹配项，则返回 true 并更改光标以选择匹配项；否则返回 false。
+
+
+--------------------------------
+## find(exp[, options=QTextDocument.FindFlags()])
+
+参数：
+
+- exp – str
+- options – Combination of FindFlag
+
+返回值：bool
+
+使用给定的选项查找字符串 exp 的下一个出现位置。如果找到 exp，则返回 true，并更改光标以选择匹配项；否则返回 false。
+
+
+--------------------------------
+## fontFamily()
+
+返回值：str
+
+返回当前格式的字体系列。
+
+
+--------------------------------
+## fontItalic()
+
+返回值：bool
+
+如果当前格式的字体为斜体，则返回 true；否则返回 false。
+
+
+--------------------------------
+## fontPointSize()
+
+返回值：float
+
+返回当前格式的字体的点大小。
+
+
+--------------------------------
+## fontUnderline()
+
+返回值：bool
+
+如果当前格式的字体带下划线则返回 true，否则返回 false。
+
+
+--------------------------------
+## fontWeight()
+
+返回值：int
+
+返回当前格式的字体粗细。
+
+
+--------------------------------
+## inputMethodQuery(query, argument)
+
+参数：
+
+- query – InputMethodQuery
+- argument – object
+
+返回值：object
+
+
+--------------------------------
+## insertFromMimeData(source)
+
+参数：
+
+- source – QMimeData
+
+此函数将源指定的 MIME 数据对象的内容插入到当前光标位置的文本编辑中。每当文本作为剪贴板粘贴操作的结果插入时，或者当文本编辑接受来自拖放操作的数据时，都会调用此函数。
+
+重新实现此函数以启用对其他 MIME 类型的拖放支持。
+
+
+--------------------------------
+## insertHtml(text)
+
+参数：
+
+- text – str
+
+便利槽，用于在当前光标位置插入假定为 html 格式的文本。
+
+它相当于：
+
+```python
+edit.textCursor().insertHtml(fragment)
+```
+
+
+--------------------------------
+## insertPlainText(text)
+
+参数：
+
+- text – str
+
+在当前光标位置插入文本的便利插槽。
+
+相当于：
+
+```python
+edit.textCursor().insertText(text)
+```
+
+
+--------------------------------
+## isReadOnly()
+
+返回值：bool
+
+属性 readOnly 的获取器。
+
+
+--------------------------------
+## isUndoRedoEnabled()
+
+返回值：bool
+
+属性 undoRedoEnabled 的获取器。
+
+
+--------------------------------
+## lineWrapColumnOrWidth()
+
+返回值：int
+
+属性 lineWrapColumnOrWidth 的获取器。
+
+
+--------------------------------
+## lineWrapMode()
+
+返回值：LineWrapMode
+
+属性 lineWrapMode 的获取器。
+
+
+--------------------------------
+## loadResource(type, name)
+
+参数：
+
+- type – int
+- name – QUrl
+
+返回值：object
+
+加载给定类型和名称指定的资源。
+
+此函数是 QTextDocument::loadResource() 的扩展。
+
+
+--------------------------------
+## mergeCurrentCharFormat(modifier)
+
+参数：
+
+- modifier – QTextCharFormat
+
+通过在编辑器光标上调用 QTextCursor::mergeCharFormat 将 modifier 中指定的属性合并到当前字符格式中。如果编辑器有选择，则 modifier 的属性将直接应用于选择。
+
+
+--------------------------------
+## moveCursor(operation[, mode=QTextCursor.MoveAnchor])
+
+参数：
+
+- operation – MoveOperation
+- mode – MoveMode
+
+通过执行给定的操作来移动光标。
+
+如果模式为 QTextCursor::KeepAnchor，则光标会选择它移动到的文本。这与用户按住 Shift 键并使用光标键移动光标时实现的效果相同。
+
+
+--------------------------------
+## overwriteMode()
+
+返回值：bool
+
+属性 overwriteMode 的获取器。
+
+
+--------------------------------
+## paste()
+
+将剪贴板中的文本粘贴到当前光标位置的文本编辑中。
+
+如果剪贴板中没有文本，则不会发生任何事情。
+
+要更改此函数的行为，即修改 QTextEdit 可以粘贴的内容及其粘贴方式，请重新实现虚拟 canInsertFromMimeData() 和 insertFromMimeData() 函数。
+
+
+--------------------------------
+## placeholderText()
+
+返回值：str
+
+属性 placeholderText 的获取方法。
+
+
+--------------------------------
+## print_(printer)
+
+参数：
+
+- printer – QPagedPaintDevice
+
+
+--------------------------------
+## redo()
+
+重做上一个操作。
+
+如果没有要重做的操作，即撤消/重做历史记录中没有重做步骤，则不会发生任何事情。
+
+
+--------------------------------
+## redoAvailable(b)
+
+参数：
+
+- b – bool
+
+每当重做操作可用（可用为真）或不可用（可用为假）时，就会发出此信号。
+
+
+--------------------------------
+## scrollToAnchor(name)
+
+参数：
+
+- name – str
+
+滚动文本编辑，以便具有给定名称的锚点可见；如果名称为空、已经可见或者未找到，则不执行任何操作。
+
+
+--------------------------------
+## selectAll()
+
+选择所有文本。
+
+
+--------------------------------
+## selectionChanged()
+
+每当选择改变时就会发射此信号。
+
+
+--------------------------------
+## setAcceptRichText(accept)
+
+参数：
+
+- accept – bool
+
+属性 acceptRichText 的设置方法。
+
+
+--------------------------------
+## setAlignment(a)
+
+参数：
+
+- a – Combination of AlignmentFlag
+
+将当前段落的对齐方式设置为 a。有效的对齐方式是 Qt::AlignLeft、Qt::AlignRight、Qt::AlignJustify 和 Qt::AlignCenter（水平居中）。
+
+
+--------------------------------
+## setAutoFormatting(features)
+
+参数：
+
+- features – Combination of AutoFormattingFlag
+
+属性 autoFormatting 的设置器。
+
+
+--------------------------------
+## setCurrentCharFormat(format)
+
+参数：
+
+- format – QTextCharFormat
+
+通过在编辑器光标上调用 QTextCursor::setCharFormat() 来设置插入新文本时使用的字符格式。如果编辑器有选择，则字符格式将直接应用于选择。
+
+
+--------------------------------
+## setCurrentFont(f)
+
+参数：
+
+- f – QFont
+
+将当前格式的字体设置为f。
+
+
+--------------------------------
+## setCursorWidth(width)
+
+参数：
+
+- width – int
+
+属性 cursorWidth 的设置器。
+
+
+--------------------------------
+## setDocument(document)
+
+参数：
+
+- document – QTextDocument
+
+财产文件的设定者。
+
+
+--------------------------------
+## setDocumentTitle(title)
+
+参数：
+
+- title – str
+
+属性 documentTitle 的设置者。
+
+
+--------------------------------
+## setExtraSelections(selections)
+
+参数：
+
+- selections – .list of QTextEdit.ExtraSelection
+
+此功能允许暂时用指定颜色标记文档中的某些区域（指定为选择）。这在编程编辑器中很有用，例如，用给定的背景颜色标记整行文本以指示断点的存在。
+
+
+--------------------------------
+## setFontFamily(fontFamily)
+
+参数：
+
+- fontFamily – str
+
+将当前格式的字体系列设置为 fontFamily。
+
+
+--------------------------------
+## setFontItalic(b)
+
+参数：
+
+- b – bool
+
+如果 italic 为真，则将当前格式设置为斜体；否则将当前格式设置为非斜体。
+
+
+--------------------------------
+## setFontPointSize(s)
+
+参数：
+
+- s – float
+
+将当前格式的点大小设置为 s。
+
+请注意，如果 s 为零或负数，则此函数的行为未定义。
+
+
+--------------------------------
+## setFontUnderline(b)
+
+参数：
+
+- b – bool
+
+如果下划线为真，则将当前格式设置为下划线；否则将当前格式设置为非下划线。
+
+
+--------------------------------
+## setFontWeight(w)
+
+参数：
+
+- w – int
+
+将当前格式的字体粗细设置为给定的粗细，其中使用的值在 QFont::Weight 枚举定义的范围内。
+
+
+--------------------------------
+## setHtml(text)
+
+参数：
+
+- text – str
+
+属性 html 的设置器。
+
+
+--------------------------------
+## setLineWrapColumnOrWidth(w)
+
+参数：
+
+- w – int
+
+属性 lineWrapColumnOrWidth 的设置器。
+
+
+--------------------------------
+## setLineWrapMode(mode)
+
+参数：
+
+- mode – LineWrapMode
+
+属性 lineWrapMode 的设置器。
+
+
+--------------------------------
+## setMarkdown(markdown)
+
+参数：
+
+- markdown – str
+
+属性 markdown 的设置者。
+
+
+--------------------------------
+## setOverwriteMode(overwrite)
+
+参数：
+
+- overwrite – bool
+
+属性 overwriteMode 的设置者。
+
+
+--------------------------------
+## setPlaceholderText(placeholderText)
+
+参数：
+
+- placeholderText – str
+
+属性 placeholderText 的设置者。
+
+
+--------------------------------
+## setPlainText(text)
+
+参数：
+
+- text – str
+
+将文本编辑的文本更改为字符串文本。任何先前的文本都将被删除。
+
+属性 plainText 的设置器。
+
+
+--------------------------------
+## setReadOnly(ro)
+
+参数：
+
+- ro – bool
+
+属性 readOnly 的设置者。
+
+
+--------------------------------
+## setTabChangesFocus(b)
+
+参数：
+
+- b – bool
+
+属性 tabChangesFocus 的设置者。
+
+
+--------------------------------
+## setTabStopDistance(distance)
+
+参数：
+
+- distance – float
+
+属性 tabStopDistance 的设置者。
+
+
+--------------------------------
+setText(text)
+
+参数：
+
+- text – str
+
+设置文本编辑的文本。文本可以是纯文本或 HTML，文本编辑将尝试猜测正确的格式。
+
+直接使用 setHtml() 或 setPlainText() 可避免文本编辑的猜测。
+
+
+--------------------------------
+## setTextBackgroundColor(c)
+
+参数：
+
+- c – QColor
+
+将当前格式的文本背景颜色设置为 c。
+
+
+--------------------------------
+## setTextColor(c)
+
+参数：
+
+- c – QColor
+
+将当前格式的文本颜色设置为 c。
+
+
+--------------------------------
+## setTextCursor(cursor)
+
+参数：
+
+- cursor – QTextCursor
+
+设置可见光标。
+
+
+--------------------------------
+## setTextInteractionFlags(flags)
+
+参数：
+
+- flags – Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的设置者。
+
+
+--------------------------------
+## setUndoRedoEnabled(enable)
+
+参数：
+
+- enable – bool
+
+属性 undoRedoEnabled 的设置者。
+
+
+--------------------------------
+## setWordWrapMode(policy)
+
+参数：
+
+- policy – WrapMode
+
+
+--------------------------------
+## tabChangesFocus()
+
+返回值：bool
+
+属性 tabChangesFocus 的获取器。
+
+
+--------------------------------
+## tabStopDistance()
+
+返回值：float
+
+属性 tabStopDistance 的获取器。
+
+
+--------------------------------
+## textBackgroundColor()
+
+返回值：QColor
+
+返回当前格式的文本背景颜色。
+
+
+--------------------------------
+## textChanged()
+
+每当文档内容发生变化时，都会发出此信号；例如，插入或删除文本时，或者应用格式时。
+
+属性 markdown 的通知信号。
+
+
+--------------------------------
+## textColor()
+
+返回值：QColor
+
+返回当前格式的文本颜色。
+
+
+--------------------------------
+## textCursor()
+
+Return type: QTextCursor
+
+返回代表当前可见光标的 QTextCursor 的副本。请注意，返回光标上的更改不会影响 QTextEdit 的光标；使用 setTextCursor() 来更新可见光标。
+
+
+--------------------------------
+## textInteractionFlags()
+
+返回值：Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的获取器。
+
+
+--------------------------------
+## toHtml()
+
+返回值：str
+
+Getter of property html  .
+
+
+--------------------------------
+## toMarkdown([features=QTextDocument.MarkdownDialectGitHub])
+
+参数：
+
+- features – Combination of MarkdownFeature
+
+返回值：str
+
+
+--------------------------------
+## toPlainText()
+
+返回值：str
+
+
+--------------------------------
+## QString QTextEdit::toPlainText() const
+
+将文本编辑的文本作为纯文本返回。
+
+属性 plainText 的获取器。
+
+
+--------------------------------
+## undo()
+
+撤消上一个操作。
+
+如果没有要撤消的操作，即撤消/重做历史记录中没有撤消步骤，则不会发生任何事情。
+
+
+--------------------------------
+## undoAvailable(b)
+
+参数：
+
+- b – bool
+
+每当撤消操作可用（可用为真）或不可用（可用为假）时就会发射此信号。
+
+
+--------------------------------
+## wordWrapMode()
+
+返回值：WrapMode
+
+
+--------------------------------
+## zoomIn([range=1])
+
+参数：
+
+- range – int
+
+通过使基本字体大小范围点变大并重新计算所有字体大小为新大小来放大文本。这不会改变任何图像的大小。
+
+
+--------------------------------
+## zoomInF(range)
+
+参数：
+
+- range – float
+
+
+--------------------------------
+## zoomOut([range=1])
+
+参数：
+
+- range – int
+
+通过缩小基本字体大小范围点并重新计算所有字体大小为新大小来缩小文本。这不会改变任何图像的大小。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.md b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.md
new file mode 100644
index 0000000..fb4aab3
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.md
@@ -0,0 +1,1684 @@
+
+[Chinese doc](QTextEdit.CN.md)
+
+# class QTextEdit
+
+The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+
+
+# Synopsis
+
+## Properties
+
+- [acceptRichText](#property-acceptrichtext--bool)
+
+    Whether the text edit accepts rich text insertions by the user
+
+- [autoFormatting](#property-autoformatting--combination-of-qtexteditautoformattingflag)
+
+    The enabled set of auto formatting features
+
+- [cursorWidth](#property-cursorwidth--int)
+
+- [document](#property-document--qtextdocument)
+
+    The underlying document of the text editor
+
+- [documentTitle](#property-documenttitle--str)
+
+    The title of the document parsed from the text
+
+- [html](#property-html--str)
+
+- [lineWrapColumnOrWidth](#property-linewrapcolumnorwidth--int)
+
+    The position (in pixels or columns depending on the wrap mode) where text will be wrapped
+
+- [lineWrapMode](#property-linewrapmode--qtexteditlinewrapmode)
+
+    The line wrap mode
+
+- [markdown](#property-markdown--str)
+
+- [overwriteMode](#property-overwritemode--bool)
+
+    Whether text entered by the user will overwrite existing text
+
+- [placeholderText](#property-placeholdertext--str)
+
+    The editor placeholder text
+
+- [plainText](#property-plaintext--str)
+
+    The text editor’s contents as plain text
+
+- [readOnly](#property-readonly--bool)
+
+    Whether the text edit is read-only
+
+- [tabChangesFocus](#property-tabchangesfocus--bool)
+
+    Whether Tab changes focus or is accepted as input
+
+- [tabStopDistance](#property-tabstopdistance--float)
+
+    The tab stop distance in pixels
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+- [undoRedoEnabled](#property-undoredoenabled--bool)
+
+    Whether undo and redo are enabled
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def acceptRichText()](#acceptrichtext)
+
+- [def alignment()](#alignment)
+
+- [def anchorAt()](#anchoratpos)
+
+- [def autoFormatting()](#autoformatting)
+
+- [def canPaste()](#canpaste)
+
+- [def createStandardContextMenu()](#createstandardcontextmenu)
+
+- [def currentCharFormat()](#currentcharformat)
+
+- [def currentFont()](#currentfont)
+
+- [def cursorForPosition()](#cursorforpositionpos)
+
+- [def cursorRect()](#cursorrect)
+
+- [def cursorWidth()](#cursorwidth)
+
+- [def document()](#document)
+
+- [def documentTitle()](#documenttitle)
+
+- [def ensureCursorVisible()](#ensurecursorvisible)
+
+- [def extraSelections()](#extraselections)
+
+- [def find()](#findexp-optionsqtextdocumentfindflags)
+
+- [def fontFamily()](#fontfamily)
+
+- [def fontItalic()](#fontitalic)
+
+- [def fontPointSize()](#fontpointsize)
+
+- [def fontUnderline()](#fontunderline)
+
+- [def fontWeight()](#fontweight)
+
+- [def inputMethodQuery()](#inputmethodqueryquery-argument)
+
+- [def isReadOnly()](#isreadonly)
+
+- [def isUndoRedoEnabled()](#isundoredoenabled)
+
+- [def lineWrapColumnOrWidth()](#linewrapcolumnorwidth)
+
+- [def lineWrapMode()](#linewrapmode)
+
+- [def mergeCurrentCharFormat()](#mergecurrentcharformatmodifier)
+
+- [def moveCursor()](#movecursoroperation-modeqtextcursormoveanchor)
+
+- [def overwriteMode()](#overwritemode)
+
+- [def placeholderText()](#placeholdertext)
+
+- [def print_()](#print_printer)
+
+- [def setAcceptRichText()](#setacceptrichtextaccept)
+
+- [def setAutoFormatting()](#setautoformattingfeatures)
+
+- [def setCurrentCharFormat()](#setcurrentcharformatformat)
+
+- [def setCursorWidth()](#setcursorwidthwidth)
+
+- [def setDocument()](#setdocumentdocument)
+
+- [def setDocumentTitle()](#setdocumenttitletitle)
+
+- [def setExtraSelections()](#setextraselectionsselections)
+
+- [def setLineWrapColumnOrWidth()](#setlinewrapcolumnorwidthw)
+
+- [def setLineWrapMode()](#setlinewrapmodemode)
+
+- [def setOverwriteMode()](#setoverwritemodeoverwrite)
+
+- [def setPlaceholderText()](#setplaceholdertextplaceholdertext)
+
+- [def setReadOnly()](#setreadonlyro)
+
+- [def setTabChangesFocus()](#settabchangesfocusb)
+
+- [def setTabStopDistance()](#settabstopdistancedistance)
+
+- [def setTextCursor()](#settextcursorcursor)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setUndoRedoEnabled()](#setundoredoenabledenable)
+
+- [def setWordWrapMode()](#setwordwrapmodepolicy)
+
+- [def tabChangesFocus()](#tabchangesfocus)
+
+- [def tabStopDistance()](#tabstopdistance)
+
+- [def textBackgroundColor()](#textbackgroundcolor)
+
+- [def textColor()](#textcolor)
+
+- [def textCursor()](#textcursor)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+- [def toHtml()](#tohtml)
+
+- [def toMarkdown()](#tomarkdownfeaturesqtextdocumentmarkdowndialectgithub)
+
+- [def toPlainText()](#toplaintext)
+
+- [def wordWrapMode()](#wordwrapmode)
+
+- [def zoomInF()](#zoominfrange)
+
+
+## Virtual methods
+
+- [def canInsertFromMimeData()](#caninsertfrommimedatasource)
+
+- [def createMimeDataFromSelection()](#createmimedatafromselection)
+
+- [def doSetTextCursor()](#dosettextcursorcursor)
+
+- [def insertFromMimeData()](#insertfrommimedatasource)
+
+- [def loadResource()](#loadresourcetype-name)
+
+
+## Slots
+
+- [def append()](#appendtext)
+
+- [def clear()](#clear)
+
+- [def copy()](#copy)
+
+- [def cut()](#cut)
+
+- [def insertHtml()](#inserthtmltext)
+
+- [def insertPlainText()](#insertplaintexttext)
+
+- [def paste()](#paste)
+
+- [def redo()](#redo)
+
+- [def scrollToAnchor()](#scrolltoanchorname)
+
+- [def selectAll()](#selectall)
+
+- [def setAlignment()](#setalignmenta)
+
+- [def setCurrentFont()](#setcurrentfontf)
+
+- [def setFontFamily()](#setfontfamilyfontfamily)
+
+- [def setFontItalic()](#setfontitalicb)
+
+- [def setFontPointSize()](#setfontpointsizes)
+
+- [def setFontUnderline()](#setfontunderlineb)
+
+- [def setFontWeight()](#setfontweightw)
+
+- [def setHtml()](#sethtmltext)
+
+- [def setMarkdown()](#setmarkdownmarkdown)
+
+- [def setPlainText()](#setplaintexttext)
+
+- [def setText()](#settextcolorc)
+
+- [def setTextBackgroundColor()](#settextbackgroundcolorc)
+
+- [def setTextColor()](#settextcolorc)
+
+- [def undo()](#undo)
+
+- [def zoomIn()](#zoominrange1)
+
+- [def zoomOut()](#zoomoutrange1)
+
+
+## Signals
+
+- [def copyAvailable()](#copyavailableb)
+
+- [def currentCharFormatChanged()](#currentcharformatchangedformat)
+
+- [def cursorPositionChanged()](#cursorpositionchanged)
+
+- [def redoAvailable()](#redoavailableb)
+
+- [def selectionChanged()](#selectionchanged)
+
+- [def textChanged()](#textchanged)
+
+- [def undoAvailable()](#undoavailableb)
+
+
+# Detailed Description
+
+## Introduction and Concepts
+
+QTextEdit is an advanced WYSIWYG viewer/editor supporting rich text formatting using HTML-style tags, or Markdown format. It is optimized to handle large documents and to respond quickly to user input.
+
+QTextEdit works on paragraphs and characters. A paragraph is a formatted string which is word-wrapped to fit into the width of the widget. By default when reading plain text, one newline signifies a paragraph. A document consists of zero or more paragraphs. The words in the paragraph are aligned in accordance with the paragraph’s alignment. Paragraphs are separated by hard line breaks. Each character within a paragraph has its own attributes, for example, font and color.
+
+QTextEdit can display images, lists and tables. If the text is too large to view within the text edit’s viewport, scroll bars will appear. The text edit can load both plain text and rich text files. Rich text can be described using a subset of HTML 4 markup; refer to the Supported HTML Subset page for more information.
+
+If you just need to display a small piece of rich text use QLabel .
+
+The rich text support in Qt is designed to provide a fast, portable and efficient way to add reasonable online help facilities to applications, and to provide a basis for rich text editors. If you find the HTML support insufficient for your needs you may consider the use of Qt WebKit, which provides a full-featured web browser widget.
+
+The shape of the mouse cursor on a QTextEdit is Qt::IBeamCursor by default. It can be changed through the viewport() ‘s cursor property.
+
+
+## Using QTextEdit as a Display Widget
+
+QTextEdit can display a large HTML subset, including tables and images.
+
+The text can be set or replaced using setHtml() which deletes any existing text and replaces it with the text passed in the setHtml() call. If you call setHtml() with legacy HTML, and then call toHtml() , the text that is returned may have different markup, but will render the same. The entire text can be deleted with clear() .
+
+Text can also be set or replaced using setMarkdown() , and the same caveats apply: if you then call toMarkdown() , the text that is returned may be different, but the meaning is preserved as much as possible. Markdown with some embedded HTML can be parsed, with the same limitations that setHtml() has; but toMarkdown() only writes “pure” Markdown, without any embedded HTML.
+
+Text itself can be inserted using the QTextCursor class or using the convenience functions insertHtml() , insertPlainText() , append() or paste() . QTextCursor is also able to insert complex objects like tables or lists into the document, and it deals with creating selections and applying changes to selected text.
+
+By default the text edit wraps words at whitespace to fit within the text edit widget. The setLineWrapMode() function is used to specify the kind of line wrap you want, or NoWrap if you don’t want any wrapping. Call setLineWrapMode() to set a fixed pixel width FixedPixelWidth , or character column (e.g. 80 column) FixedColumnWidth with the pixels or columns specified with setLineWrapColumnOrWidth() . If you use word wrap to the widget’s width WidgetWidth , you can specify whether to break on whitespace or anywhere with setWordWrapMode() .
+
+The find() function can be used to find and select a given string within the text.
+
+If you want to limit the total number of paragraphs in a QTextEdit , as for example it is often useful in a log viewer, then you can use QTextDocument’s maximumBlockCount property for that.
+
+
+## Read-only Key Bindings
+
+When QTextEdit is used read-only the key bindings are limited to navigation, and text may only be selected with the mouse:
+
+| Keypresses | Action                               |
+| ---------- | ------------------------------------ |
+| Up         | Moves one line up.                   |
+| Down       | Moves one line down.                 |
+| Left       | Moves one character to the left.     |
+| Right      | Moves one character to the right.    |
+| PageUp     | Moves one (viewport) page up.        |
+| PageDown   | Moves one (viewport) page down.      |
+| Home       | Moves to the beginning of the text.  |
+| End        | Moves to the end of the text.        |
+| Alt+Wheel  | Scrolls the page horizontally (the Wheel is the mouse wheel). |
+| Ctrl+Wheel | Zooms the text.                      |
+| Ctrl+A     | Selects all text.                    |
+
+The text edit may be able to provide some meta-information. For example, the documentTitle() function will return the text from within HTML <title> tags.
+
+
+## Using QTextEdit as an Editor
+
+All the information about using QTextEdit as a display widget also applies here.
+
+The current char format’s attributes are set with setFontItalic() , setFontWeight() , setFontUnderline() , setFontFamily() , setFontPointSize() , setTextColor() and setCurrentFont() . The current paragraph’s alignment is set with setAlignment() .
+
+Selection of text is handled by the QTextCursor class, which provides functionality for creating selections, retrieving the text contents or deleting selections. You can retrieve the object that corresponds with the user-visible cursor using the textCursor() method. If you want to set a selection in QTextEdit just create one on a QTextCursor object and then make that cursor the visible cursor using setTextCursor() . The selection can be copied to the clipboard with copy() , or cut to the clipboard with cut() . The entire text can be selected using selectAll() .
+
+When the cursor is moved and the underlying formatting attributes change, the currentCharFormatChanged() signal is emitted to reflect the new attributes at the new cursor position.
+
+The textChanged() signal is emitted whenever the text changes (as a result of setText() or through the editor itself).
+
+QTextEdit holds a QTextDocument object which can be retrieved using the document() method. You can also set your own document object using setDocument() .
+
+QTextDocument provides an isModified() function which will return true if the text has been modified since it was either loaded or since the last call to setModified with false as argument. In addition it provides methods for undo and redo.
+
+
+## Drag and Drop
+
+QTextEdit also supports custom drag and drop behavior. By default, QTextEdit will insert plain text, HTML and rich text when the user drops data of these MIME types onto a document. Reimplement canInsertFromMimeData() and insertFromMimeData() to add support for additional MIME types.
+
+For example, to allow the user to drag and drop an image onto a QTextEdit , you could the implement these functions in the following way:
+
+```python
+def canInsertFromMimeData(self, QMimeData source ):
+
+    if source.hasImage():
+        return True
+else:
+        return QTextEdit.canInsertFromMimeData(source)
+```
+
+We add support for image MIME types by returning true. For all other MIME types, we use the default implementation.
+
+```bash
+def insertFromMimeData(self, source):
+
+    if source.hasImage():
+
+        image = QImage(source.imageData())
+        cursor = self.textCursor()
+        document = self.document()
+        document.addResource(QTextDocument.ImageResource, QUrl("image"), image)
+        cursor.insertImage("image")
+```
+
+We unpack the image from the QVariant held by the MIME source and insert it into the document as a resource.
+
+
+## Editing Key Bindings
+
+The list of key bindings which are implemented for editing:
+
+| Keypresses   | Action                                            |
+| ------------ | ------------------------------------------------- |
+| Backspace    | Deletes the character to the left of the cursor.  |
+| Delete       | Deletes the character to the right of the cursor. |
+| Ctrl+C       | Copy the selected text to the clipboard.          |
+| Ctrl+Insert  | Copy the selected text to the clipboard.          |
+| Ctrl+K       | Deletes to the end of the line.                   |
+| Ctrl+V       | Pastes the clipboard text into text edit.         |
+| Shift+Insert | Pastes the clipboard text into text edit.         |
+| Ctrl+X       | Deletes the selected text and copies it to the clipboard. |
+| Shift+Delete | Deletes the selected text and copies it to the clipboard. |
+| Ctrl+Z       | Undoes the last operation.                        |
+| Ctrl+Y       | Redoes the last operation.                        |
+| Left         | Moves the cursor one character to the left.       |
+| Ctrl+Left    | Moves the cursor one word to the left.            |
+| Right        | Moves the cursor one character to the right.      |
+| Ctrl+Right   | Moves the cursor one word to the right.           |
+| Up           | Moves the cursor one line up.                     |
+| Down         | Moves the cursor one line down.                   |
+| PageUp       | Moves the cursor one page up.                     |
+| PageDown     | Moves the cursor one page down.                   |
+| Home         | Moves the cursor to the beginning of the line.    |
+| Ctrl+Home    | Moves the cursor to the beginning of the text.    |
+| End          | Moves the cursor to the end of the line.          |
+| Ctrl+End     | Moves the cursor to the end of the text.          |
+| Alt+Wheel    | Scrolls the page horizontally (the Wheel is the mouse wheel). |
+
+To select (mark) text hold down the Shift key whilst pressing one of the movement keystrokes, for example, Shift+Right will select the character to the right, and Shift+Ctrl+Right will select the word to the right, etc.
+
+
+--------------------------------
+## class LineWrapMode
+
+| Constant                   | Description |
+| -------------------------- | ----------- |
+| QTextEdit.NoWrap           |             |
+| QTextEdit.WidgetWidth      |             |
+| QTextEdit.FixedPixelWidth  |             |
+| QTextEdit.FixedColumnWidth |             |
+
+
+--------------------------------
+## class AutoFormattingFlag
+
+| Constant                 | Description |
+| ------------------------ | ----------- |
+| QTextEdit.AutoNone       | (inherits enum.Flag) Don’t do any automatic formatting. |
+| QTextEdit.AutoBulletList | Automatically create bullet lists e.g. when the user enters an asterisk (’*’) in the left most column, or presses Enter in an existing list item. |
+| QTextEdit.AutoAll        | Apply all automatic formatting. Currently only automatic bullet lists are supported. |
+
+
+--------------------------------
+## property acceptRichText : bool
+
+This property holds whether the text edit accepts rich text insertions by the user.
+
+When this property is set to false text edit will accept only plain text input from the user. For example through clipboard or drag and drop.
+
+This property’s default is true.
+
+Access functions:
+
+- acceptRichText()
+- setAcceptRichText()
+
+
+--------------------------------
+## property autoFormatting : Combination of QTextEdit.AutoFormattingFlag
+
+This property holds the enabled set of auto formatting features.
+
+The value can be any combination of the values in the AutoFormattingFlag enum. The default is AutoNone . Choose AutoAll to enable all automatic formatting.
+
+Currently, the only automatic formatting feature provided is AutoBulletList ; future versions of Qt may offer more.
+
+Access functions:
+
+- autoFormatting()
+- setAutoFormatting()
+
+
+--------------------------------
+## property cursorWidth : int
+
+This property specifies the width of the cursor in pixels. The default value is 1.
+
+Access functions:
+
+- cursorWidth()
+- setCursorWidth()
+
+
+--------------------------------
+## property document : QTextDocument
+
+This property holds the underlying document of the text editor..
+
+Access functions:
+
+- document()
+- setDocument()
+
+
+--------------------------------
+## property documentTitle : str
+
+This property holds the title of the document parsed from the text..
+
+By default, for a newly-created, empty document, this property contains an empty string.
+
+Access functions:
+
+- documentTitle()
+- setDocumentTitle()
+
+
+--------------------------------
+## property html : str
+
+This property provides an HTML interface to the text of the text edit.
+
+toHtml() returns the text of the text edit as html.
+
+setHtml() changes the text of the text edit. Any previous text is removed and the undo/redo history is cleared. The input text is interpreted as rich text in html format. currentCharFormat() is also reset, unless textCursor() is already at the beginning of the document.
+
+By default, for a newly-created, empty document, this property contains text to describe an HTML 4.0 document with no body text.
+
+Access functions:
+
+- toHtml()
+- setHtml()
+- Signal textChanged()
+
+
+--------------------------------
+## property lineWrapColumnOrWidth : int
+
+This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped.
+
+If the wrap mode is FixedPixelWidth , the value is the number of pixels from the left edge of the text edit at which text should be wrapped. If the wrap mode is FixedColumnWidth , the value is the column number (in character columns) from the left edge of the text edit at which text should be wrapped.
+
+By default, this property contains a value of 0.
+
+Access functions:
+
+- lineWrapColumnOrWidth()
+- setLineWrapColumnOrWidth()
+
+
+--------------------------------
+## property lineWrapMode : QTextEdit.LineWrapMode
+
+This property holds the line wrap mode.
+
+The default mode is WidgetWidth which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use setWordWrapMode() . If you set a wrap mode of FixedPixelWidth or FixedColumnWidth you should also call setLineWrapColumnOrWidth() with the width you want.
+
+Access functions:
+
+- lineWrapMode()
+- setLineWrapMode()
+
+
+--------------------------------
+## property markdown : str
+
+This property provides a Markdown interface to the text of the text edit.
+
+toMarkdown() returns the text of the text edit as “pure” Markdown, without any embedded HTML formatting. Some features that QTextDocument supports (such as the use of specific colors and named fonts) cannot be expressed in “pure” Markdown, and they will be omitted.
+
+setMarkdown() changes the text of the text edit. Any previous text is removed and the undo/redo history is cleared. The input text is interpreted as rich text in Markdown format.
+
+Parsing of HTML included in the markdown string is handled in the same way as in setHtml ; however, Markdown formatting inside HTML blocks is not supported.
+
+Some features of the parser can be enabled or disabled via the features argument:
+
+- MarkdownNoHTML
+- Any HTML tags in the Markdown text will be discarded
+
+The default is MarkdownDialectGitHub.
+
+Access functions:
+
+- toMarkdown()
+- setMarkdown()
+- Signal textChanged()
+
+
+--------------------------------
+## property overwriteMode : bool
+
+This property holds whether text entered by the user will overwrite existing text.
+
+As with many text editors, the text editor widget can be configured to insert or overwrite existing text with new text entered by the user.
+
+If this property is true, existing text is overwritten, character-for-character by new text; otherwise, text is inserted at the cursor position, displacing existing text.
+
+By default, this property is false (new text does not overwrite existing text).
+
+Access functions:
+
+- overwriteMode()
+- setOverwriteMode()
+
+
+--------------------------------
+## property placeholderText : str
+
+This property holds the editor placeholder text.
+
+Setting this property makes the editor display a grayed-out placeholder text as long as the document() is empty.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property plainText : str
+
+This property holds the text editor’s contents as plain text..
+
+Previous contents are removed and undo/redo history is reset when the property is set. currentCharFormat() is also reset, unless textCursor() is already at the beginning of the document.
+
+If the text edit has another content type, it will not be replaced by plain text if you call toPlainText() . The only exception to this is the non-break space, nbsp;, that will be converted into standard space.
+
+By default, for an editor with no contents, this property contains an empty string.
+
+Access functions:
+
+- toPlainText()
+- setPlainText()
+
+
+--------------------------------
+## property readOnly : bool
+
+This property holds whether the text edit is read-only.
+
+In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.
+
+This property’s default is false.
+
+Access functions:
+
+- isReadOnly()
+- setReadOnly()
+
+
+--------------------------------
+## property tabChangesFocus : bool
+
+This property holds whether Tab changes focus or is accepted as input.
+
+In some occasions text edits should not allow the user to input tabulators or change indentation using the Tab key, as this breaks the focus chain. The default is false.
+
+Access functions:
+
+- tabChangesFocus()
+- setTabChangesFocus()
+
+
+--------------------------------
+## property tabStopDistance : float
+
+This property holds the tab stop distance in pixels.
+
+By default, this property contains a value of 80 pixels.
+
+Do not set a value less than the horizontalAdvance() of the QChar::VisualTabCharacter character, otherwise the tab-character will be drawn incompletely.
+
+Access functions:
+
+- tabStopDistance()
+- setTabStopDistance()
+
+
+--------------------------------
+## property textInteractionFlags : Combination of Qt.TextInteractionFlag
+
+Specifies how the widget should interact with user input.
+
+The default value depends on whether the QTextEdit is read-only or editable, and whether it is a QTextBrowser or not.
+
+Access functions:
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+
+--------------------------------
+## property undoRedoEnabled : bool
+
+This property holds whether undo and redo are enabled..
+
+Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).
+
+Access functions:
+
+- isUndoRedoEnabled()
+- setUndoRedoEnabled()
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+Parameters:
+
+- text – str
+- parent – QWidget
+
+Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs an empty QTextEdit with parent parent.
+
+
+--------------------------------
+## acceptRichText()
+
+Return type: bool
+
+Getter of property acceptRichText  .
+
+
+--------------------------------
+## alignment()
+
+Return type: Combination of AlignmentFlag
+
+Returns the alignment of the current paragraph.
+
+
+--------------------------------
+## anchorAt(pos)
+
+Parameters:
+
+- pos – QPoint
+
+Return type: str
+
+Returns the reference of the anchor at position pos, or an empty string if no anchor exists at that point.
+
+
+--------------------------------
+## append(text)
+
+Parameters:
+
+- text – str
+
+Appends a new paragraph with text to the end of the text edit.
+
+
+--------------------------------
+## autoFormatting()
+
+Return type: Combination of AutoFormattingFlag
+
+Getter of property autoFormatting  .
+
+
+--------------------------------
+## canInsertFromMimeData(source)
+
+Parameters:
+
+- source – QMimeData
+
+Return type: bool
+
+This function returns true if the contents of the MIME data object, specified by source, can be decoded and inserted into the document. It is called for example when during a drag operation the mouse enters this widget and it is necessary to determine whether it is possible to accept the drag and drop operation.
+
+Reimplement this function to enable drag and drop support for additional MIME types.
+
+
+--------------------------------
+## canPaste()
+
+Return type: bool
+
+Returns whether text can be pasted from the clipboard into the textedit.
+
+
+--------------------------------
+## clear()
+
+Deletes all the text in the text edit.
+
+
+--------------------------------
+## copy()
+
+Copies any selected text to the clipboard.
+
+
+--------------------------------
+## copyAvailable(b)
+
+Parameters:
+
+- b – bool
+
+This signal is emitted when text is selected or de-selected in the text edit.
+
+When text is selected this signal will be emitted with yes set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with yes set to false.
+
+If yes is true then copy() can be used to copy the selection to the clipboard. If yes is false then copy() does nothing.
+
+
+--------------------------------
+## createMimeDataFromSelection()
+
+Return type: QMimeData
+
+This function returns a new MIME data object to represent the contents of the text edit’s current selection. It is called when the selection needs to be encapsulated into a new QMimeData object; for example, when a drag and drop operation is started, or when data is copied to the clipboard.
+
+If you reimplement this function, note that the ownership of the returned QMimeData object is passed to the caller. The selection can be retrieved by using the textCursor() function.
+
+
+--------------------------------
+## createStandardContextMenu()
+
+Return type: QMenu
+
+This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu’s ownership is transferred to the caller.
+
+We recommend that you use the createStandardContextMenu(QPoint) version instead which will enable the actions that are sensitive to where the user clicked.
+
+
+--------------------------------
+## createStandardContextMenu(position)
+
+Parameters:
+
+- position – QPoint
+
+Return type: QMenu
+
+This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler and it takes the position in document coordinates where the mouse click was. This can enable actions that are sensitive to the position where the user clicked. The popup menu’s ownership is transferred to the caller.
+
+
+--------------------------------
+## currentCharFormat()
+
+Return type: QTextCharFormat
+
+Returns the char format that is used when inserting new text.
+
+
+--------------------------------
+## currentCharFormatChanged(format)
+
+Parameters:
+
+- format – QTextCharFormat
+
+This signal is emitted if the current character format has changed, for example caused by a change of the cursor position.
+
+The new format is f.
+
+
+--------------------------------
+## currentFont()
+
+Return type: QFont
+
+Returns the font of the current format.
+
+
+--------------------------------
+## cursorForPosition(pos)
+
+Parameters:
+
+- pos – QPoint
+
+Return type: QTextCursor
+
+returns a QTextCursor at position pos (in viewport coordinates).
+
+
+--------------------------------
+## cursorPositionChanged()
+
+This signal is emitted whenever the position of the cursor changed.
+
+
+--------------------------------
+## cursorRect()
+
+Return type: QRect
+
+returns a rectangle (in viewport coordinates) that includes the cursor of the text edit.
+
+
+--------------------------------
+## cursorRect(cursor)
+
+Parameters:
+
+- cursor – QTextCursor
+
+Return type: QRect
+
+returns a rectangle (in viewport coordinates) that includes the cursor.
+
+
+--------------------------------
+## cursorWidth()
+
+Return type: int
+
+Getter of property cursorWidth  .
+
+
+--------------------------------
+## cut()
+
+Copies the selected text to the clipboard and deletes it from the text edit.
+
+If there is no selected text nothing happens.
+
+
+--------------------------------
+## doSetTextCursor(cursor)
+
+Parameters:
+
+- cursor – QTextCursor
+
+
+--------------------------------
+## document()
+
+Return type: QTextDocument
+
+Getter of property document  .
+
+
+--------------------------------
+## documentTitle()
+
+Return type: str
+
+Getter of property documentTitle  .
+
+
+--------------------------------
+## ensureCursorVisible()
+
+Ensures that the cursor is visible by scrolling the text edit if necessary.
+
+
+--------------------------------
+## extraSelections()
+
+Return type: list of QTextEdit.ExtraSelection
+
+Returns previously set extra selections.
+
+
+--------------------------------
+## find(exp[, options=QTextDocument.FindFlags()])
+
+Parameters:
+
+- exp – QRegularExpression
+- options – Combination of FindFlag
+
+Return type: bool
+
+This is an overloaded function.
+
+Finds the next occurrence, matching the regular expression, exp, using the given options.
+
+Returns true if a match was found and changes the cursor to select the match; otherwise returns false.
+
+
+--------------------------------
+## find(exp[, options=QTextDocument.FindFlags()])
+
+Parameters:
+
+- exp – str
+- options – Combination of FindFlag
+
+Return type: bool
+
+Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.
+
+
+--------------------------------
+## fontFamily()
+
+Return type: str
+
+Returns the font family of the current format.
+
+
+--------------------------------
+## fontItalic()
+
+Return type: bool
+
+Returns true if the font of the current format is italic; otherwise returns false.
+
+
+--------------------------------
+## fontPointSize()
+
+Return type: float
+
+Returns the point size of the font of the current format.
+
+
+--------------------------------
+## fontUnderline()
+
+Return type: bool
+
+Returns true if the font of the current format is underlined; otherwise returns false.
+
+
+--------------------------------
+## fontWeight()
+
+Return type: int
+
+Returns the font weight of the current format.
+
+
+--------------------------------
+## inputMethodQuery(query, argument)
+
+Parameters:
+
+- query – InputMethodQuery
+- argument – object
+
+Return type: object
+
+
+--------------------------------
+## insertFromMimeData(source)
+
+Parameters:
+
+- source – QMimeData
+
+This function inserts the contents of the MIME data object, specified by source, into the text edit at the current cursor position. It is called whenever text is inserted as the result of a clipboard paste operation, or when the text edit accepts data from a drag and drop operation.
+
+Reimplement this function to enable drag and drop support for additional MIME types.
+
+
+--------------------------------
+## insertHtml(text)
+
+Parameters:
+
+- text – str
+
+Convenience slot that inserts text which is assumed to be of html formatting at the current cursor position.
+
+It is equivalent to:
+
+```python
+edit.textCursor().insertHtml(fragment)
+```
+
+
+--------------------------------
+## insertPlainText(text)
+
+Parameters:
+
+- text – str
+
+Convenience slot that inserts text at the current cursor position.
+
+It is equivalent to
+
+```python
+edit.textCursor().insertText(text)
+```
+
+
+--------------------------------
+## isReadOnly()
+
+Return type: bool
+
+Getter of property readOnly  .
+
+
+--------------------------------
+## isUndoRedoEnabled()
+
+Return type: bool
+
+Getter of property undoRedoEnabled  .
+
+
+--------------------------------
+## lineWrapColumnOrWidth()
+
+Return type: int
+
+Getter of property lineWrapColumnOrWidth  .
+
+
+--------------------------------
+## lineWrapMode()
+
+Return type: LineWrapMode
+
+Getter of property lineWrapMode  .
+
+
+--------------------------------
+## loadResource(type, name)
+
+Parameters:
+
+- type – int
+- name – QUrl
+
+Return type: object
+
+Loads the resource specified by the given type and name.
+
+This function is an extension of QTextDocument::loadResource().
+
+
+--------------------------------
+## mergeCurrentCharFormat(modifier)
+
+Parameters:
+
+- modifier – QTextCharFormat
+
+Merges the properties specified in modifier into the current character format by calling QTextCursor::mergeCharFormat on the editor’s cursor. If the editor has a selection then the properties of modifier are directly applied to the selection.
+
+
+--------------------------------
+## moveCursor(operation[, mode=QTextCursor.MoveAnchor])
+
+Parameters:
+
+- operation – MoveOperation
+- mode – MoveMode
+
+Moves the cursor by performing the given operation.
+
+If mode is QTextCursor::KeepAnchor, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.
+
+
+--------------------------------
+## overwriteMode()
+
+Return type: bool
+
+Getter of property overwriteMode  .
+
+
+--------------------------------
+## paste()
+
+Pastes the text from the clipboard into the text edit at the current cursor position.
+
+If there is no text in the clipboard nothing happens.
+
+To change the behavior of this function, i.e. to modify what QTextEdit can paste and how it is being pasted, reimplement the virtual canInsertFromMimeData() and insertFromMimeData() functions.
+
+
+--------------------------------
+## placeholderText()
+
+Return type: str
+
+Getter of property placeholderText  .
+
+
+--------------------------------
+## print_(printer)
+
+Parameters:
+
+- printer – QPagedPaintDevice
+
+
+--------------------------------
+## redo()
+
+Redoes the last operation.
+
+If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.
+
+
+--------------------------------
+## redoAvailable(b)
+
+Parameters:
+
+- b – bool
+
+This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).
+
+
+--------------------------------
+## scrollToAnchor(name)
+
+Parameters:
+
+- name – str
+
+Scrolls the text edit so that the anchor with the given name is visible; does nothing if the name is empty, or is already visible, or isn’t found.
+
+
+--------------------------------
+## selectAll()
+
+Selects all text.
+
+
+--------------------------------
+## selectionChanged()
+
+This signal is emitted whenever the selection changes.
+
+
+--------------------------------
+## setAcceptRichText(accept)
+
+Parameters:
+
+- accept – bool
+
+Setter of property acceptRichText  .
+
+
+--------------------------------
+## setAlignment(a)
+
+Parameters:
+
+- a – Combination of AlignmentFlag
+
+Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).
+
+
+--------------------------------
+## setAutoFormatting(features)
+
+Parameters:
+
+- features – Combination of AutoFormattingFlag
+
+Setter of property autoFormatting  .
+
+
+--------------------------------
+## setCurrentCharFormat(format)
+
+Parameters:
+
+- format – QTextCharFormat
+
+Sets the char format that is be used when inserting new text to format by calling QTextCursor::setCharFormat() on the editor’s cursor. If the editor has a selection then the char format is directly applied to the selection.
+
+
+--------------------------------
+## setCurrentFont(f)
+
+Parameters:
+
+- f – QFont
+
+Sets the font of the current format to f.
+
+
+--------------------------------
+## setCursorWidth(width)
+
+Parameters:
+
+- width – int
+
+Setter of property cursorWidth  .
+
+
+--------------------------------
+## setDocument(document)
+
+Parameters:
+
+- document – QTextDocument
+
+Setter of property document  .
+
+
+--------------------------------
+## setDocumentTitle(title)
+
+Parameters:
+
+- title – str
+
+Setter of property documentTitle  .
+
+
+--------------------------------
+## setExtraSelections(selections)
+
+Parameters:
+
+- selections – .list of QTextEdit.ExtraSelection
+
+This function allows temporarily marking certain regions in the document with a given color, specified as selections. This can be useful for example in a programming editor to mark a whole line of text with a given background color to indicate the existence of a breakpoint.
+
+
+--------------------------------
+## setFontFamily(fontFamily)
+
+Parameters:
+
+- fontFamily – str
+
+Sets the font family of the current format to fontFamily.
+
+
+--------------------------------
+## setFontItalic(b)
+
+Parameters:
+
+- b – bool
+
+If italic is true, sets the current format to italic; otherwise sets the current format to non-italic.
+
+
+--------------------------------
+## setFontPointSize(s)
+
+Parameters:
+
+- s – float
+
+Sets the point size of the current format to s.
+
+Note that if s is zero or negative, the behavior of this function is not defined.
+
+
+--------------------------------
+## setFontUnderline(b)
+
+Parameters:
+
+- b – bool
+
+If underline is true, sets the current format to underline; otherwise sets the current format to non-underline.
+
+
+--------------------------------
+## setFontWeight(w)
+
+Parameters:
+
+- w – int
+
+Sets the font weight of the current format to the given weight, where the value used is in the range defined by the QFont::Weight enum.
+
+
+--------------------------------
+## setHtml(text)
+
+Parameters:
+
+- text – str
+
+Setter of property html  .
+
+
+--------------------------------
+## setLineWrapColumnOrWidth(w)
+
+Parameters:
+
+- w – int
+
+Setter of property lineWrapColumnOrWidth  .
+
+
+--------------------------------
+## setLineWrapMode(mode)
+
+Parameters:
+
+- mode – LineWrapMode
+
+Setter of property lineWrapMode  .
+
+
+--------------------------------
+## setMarkdown(markdown)
+
+Parameters:
+
+- markdown – str
+
+Setter of property markdown  .
+
+
+--------------------------------
+## setOverwriteMode(overwrite)
+
+Parameters:
+
+- overwrite – bool
+
+Setter of property overwriteMode  .
+
+
+--------------------------------
+## setPlaceholderText(placeholderText)
+
+Parameters:
+
+- placeholderText – str
+
+Setter of property placeholderText  .
+
+
+--------------------------------
+## setPlainText(text)
+
+Parameters:
+
+- text – str
+
+Changes the text of the text edit to the string text. Any previous text is removed.
+
+Setter of property plainText  .
+
+
+--------------------------------
+## setReadOnly(ro)
+
+Parameters:
+
+- ro – bool
+
+Setter of property readOnly  .
+
+
+--------------------------------
+## setTabChangesFocus(b)
+
+Parameters:
+
+- b – bool
+
+Setter of property tabChangesFocus  .
+
+
+--------------------------------
+## setTabStopDistance(distance)
+
+Parameters:
+
+- distance – float
+
+Setter of property tabStopDistance  .
+
+
+--------------------------------
+setText(text)
+
+Parameters:
+
+- text – str
+
+Sets the text edit’s text. The text can be plain text or HTML and the text edit will try to guess the right format.
+
+Use setHtml() or setPlainText() directly to avoid text edit’s guessing.
+
+
+--------------------------------
+## setTextBackgroundColor(c)
+
+Parameters:
+
+- c – QColor
+
+Sets the text background color of the current format to c.
+
+
+--------------------------------
+## setTextColor(c)
+
+Parameters:
+
+- c – QColor
+
+Sets the text color of the current format to c.
+
+
+--------------------------------
+## setTextCursor(cursor)
+
+Parameters:
+
+- cursor – QTextCursor
+
+Sets the visible cursor.
+
+
+--------------------------------
+## setTextInteractionFlags(flags)
+
+Parameters:
+
+- flags – Combination of TextInteractionFlag
+
+Setter of property textInteractionFlags  .
+
+
+--------------------------------
+## setUndoRedoEnabled(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property undoRedoEnabled  .
+
+
+--------------------------------
+## setWordWrapMode(policy)
+
+Parameters:
+
+- policy – WrapMode
+
+
+--------------------------------
+## tabChangesFocus()
+
+Return type: bool
+
+Getter of property tabChangesFocus  .
+
+
+--------------------------------
+## tabStopDistance()
+
+Return type: float
+
+Getter of property tabStopDistance  .
+
+
+--------------------------------
+## textBackgroundColor()
+
+Return type: QColor
+
+Returns the text background color of the current format.
+
+
+--------------------------------
+## textChanged()
+
+This signal is emitted whenever the document’s content changes; for example, when text is inserted or deleted, or when formatting is applied.
+
+Notification signal of property markdown  .
+
+
+--------------------------------
+## textColor()
+
+Return type: QColor
+
+Returns the text color of the current format.
+
+
+--------------------------------
+## textCursor()
+
+Return type: QTextCursor
+
+Returns a copy of the QTextCursor that represents the currently visible cursor. Note that changes on the returned cursor do not affect QTextEdit ‘s cursor; use setTextCursor() to update the visible cursor.
+
+
+--------------------------------
+## textInteractionFlags()
+
+Return type: Combination of TextInteractionFlag
+
+Getter of property textInteractionFlags  .
+
+
+--------------------------------
+## toHtml()
+
+Return type: str
+
+Getter of property html  .
+
+
+--------------------------------
+## toMarkdown([features=QTextDocument.MarkdownDialectGitHub])
+
+Parameters:
+
+- features – Combination of MarkdownFeature
+
+Return type: str
+
+
+--------------------------------
+## toPlainText()
+
+Return type: str
+
+
+--------------------------------
+## QString QTextEdit::toPlainText() const
+
+Returns the text of the text edit as plain text.
+
+Getter of property plainText  .
+
+
+--------------------------------
+## undo()
+
+Undoes the last operation.
+
+If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
+
+
+--------------------------------
+## undoAvailable(b)
+
+Parameters:
+
+- b – bool
+
+This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false).
+
+
+--------------------------------
+## wordWrapMode()
+
+Return type: WrapMode
+
+
+--------------------------------
+## zoomIn([range=1])
+
+Parameters:
+
+- range – int
+
+Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.
+
+
+--------------------------------
+## zoomInF(range)
+
+Parameters:
+
+- range – float
+
+
+--------------------------------
+## zoomOut([range=1])
+
+Parameters:
+
+- range – int
+
+Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

From bd92b2671fab004680ef732c88470ab03684632f Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 17:40:42 +0800
Subject: [PATCH 21/38] [PyQt] Add QMessageBox doc.

---
 .../PyQt6/Class-0/QtWidget/QMessageBox.CN.md  | 1233 +++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QMessageBox.md | 1233 +++++++++++++++++
 2 files changed, 2466 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QMessageBox.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
new file mode 100644
index 0000000..da9526c
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
@@ -0,0 +1,1233 @@
+
+[English doc](QMessageBox.md)
+
+# class QMessageBox
+
+QMessageBox 类提供了一个模态对话框，用于通知用户或者向用户提问并得到答案。
+
+
+# Synopsis
+
+## Properties
+
+- [detailedText](#property-detailedtext--str)
+
+    要在详细信息区域中显示的文本。
+
+- [icon](#property-icon--qmessageboxicon)
+
+    消息框的图标。
+
+- [iconPixmap](#property-iconpixmap--qpixmap)
+
+    当前图标。
+
+- [informativeText](#property-informativetext--str)
+
+    为消息提供更详细描述的信息文本。
+
+- [options](#property-options--combination-of-qabstractfileiconprovideroption)
+
+    影响对话框外观的选项。
+
+- [standardButtons](#property-standardbuttons--combination-of-qdialogbuttonboxstandardbutton)
+
+    消息框中的标准按钮集合。
+
+- [text](#property-text--str)
+
+    要显示的消息框文本。
+
+- [textFormat](#property-textformat--qttextformat)
+
+    消息框显示的文本的格式。
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addButton()](#addbuttonbutton)
+
+- [def button()](#buttonwhich)
+
+- [def buttonRole()](#buttonrolebutton)
+
+- [def buttonText()](#buttontextbutton)
+
+- [def buttons()](#buttons)
+
+- [def checkBox()](#checkbox)
+
+- [def clickedButton()](#clickedbutton)
+
+- [def defaultButton()](#defaultbutton)
+
+- [def detailedText()](#detailedtext)
+
+- [def escapeButton()](#escapebutton)
+
+- [def icon()](#icon)
+
+- [def iconPixmap()](#iconpixmap)
+
+- [def informativeText()](#informativetext)
+
+- [def open()](#openreceiver-member)
+
+- [def options()](#options)
+
+- [def removeButton()](#removebuttonbutton)
+
+- [def setButtonText()](#setbuttontextbutton-text)
+
+- [def setCheckBox()](#setcheckboxcb)
+
+- [def setDefaultButton()](#setdefaultbuttonbutton)
+
+- [def setDetailedText()](#setdetailedtexttext)
+
+- [def setEscapeButton()](#setescapebuttonbutton)
+
+- [def setIcon()](#seticonarg__1)
+
+- [def setIconPixmap()](#seticonpixmappixmap)
+
+- [def setInformativeText()](#setinformativetexttext)
+
+- [def setOption()](#setoptionoption-ontrue)
+
+- [def setOptions()](#setoptionsoptions)
+
+- [def setStandardButtons()](#setstandardbuttonsbuttons)
+
+- [def setText()](#settexttext)
+
+- [def setTextFormat()](#settextformatformat)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setWindowModality()](#setwindowmodalitywindowmodality)
+
+- [def setWindowTitle()](#setwindowtitletitle)
+
+- [def standardButton()](#standardbuttonbutton)
+
+- [def standardButtons()](#standardbuttons)
+
+- [def testOption()](#testoptionoption)
+
+- [def text()](#text)
+
+- [def textFormat()](#textformat)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+
+## Signals
+
+- [def buttonClicked()](#buttonclickedbutton)
+
+
+## Static functions
+
+- [def about()](#static-aboutparent-title-text)
+
+- [def aboutQt()](#static-aboutqtparent-title)
+
+- [def critical()](#static-criticalparent-title-text-button0-button1)
+
+- [def information()](#static-informationparent-title-text-button0-button1qmessageboxstandardbuttonnobutton)
+
+- [def question()](#static-questionparent-title-text-button0-button1)
+
+- [def standardIcon()](#static-standardiconicon)
+
+- [def warning()](#static-warningparent-title-text-button0-button1)
+
+
+# Detailed Description
+
+消息框显示主要文本以提醒用户注意某种情况，显示信息性文本以进一步解释该情况，以及显示可选的详细文本以在用户请求时提供更多数据。
+
+消息框还可以显示图标和标准按钮以接受用户响应。
+
+提供了两个使用 QMessageBox 的 API，即基于属性的 API 和静态函数。调用其中一个静态函数是更简单的方法，但它不如使用基于属性的 API 灵活，结果信息量较少。建议使用基于属性的 API。
+
+
+## The Property-based API
+
+要使用基于属性的 API，请构造 QMessageBox 的一个实例，设置所需的属性，然后调用 exec() 来显示消息。最简单的配置是仅设置消息文本属性。
+
+```python
+msgBox = QMessageBox()
+msgBox.setText("The document has been modified.")
+msgBox.exec()
+```
+
+用户必须单击“确定”按钮才能关闭消息框。在消息框关闭之前，其余 GUI 将被阻止。
+
+比仅提醒用户事件更好的方法是询问用户如何处理。
+
+将标准按钮属性设置为您想要作为用户响应的按钮集。通过使用按位或运算符组合 StandardButtons 中的值来指定按钮。按钮的显示顺序取决于平台。例如，在 Windows 上，“保存”显示在“取消”的左侧，而在 macOS 上，顺序相反。将其中一个标准按钮标记为默认按钮。
+
+信息文本属性可用于添加其他上下文，以帮助用户选择适当的操作。
+
+```python
+msgBox = QMessageBox()
+msgBox.setText("The document has been modified.")
+msgBox.setInformativeText("Do you want to save your changes?")
+msgBox.setStandardButtons(QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
+msgBox.setDefaultButton(QMessageBox.Save)
+ret = msgBox.exec()
+```
+
+exec() 槽返回被点击的按钮的 StandardButtons 值。
+
+```python
+if ret == QMessageBox.Save:
+    # Save was clicked
+    break
+elif ret == QMessageBox.Discard:
+    # Don't Save was clicked
+    break
+elif ret == QMessageBox.Cancel:
+    # Cancel was clicked
+    break
+else:
+    # should never be reached
+    break
+```
+
+为了向用户提供更多信息以帮助他们选择适当的操作，请设置详细文本属性。根据平台的不同，详细文本可能需要用户单击“显示详细信息…”按钮才能显示。
+
+单击“显示详细信息…”按钮将显示详细文本。
+
+
+## Rich Text and the Text Format Property
+
+详细文本属性始终被解释为纯文本。主文本和信息文本属性可以是纯文本或富文本。这些字符串根据文本格式属性的设置进行解释。默认设置为自动文本。
+
+请注意，对于某些包含 XML 元字符的纯文本字符串，自动文本富文本检测测试可能会失败，导致您的纯文本字符串被错误地解释为富文本。在这些罕见情况下，使用 Qt::convertFromPlainText() 将纯文本字符串转换为视觉上等效的富文本字符串，或使用 setTextFormat() 明确设置文本格式属性。
+
+
+## Severity Levels and the Icon and Pixmap Properties
+
+QMessageBox 支持四种预定义消息严重性级别或消息类型，它们实际上仅在各自显示的预定义图标上有所不同。通过将 icon 属性设置为预定义图标之一，可以指定四种预定义消息类型之一。以下规则是指导原则：
+
+|             |                              |
+| ----------- | --------------- ------------ |
+| Question    | 用于在正常操作期间提出问题。    |
+| Information | 用于报告有关正常操作的信息。    |
+| Warning     | 用于报告非严重错误。           |
+| Critical    | 用于报告严重错误。             |
+
+预定义图标不是由 QMessageBox 定义的，而是由样式提供的。默认值为 No Icon 。消息框在所有情况下都是相同的。使用标准图标时，请使用表中推荐的图标，或使用平台样式指南推荐的图标。如果没有标准图标适合您的消息框，您可以通过设置图标像素映射属性而不是设置图标属性来使用自定义图标。
+
+总之，要设置图标，请对标准图标之一使用 setIcon()，或对自定义图标使用 setIconPixmap()。
+
+
+## The Static Functions API
+
+使用静态函数 API 构建消息框虽然方便，但不如使用基于属性的 API 灵活，因为静态函数签名缺少用于设置信息文本和详细文本属性的参数。一种解决方法是使用 title 参数作为消息框主文本，使用 text 参数作为消息框信息文本。由于这显然会导致消息框的可读性降低，因此平台指南不建议这样做。Microsoft Windows 用户界面指南建议使用应用程序名称作为窗口的 title ，这意味着如果除了主文本之外还有信息文本，则必须将其连接到 text 参数。
+
+请注意，静态函数签名的按钮参数已更改，现在用于设置标准按钮和默认按钮。
+
+静态函数可用于创建 information() 、 question() 、 warning() 和 critical() 消息框。
+
+```python
+ret = QMessageBox.warning(self, tr("My Application"),()
+                               tr("The document has been modified.\n"
+                                  "Do you want to save your changes?"),
+                               QMessageBox.Save | QMessageBox.Discard
+                               | QMessageBox.Cancel,
+                               QMessageBox.Save)
+```
+
+标准对话框示例展示了如何使用 QMessageBox 和其他内置 Qt 对话框。
+
+
+## Advanced Usage
+
+如果标准按钮对于您的消息框来说不够灵活，您可以使用 addButton() 重载，该重载接受文本和 ButtonRole 来添加自定义按钮。QMessageBox 使用 ButtonRole 来确定屏幕上按钮的顺序（根据平台的不同而不同）。您可以在调用 exec() 后测试 clickedButton() 的值。例如，
+
+```bash
+msgBox = QMessageBox()
+connectButton = msgBox.addButton(tr("Connect"), QMessageBox.ActionRole)
+abortButton = msgBox.addButton(QMessageBox.Abort)
+msgBox.exec()
+if msgBox.clickedButton() == connectButton:
+    # connect
+ elif msgBox.clickedButton() == abortButton:
+    # abort
+```
+
+
+## Default and Escape Keys
+
+可以使用 setDefaultButton() 指定默认按钮（即按下 Enter 时激活的按钮）。如果未指定默认按钮，QMessageBox 将尝试根据消息框中使用的按钮的按钮角色找到一个。
+
+可以使用 setEscapeButton() 指定退出按钮（按下 Esc 时激活的按钮）。如果未指定退出按钮，QMessageBox 将尝试使用以下规则找到一个：
+
+1. 如果只有一个按钮，则它是按下 Esc 时激活的按钮。
+
+2. 如果有取消按钮，则它是按下 Esc 时激活的按钮。
+
+3. 如果只有一个按钮具有拒绝角色或否角色，则它是按下 Esc 时激活的按钮。
+
+当使用这些规则无法确定退出按钮时，按 Esc 无效。
+
+
+--------------------------------
+## class Option
+
+| Constant                               | Description                          |
+| -------------------------------------- | ------------------------------------ |
+| QMessageBox.Option.DontUseNativeDialog | （继承枚举标志）不要使用本机消息对话框。 |
+
+6.6 版本中的新功能。
+
+
+--------------------------------
+## class Icon
+
+该枚举具有以下值：
+
+| Constant                | Description                           |
+| ----------------------- | ------------------------------------- |
+| QMessageBox.NoIcon      | 消息框没有任何图标。                    |
+| QMessageBox.Question    | 一个图标，表示该消息正在提出问题。        |
+| QMessageBox.Information | 一个图标，表示该消息并无异常。           |
+| QMessageBox.Warning     | 一个图标，表示该消息是警告，但可以处理。  |
+| QMessageBox.Critical    | 一个图标，表示该消息代表严重问题。       |
+
+
+--------------------------------
+## class ButtonRole
+
+此枚举描述了可用于描述按钮框中的按钮的角色。这些角色的组合作为用于描述其行为不同方面的标志。
+
+| Constant                    | Description                                           |
+| --------------------------- | ----------------------------------------------------- |
+| QMessageBox.InvalidRole     | 该按钮无效。                                           |
+| QMessageBox.AcceptRole      | 单击该按钮将导致对话框被接受（例如，确定）。              |
+| QMessageBox.RejectRole      | 单击该按钮会导致对话框被拒绝（例如取消）。               |
+| QMessageBox.DestructiveRole | 单击该按钮会导致破坏性更改（例如，放弃更改）并关闭对话框。 |
+| QMessageBox.ActionRole      | 单击该按钮会导致对话框中的元素发生变化。                 |
+| QMessageBox.HelpRole        | 可以点击该按钮来请求帮助。                              |
+| QMessageBox.YesRole         | 该按钮是一个类似“是”的按钮。                            |
+| QMessageBox.NoRole          | 该按钮是一个类似“否”的按钮。                            |
+| QMessageBox.ApplyRole       | 该按钮应用当前更改。                                   |
+| QMessageBox.ResetRole       | 该按钮将对话框的字段重置为默认值。                      |
+
+
+--------------------------------
+## class StandardButton
+
+（继承 enum.IntFlag）这些枚举描述标准按钮的标志。每个按钮都有一个定义的 ButtonRole 。
+
+| Constant                    | Description                                              |
+| --------------------------- | -------------------------------------------------------- |
+| QMessageBox.Ok              | 使用 AcceptRole 定义的“OK”按钮。                          |
+| QMessageBox.Open            | 使用 AcceptRole 定义的“打开”按钮。                         |
+| QMessageBox.Save            | 使用 AcceptRole 定义的“保存”按钮。                         |
+| QMessageBox.Cancel          | 使用 RejectRole 定义的“取消”按钮。                         |
+| QMessageBox.Close           | 使用 RejectRole 定义的“关闭”按钮。                         |
+| QMessageBox.Discard         | 根据平台，使用 DestructiveRole 定义的“丢弃”或“不保存”按钮。 |
+| QMessageBox.Apply           | 使用 ApplyRole 定义的“应用”按钮。                         |
+| QMessageBox.Reset           | 使用 ResetRole 定义的“重置”按钮。                         |
+| QMessageBox.RestoreDefaults | 使用 ResetRole 定义的“恢复默认值”按钮。                    |
+| QMessageBox.Help            | 使用 HelpRole 定义的“帮助”按钮。                          |
+| QMessageBox.SaveAll         | 使用 AcceptRole 定义的“全部保存”按钮。                    |
+| QMessageBox.Yes             | 使用 YesRole 定义的“是”按钮。                             |
+| QMessageBox.YesToAll        | 使用 YesRole 定义的“全部是”按钮。                         |
+| QMessageBox.No              | 使用 NoRole 定义的“否”按钮。                              |
+| QMessageBox.NoToAll         | 使用 NoRole 定义的“全部否”按钮。                          |
+| QMessageBox.Abort           | 使用 RejectRole 定义的“中止”按钮。                        |
+| QMessageBox.Retry           | 使用 AcceptRole 定义的“重试”按钮。                        |
+| QMessageBox.Ignore          | 使用 AcceptRole 定义的“忽略”按钮。                        |
+| QMessageBox.NoButton        | 无效按钮。                                               |
+
+以下值已过时：
+
+| Constant               | Description                      |
+| ---------------------- | -------------------------------- |
+| QMessageBox.YesAll     | 改用 YesToAll。                  |
+| QMessageBox.NoAll      | 改用NoToAll。                    |
+| QMessageBox.Default    | 请改用 information() 、 warning() 等的 defaultButton 参数，或者调用 setDefaultButton() 。 |
+| QMessageBox.Escape     | 改为调用 setEscapeButton()。      |
+| QMessageBox.FlagMask   |                                  |
+| QMessageBox.ButtonMask |                                  |
+
+
+--------------------------------
+## property detailedText : str
+
+此属性保存要在详细信息区域中显示的文本。
+
+文本将被解释为纯文本。
+
+默认情况下，此属性包含一个空字符串。
+
+访问功能：
+
+- detailedText()
+- setDetailedText()
+
+
+--------------------------------
+## property icon : QMessageBox.Icon
+
+此属性保存消息框的图标。
+
+可以使用以下值之一指定消息框的图标：
+
+- NoIcon
+- Question
+- Information
+- Warning
+- Critical
+
+默认值为 NoIcon 。
+
+用于显示实际图标的像素图取决于当前的 GUI 样式。您还可以通过设置图标像素图属性为图标设置自定义像素图。
+
+访问功能：
+
+- icon()
+- setIcon()
+
+
+--------------------------------
+## property iconPixmap : QPixmap
+
+此属性保存当前图标。
+
+消息框当前使用的图标。请注意，绘制一个在所有 GUI 样式中都合适的像素图通常很困难；您可能希望为每个平台提供不同的像素图。
+
+默认情况下，此属性未定义。
+
+访问功能：
+
+- iconPixmap()
+- setIconPixmap()
+
+
+--------------------------------
+## property informativeText : str
+
+此属性包含提供消息更完整描述的信息性文本。
+
+信息性文本可用于扩展 text()，以便向用户提供更多信息，例如描述情况的后果或建议替代解决方案。
+
+默认情况下，此属性包含一个空字符串。
+
+访问功能：
+
+- informativeText()
+- setInformativeText()
+
+
+--------------------------------
+## property options : Combination of QAbstractFileIconProvider.Option
+
+此属性包含影响对话框外观的选项。
+
+默认情况下，这些选项是禁用的。
+
+应在更改对话框属性或显示对话框之前设置选项 DontUseNativeDialog。
+
+在对话框可见时设置选项不能保证立即对对话框产生影响。
+
+在更改其他属性后设置选项可能会导致这些值不起作用。
+
+访问功能：
+
+- options()
+- setOptions()
+
+
+--------------------------------
+## property standardButtons : Combination of QDialogButtonBox.StandardButton
+
+此属性保存消息框中的标准按钮集合。
+
+此属性控制消息框使用哪些标准按钮。
+
+默认情况下，此属性不包含任何标准按钮。
+
+访问功能：
+
+- standardButtons()
+- setStandardButtons()
+
+
+--------------------------------
+## property text : str
+
+此属性保存要显示的消息框文本。
+
+文本应为描述情况的简短句子或短语，最好表述为中性陈述或号召性用语问题。
+
+文本将被解释为纯文本或富文本，具体取决于文本格式设置 (textFormat)。默认设置为 Qt::AutoText，即消息框将尝试自动检测文本的格式。
+
+此属性的默认值为空字符串。
+
+访问功能：
+
+- text()
+- setText()
+
+
+--------------------------------
+## property textFormat : Qt.TextFormat
+
+此属性保存消息框显示的文本格式。
+
+消息框当前使用的文本格式。有关可能选项的说明，请参阅 Qt::TextFormat 枚举。
+
+默认格式为 Qt::AutoText。
+
+访问功能：
+
+- textFormat()
+- setTextFormat()
+
+
+--------------------------------
+## property textInteractionFlags : Combination of Qt.TextInteractionFlag
+
+指定消息框的标签应如何与用户输入交互。
+
+默认值取决于样式。
+
+访问功能：
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+构造一个没有文本和按钮的应用程序模式消息框。parent 传递给 QDialog 构造函数。
+
+在调用 show() 之前，可以通过 setWindowModality() 覆盖窗口模式。
+
+在 macOS 上，如果您希望消息框显示为其父级的 Qt::Sheet，请将消息框的窗口模式设置为 Qt::WindowModal 或使用 open() 。否则，消息框将是一个标准对话框。
+
+
+--------------------------------
+## __init__(icon, title, text[, buttons=QMessageBox.StandardButton.NoButton[, parent=None[, flags=Qt.Dialog | Qt.MSWindowsFixedSizeDialogHint]]])
+
+参数：
+
+- icon – Icon
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- parent – QWidget
+- flags – Combination of WindowType
+
+使用给定的图标、标题、文本和标准按钮构造一个应用程序模式消息框。可以随时使用 addButton() 添加标准或自定义按钮。parent 和 f 参数传递给 QDialog 构造函数。
+
+在调用 show() 之前，可以通过 setWindowModality() 覆盖窗口模式。
+
+在 macOS 上，如果 parent 不是 None 并且您希望消息框显示为该父级的 Qt::Sheet，请将消息框的窗口模式设置为 Qt::WindowModal（默认）。否则，消息框将是一个标准对话框。
+
+
+--------------------------------
+## static about(parent, title, text)
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+
+显示一个简单的 about 框，标题为 title，文本为 text。about 框的父级为 parent。
+
+about() 在四个位置查找合适的图标：
+
+1. 如果存在，则优先使用 parent->icon()。
+
+2. 如果不存在，则尝试包含 parent 的顶级小部件。
+
+3. 如果失败，则尝试 PySide6.QtWidgets.QApplication.activeWindow()
+
+4. 作为最后的手段，它使用信息图标。
+
+about 框有一个标记为“OK”的按钮。
+
+在 macOS 上，about 框会弹出为非模式窗口；在其他平台上，它当前是应用程序模式。
+
+
+--------------------------------
+## static aboutQt(parent[, title=""])
+
+参数：
+
+- parent – QWidget
+- title – str
+
+显示一个关于 Qt 的简单消息框，带有给定的标题，位于父级上方（如果父级不为 None）。消息包括应用程序正在使用的 Qt 的版本号。
+
+这对于包含在应用程序的帮助菜单中很有用，如菜单示例所示。
+
+QApplication 以插槽的形式提供此功能。
+
+在 macOS 上，aboutQt 框会弹出为非模式窗口；在其他平台上，它当前是应用程序模式。
+
+
+--------------------------------
+## addButton(button, role)
+
+参数：
+
+- button – QAbstractButton
+- role – ButtonRole
+
+将给定的按钮添加到具有指定角色的消息框。
+
+
+--------------------------------
+## addButton(button)
+
+参数：
+
+- button – StandardButton
+
+返回类型：QPushButton
+
+这是一个重载函数。
+
+如果有效，则向消息框添加一个标准按钮，并返回该按钮。
+
+
+--------------------------------
+## addButton(text, role)
+
+参数：
+
+- text – str
+- role – ButtonRole
+
+返回类型：QPushButton
+
+这是一个重载函数。
+
+使用给定的文本创建一个按钮，将其添加到指定角色的消息框中，然后返回它。
+
+
+--------------------------------
+## button(which)
+
+参数：
+
+- which – StandardButton
+
+返回类型：QAbstractButton
+
+返回与标准按钮相对应的指针，如果此消息框中不存在标准按钮，则返回 None。
+
+
+--------------------------------
+## buttonClicked(button)
+
+参数：
+
+- button – QAbstractButton
+
+每当 QMessageBox 中的按钮被点击时，都会发出此信号。被点击的按钮在按钮中返回。
+
+
+--------------------------------
+## buttonRole(button)
+
+参数：
+
+- button – QAbstractButton
+
+返回类型：ButtonRole
+
+返回指定按钮的按钮角色。如果按钮为 None 或尚未添加到消息框，则此函数返回 InvalidRole。
+
+
+--------------------------------
+## buttonText(button)
+
+参数：
+
+- button – int
+
+返回类型：str
+
+返回消息框按钮按钮的文本，如果消息框不包含按钮，则​​返回空字符串。
+
+请改用 button() 和 text()。
+
+
+--------------------------------
+## buttons()
+
+返回类型：list of QAbstractButton
+
+返回已添加到消息框的所有按钮的列表。
+
+
+--------------------------------
+## checkBox()
+
+返回类型：QCheckBox
+
+返回对话框中显示的复选框。如果没有设置复选框，则返回 None。
+
+
+--------------------------------
+## clickedButton()
+
+返回类型：QAbstractButton
+
+返回用户点击的按钮，如果用户按下 Esc 键且未设置退出按钮，则返回 None。
+
+如果尚未调用 exec()，则返回 nullptr。
+
+示例：
+
+```python
+messageBox = QMessageBox(self)
+disconnectButton =
+      messageBox.addButton(tr("Disconnect"), QMessageBox.ActionRole)
+...
+messageBox.exec()
+if messageBox.clickedButton() == disconnectButton:
+    ...
+```
+
+
+--------------------------------
+## static critical(parent, title, text, button0, button1)
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+返回类型：int
+
+在指定的父窗口小部件前面打开一个具有给定标题和文本的关键消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## static critical(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+返回类型：StandardButton
+
+在指定的父窗口小部件前面打开一个具有给定标题和文本的关键消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## defaultButton()
+
+返回类型：QPushButton
+
+返回应为消息框默认按钮的按钮。如果未设置默认按钮，则返回 nullptr。
+
+
+--------------------------------
+## detailedText()
+
+返回类型：str
+
+属性 DetailedText 的获取器。
+
+--------------------------------
+## escapeButton()
+
+返回类型：QAbstractButton
+
+返回按下退出键时激活的按钮。
+
+默认情况下，QMessageBox 会尝试自动检测退出键，如下所示：
+
+如果只有一个按钮，则将其设为退出键。
+
+如果有取消按钮，则将其设为退出键。
+
+仅在 macOS 上，如果只有一个按钮具有 RejectRole 角色，则将其设为退出键。
+
+当无法自动检测到退出键时，按 Esc 键无效。
+
+
+--------------------------------
+## icon()
+
+返回类型：Icon
+
+属性图标的获取器。
+
+
+--------------------------------
+## iconPixmap()
+
+返回类型：QPixmap
+
+属性 iconPixmap 的获取器。
+
+
+--------------------------------
+## static information(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+返回类型：StandardButton
+
+在指定的父窗口小部件前面打开一个具有给定标题和文本的信息消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用 buttons 中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## static information(parent, title, text, button0[, button1=QMessageBox.StandardButton.NoButton])
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+返回类型：StandardButton
+
+在指定的父窗口小部件前面打开一个具有给定标题和文本的信息消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用 buttons 中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## informativeText()
+
+返回类型：str
+
+属性 informativeText 的获取器。
+
+
+--------------------------------
+## open(receiver, member)
+
+参数：
+
+- receiver – QObject
+- member – str
+
+打开对话框并将其 finish() 或 buttonClicked() 信号连接到接收器和成员指定的插槽。如果成员中的插槽的第一个参数有指针，则连接到 buttonClicked() ，否则连接到 finish() 。
+
+当对话框关闭时，信号将与插槽断开连接。
+
+
+--------------------------------
+## options()
+
+返回类型：Combination of Option
+
+
+--------------------------------
+## static question(parent, title, text[, buttons=QMessageBox.StandardButtons(QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+返回类型：StandardButton
+
+在指定的父窗口小部件前面打开一个带有给定标题和文本的问题消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## static question(parent, title, text, button0, button1)
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+返回类型：int
+
+在指定的父窗口小部件前面打开一个带有给定标题和文本的问题消息框。
+
+标准按钮被添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## removeButton(button)
+
+参数：
+
+- button – QAbstractButton
+
+从按钮框中移除按钮但不删除它。
+
+
+--------------------------------
+## setButtonText(button, text)
+
+参数：
+
+- button – int
+- text – str
+
+将消息框按钮的文本设置为文本。设置不在消息框中的按钮的文本将被忽略。
+
+请改用 addButton()。
+
+
+--------------------------------
+## setCheckBox(cb)
+
+参数：
+
+- cb – QCheckBox
+
+在消息对话框中设置复选框 cb。消息框拥有复选框的所有权。参数 cb 可以为 None，以从消息框中删除现有复选框。
+
+
+--------------------------------
+## setDefaultButton(button)
+
+参数：
+
+- button – StandardButton
+
+将消息框的默认按钮设置为按钮。
+
+
+--------------------------------
+## setDefaultButton(button)
+
+参数：
+
+- button – QPushButton
+
+将消息框的默认按钮设置为按钮。
+
+
+--------------------------------
+## setDetailedText(text)
+
+参数：
+
+- text – str
+
+属性 DetailedText 的设置器。
+
+
+--------------------------------
+## setEscapeButton(button)
+
+参数：
+
+- button – QAbstractButton
+
+将按下 Esc 键时激活的按钮设置为按钮。
+
+
+--------------------------------
+## setEscapeButton(button)
+
+参数：
+
+- button – StandardButton
+
+设置当按下 Esc 键时激活的按钮。
+
+
+--------------------------------
+## setIcon(arg__1)
+
+参数：
+
+- arg__1 – Icon
+
+属性图标的设置者。
+
+
+--------------------------------
+## setIconPixmap(pixmap)
+
+参数：
+
+- pixmap – QPixmap
+
+属性 iconPixmap 的设置者。
+
+
+--------------------------------
+## setInformativeText(text)
+
+参数：
+
+- text – str
+
+属性 informativeText 的设置者。
+
+
+--------------------------------
+## setOption(option[, on=true])
+
+参数：
+
+- option – Option
+- on – bool
+
+如果 on 为真，则将给定选项设置为启用；否则，清除给定选项。
+
+应在显示对话框之前设置选项（尤其是 DontUseNativeDialog 选项）。
+
+在对话框可见时设置选项不能保证立即对对话框产生影响。
+
+在更改其他属性后设置选项可能会导致这些值不起作用。
+
+
+--------------------------------
+## setOptions(options)
+
+参数：
+
+- options – Combination of Option
+
+
+--------------------------------
+## setStandardButtons(buttons)
+
+参数：
+
+- buttons – Combination of StandardButton
+
+
+--------------------------------
+## setText(text)
+
+参数：
+
+- text – str
+
+Setter of property text  .
+
+
+--------------------------------
+## setTextFormat(format)
+
+参数：
+
+- format – TextFormat
+
+Setter of property textFormat  .
+
+
+--------------------------------
+## setTextInteractionFlags(flags)
+
+参数：
+
+- flags – Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的设置者。
+
+
+--------------------------------
+## setWindowModality(windowModality)
+
+参数：
+
+- windowModality – WindowModality
+
+此函数隐藏 setWindowModality() 。
+
+将消息框的模式设置为 windowModality。
+
+在 macOS 上，如果模式设置为 Qt::WindowModal 并且消息框有父级，则消息框将为 Qt::Sheet，否则消息框将为标准对话框。
+
+
+--------------------------------
+## setWindowTitle(title)
+
+参数：
+
+- title – str
+
+此函数会隐藏 setWindowTitle() 。
+
+将消息框的标题设置为 title。在 macOS 上，窗口标题会被忽略（根据 macOS 指南的要求）。
+
+
+--------------------------------
+## standardButton(button)
+
+参数：
+
+- button – QAbstractButton
+
+返回类型：StandardButton
+
+返回与给定按钮对应的标准按钮枚举值，如果给定按钮不是标准按钮，则返回 NoButton。
+
+
+--------------------------------
+## standardButtons()
+
+返回类型：Combination of StandardButton
+
+
+--------------------------------
+## static standardIcon(icon)
+
+参数：
+
+- icon – Icon
+
+返回类型：QPixmap
+
+返回用于标准图标的像素图。这允许在更复杂的消息框中使用像素图。icon 指定所需的图标，例如问题、信息、警告或严重。
+
+改为使用 SP_MessageBoxInformation 等调用 standardIcon()。
+
+
+--------------------------------
+## testOption(option)
+
+参数：
+
+- option – Option
+
+返回类型：bool
+
+如果给定选项启用，则返回 true；否则返回 false。
+
+
+--------------------------------
+## text()
+
+返回类型：str
+
+属性 text 的获取器。
+
+
+--------------------------------
+## textFormat()
+
+返回类型：TextFormat
+
+属性 textFormat 的获取器。
+
+
+--------------------------------
+## textInteractionFlags()
+
+返回类型：Combination of TextInteractionFlag
+
+属性 textInteractionFlags 的获取器。
+
+
+--------------------------------
+## static warning(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+返回类型：StandardButton
+
+在指定的父窗口小部件前面打开一个带有给定标题和文本的警告消息框。
+
+标准按钮将添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
+
+
+--------------------------------
+## static warning(parent, title, text, button0, button1)
+
+参数：
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+返回类型：int
+
+在指定的父窗口小部件前面打开一个带有给定标题和文本的警告消息框。
+
+标准按钮将添加到消息框中。 defaultButton 指定按下 Enter 时使用的按钮。 defaultButton 必须引用按钮中给出的按钮。 如果 defaultButton 为 NoButton ，QMessageBox 会自动选择合适的默认值。
+
+返回单击的标准按钮的标识。 如果按下了 Esc ，则返回退出按钮。
+
+消息框是应用程序模式对话框。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.md b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.md
new file mode 100644
index 0000000..52bdf15
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.md
@@ -0,0 +1,1233 @@
+
+[Chinese doc](QMessageBox.CN.md)
+
+# class QMessageBox
+
+The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.
+
+
+# Synopsis
+
+## Properties
+
+- [detailedText](#property-detailedtext--str)
+
+    The text to be displayed in the details area.
+
+- [icon](#property-icon--qmessageboxicon)
+
+    The message box’s icon.
+
+- [iconPixmap](#property-iconpixmap--qpixmap)
+
+    The current icon.
+
+- [informativeText](#property-informativetext--str)
+
+    The informative text that provides a fuller description for the message.
+
+- [options](#property-options--combination-of-qabstractfileiconprovideroption)
+
+    Options that affect the look and feel of the dialog.
+
+- [standardButtons](#property-standardbuttons--combination-of-qdialogbuttonboxstandardbutton)
+
+    Collection of standard buttons in the message box.
+
+- [text](#property-text--str)
+
+    The message box text to be displayed.
+
+- [textFormat](#property-textformat--qttextformat)
+
+    The format of the text displayed by the message box.
+
+- [textInteractionFlags](#property-textinteractionflags--combination-of-qttextinteractionflag)
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addButton()](#addbuttonbutton)
+
+- [def button()](#buttonwhich)
+
+- [def buttonRole()](#buttonrolebutton)
+
+- [def buttonText()](#buttontextbutton)
+
+- [def buttons()](#buttons)
+
+- [def checkBox()](#checkbox)
+
+- [def clickedButton()](#clickedbutton)
+
+- [def defaultButton()](#defaultbutton)
+
+- [def detailedText()](#detailedtext)
+
+- [def escapeButton()](#escapebutton)
+
+- [def icon()](#icon)
+
+- [def iconPixmap()](#iconpixmap)
+
+- [def informativeText()](#informativetext)
+
+- [def open()](#openreceiver-member)
+
+- [def options()](#options)
+
+- [def removeButton()](#removebuttonbutton)
+
+- [def setButtonText()](#setbuttontextbutton-text)
+
+- [def setCheckBox()](#setcheckboxcb)
+
+- [def setDefaultButton()](#setdefaultbuttonbutton)
+
+- [def setDetailedText()](#setdetailedtexttext)
+
+- [def setEscapeButton()](#setescapebuttonbutton)
+
+- [def setIcon()](#seticonarg__1)
+
+- [def setIconPixmap()](#seticonpixmappixmap)
+
+- [def setInformativeText()](#setinformativetexttext)
+
+- [def setOption()](#setoptionoption-ontrue)
+
+- [def setOptions()](#setoptionsoptions)
+
+- [def setStandardButtons()](#setstandardbuttonsbuttons)
+
+- [def setText()](#settexttext)
+
+- [def setTextFormat()](#settextformatformat)
+
+- [def setTextInteractionFlags()](#settextinteractionflagsflags)
+
+- [def setWindowModality()](#setwindowmodalitywindowmodality)
+
+- [def setWindowTitle()](#setwindowtitletitle)
+
+- [def standardButton()](#standardbuttonbutton)
+
+- [def standardButtons()](#standardbuttons)
+
+- [def testOption()](#testoptionoption)
+
+- [def text()](#text)
+
+- [def textFormat()](#textformat)
+
+- [def textInteractionFlags()](#textinteractionflags)
+
+
+## Signals
+
+- [def buttonClicked()](#buttonclickedbutton)
+
+
+## Static functions
+
+- [def about()](#static-aboutparent-title-text)
+
+- [def aboutQt()](#static-aboutqtparent-title)
+
+- [def critical()](#static-criticalparent-title-text-button0-button1)
+
+- [def information()](#static-informationparent-title-text-button0-button1qmessageboxstandardbuttonnobutton)
+
+- [def question()](#static-questionparent-title-text-button0-button1)
+
+- [def standardIcon()](#static-standardiconicon)
+
+- [def warning()](#static-warningparent-title-text-button0-button1)
+
+
+# Detailed Description
+
+A message box displays a primary text to alert the user to a situation, an informative text to further explain the situation, and an optional detailed text to provide even more data if the user requests it.
+
+A message box can also display an icon and standard buttons for accepting a user response.
+
+Two APIs for using QMessageBox are provided, the property-based API, and the static functions. Calling one of the static functions is the simpler approach, but it is less flexible than using the property-based API, and the result is less informative. Using the property-based API is recommended.
+
+
+## The Property-based API
+
+To use the property-based API, construct an instance of QMessageBox , set the desired properties, and call exec() to show the message. The simplest configuration is to set only the message text property.
+
+```python
+msgBox = QMessageBox()
+msgBox.setText("The document has been modified.")
+msgBox.exec()
+```
+
+The user must click the OK button to dismiss the message box. The rest of the GUI is blocked until the message box is dismissed.
+
+A better approach than just alerting the user to an event is to also ask the user what to do about it.
+
+Set the standard buttons property to the set of buttons you want as the set of user responses. The buttons are specified by combining values from StandardButtons using the bitwise OR operator. The display order for the buttons is platform-dependent. For example, on Windows, Save is displayed to the left of Cancel, whereas on macOS, the order is reversed. Mark one of your standard buttons to be your default button .
+
+The informative text property can be used to add additional context to help the user choose the appropriate action.
+
+```python
+msgBox = QMessageBox()
+msgBox.setText("The document has been modified.")
+msgBox.setInformativeText("Do you want to save your changes?")
+msgBox.setStandardButtons(QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
+msgBox.setDefaultButton(QMessageBox.Save)
+ret = msgBox.exec()
+```
+
+The exec() slot returns the StandardButtons value of the button that was clicked.
+
+```python
+if ret == QMessageBox.Save:
+    # Save was clicked
+    break
+elif ret == QMessageBox.Discard:
+    # Don't Save was clicked
+    break
+elif ret == QMessageBox.Cancel:
+    # Cancel was clicked
+    break
+else:
+    # should never be reached
+    break
+```
+
+To give the user more information to help them choose the appropriate, action, set the detailed text property. Depending on the platform the detailed text , may require the user to click a Show Details… button to be shown.
+
+Clicking the Show Details… button displays the detailed text.
+
+
+## Rich Text and the Text Format Property
+
+The detailed text property is always interpreted as plain text. The main text and informative text properties can be either plain text or rich text. These strings are interpreted according to the setting of the text format property. The default setting is auto-text.
+
+Note that for some plain text strings containing XML meta-characters, the auto-text rich text detection test may fail causing your plain text string to be interpreted incorrectly as rich text. In these rare cases, use Qt::convertFromPlainText() to convert your plain text string to a visually equivalent rich text string, or set the text format property explicitly with setTextFormat() .
+
+
+## Severity Levels and the Icon and Pixmap Properties
+
+QMessageBox supports four predefined message severity levels, or message types, which really only differ in the predefined icon they each show. Specify one of the four predefined message types by setting the icon property to one of the predefined icons . The following rules are guidelines:
+
+|             |                                                    |
+| ----------- | -------------------------------------------------- |
+| Question    | For asking a question during normal operations.    |
+| Information | For reporting information about normal operations. |
+| Warning     | For reporting non-critical errors.                 |
+| Critical    | For reporting critical errors.                     |
+
+Predefined icons are not defined by QMessageBox , but provided by the style. The default value is No Icon . The message boxes are otherwise the same for all cases. When using a standard icon, use the one recommended in the table, or use the one recommended by the style guidelines for your platform. If none of the standard icons is right for your message box, you can use a custom icon by setting the icon pixmap property instead of setting the icon property.
+
+In summary, to set an icon, use either setIcon() for one of the standard icons, or setIconPixmap() for a custom icon.
+
+
+## The Static Functions API
+
+Building message boxes with the static functions API, although convenient, is less flexible than using the property-based API, because the static function signatures lack parameters for setting the informative text and detailed text properties. One work-around for this has been to use the title parameter as the message box main text and the text parameter as the message box informative text. Because this has the obvious drawback of making a less readable message box, platform guidelines do not recommend it. The Microsoft Windows User Interface Guidelines recommend using the application name as the window's title , which means that if you have an informative text in addition to your main text, you must concatenate it to the text parameter.
+
+Note that the static function signatures have changed with respect to their button parameters, which are now used to set the standard buttons and the default button .
+
+Static functions are available for creating information() , question() , warning() , and critical() message boxes.
+
+```python
+ret = QMessageBox.warning(self, tr("My Application"),()
+                               tr("The document has been modified.\n"
+                                  "Do you want to save your changes?"),
+                               QMessageBox.Save | QMessageBox.Discard
+                               | QMessageBox.Cancel,
+                               QMessageBox.Save)
+```
+
+The Standard Dialogs example shows how to use QMessageBox and the other built-in Qt dialogs.
+
+
+## Advanced Usage
+
+If the standard buttons are not flexible enough for your message box, you can use the addButton() overload that takes a text and a ButtonRole to add custom buttons. The ButtonRole is used by QMessageBox to determine the ordering of the buttons on screen (which varies according to the platform). You can test the value of clickedButton() after calling exec() . For example,
+
+```bash
+msgBox = QMessageBox()
+connectButton = msgBox.addButton(tr("Connect"), QMessageBox.ActionRole)
+abortButton = msgBox.addButton(QMessageBox.Abort)
+msgBox.exec()
+if msgBox.clickedButton() == connectButton:
+    # connect
+ elif msgBox.clickedButton() == abortButton:
+    # abort
+```
+
+
+## Default and Escape Keys
+
+The default button (i.e., the button activated when Enter is pressed) can be specified using setDefaultButton() . If a default button is not specified, QMessageBox tries to find one based on the button roles of the buttons used in the message box.
+
+The escape button (the button activated when Esc is pressed) can be specified using setEscapeButton() . If an escape button is not specified, QMessageBox tries to find one using these rules:
+
+1. If there is only one button, it is the button activated when Esc is pressed.
+
+2. If there is a Cancel button, it is the button activated when Esc is pressed.
+
+3. If there is exactly one button having either the Reject role or the the No role , it is the button activated when Esc is pressed.
+
+When an escape button can’t be determined using these rules, pressing Esc has no effect.
+
+
+--------------------------------
+## class Option
+
+| Constant                               | Description                                               |
+| -------------------------------------- | --------------------------------------------------------- |
+| QMessageBox.Option.DontUseNativeDialog | (inherits enum.Flag) Don’t use the native message dialog. |
+
+New in version 6.6.
+
+
+--------------------------------
+## class Icon
+
+This enum has the following values:
+
+| Constant                | Description                                                              |
+| ----------------------- | ------------------------------------------------------------------------ |
+| QMessageBox.NoIcon      | the message box does not have any icon.                                  |
+| QMessageBox.Question    | an icon indicating that the message is asking a question.                |
+| QMessageBox.Information | an icon indicating that the message is nothing out of the ordinary.      |
+| QMessageBox.Warning     | an icon indicating that the message is a warning, but can be dealt with. |
+| QMessageBox.Critical    | an icon indicating that the message represents a critical problem.       |
+
+
+--------------------------------
+## class ButtonRole
+
+This enum describes the roles that can be used to describe buttons in the button box. Combinations of these roles are as flags used to describe different aspects of their behavior.
+
+| Constant                    | Description                                                           |
+| --------------------------- | --------------------------------------------------------------------- |
+| QMessageBox.InvalidRole     | The button is invalid.                                                |
+| QMessageBox.AcceptRole      | Clicking the button causes the dialog to be accepted (e.g. OK).       |
+| QMessageBox.RejectRole      | Clicking the button causes the dialog to be rejected (e.g. Cancel).   |
+| QMessageBox.DestructiveRole | Clicking the button causes a destructive change (e.g. for Discarding Changes) and closes the dialog. |
+| QMessageBox.ActionRole      | Clicking the button causes changes to the elements within the dialog. |
+| QMessageBox.HelpRole        | The button can be clicked to request help.                            |
+| QMessageBox.YesRole         | The button is a “Yes”-like button.                                    |
+| QMessageBox.NoRole          | The button is a “No”-like button.                                     |
+| QMessageBox.ApplyRole       | The button applies current changes.                                   |
+| QMessageBox.ResetRole       | The button resets the dialog’s fields to default values.              |
+
+
+--------------------------------
+## class StandardButton
+
+(inherits enum.IntFlag) These enums describe flags for standard buttons. Each button has a defined ButtonRole .
+
+| Constant                    | Description                                              |
+| --------------------------- | -------------------------------------------------------- |
+| QMessageBox.Ok              | An “OK” button defined with the AcceptRole .             |
+| QMessageBox.Open            | An “Open” button defined with the AcceptRole .           |
+| QMessageBox.Save            | A “Save” button defined with the AcceptRole .            |
+| QMessageBox.Cancel          | A “Cancel” button defined with the RejectRole .          |
+| QMessageBox.Close           | A “Close” button defined with the RejectRole .           |
+| QMessageBox.Discard         | A “Discard” or “Don’t Save” button, depending on the platform, defined with the DestructiveRole . |
+| QMessageBox.Apply           | An “Apply” button defined with the ApplyRole .           |
+| QMessageBox.Reset           | A “Reset” button defined with the ResetRole .            |
+| QMessageBox.RestoreDefaults | A “Restore Defaults” button defined with the ResetRole . |
+| QMessageBox.Help            | A “Help” button defined with the HelpRole .              |
+| QMessageBox.SaveAll         | A “Save All” button defined with the AcceptRole .        |
+| QMessageBox.Yes             | A “Yes” button defined with the YesRole .                |
+| QMessageBox.YesToAll        | A “Yes to All” button defined with the YesRole .         |
+| QMessageBox.No              | A “No” button defined with the NoRole .                  |
+| QMessageBox.NoToAll         | A “No to All” button defined with the NoRole .           |
+| QMessageBox.Abort           | An “Abort” button defined with the RejectRole .          |
+| QMessageBox.Retry           | A “Retry” button defined with the AcceptRole .           |
+| QMessageBox.Ignore          | An “Ignore” button defined with the AcceptRole .         |
+| QMessageBox.NoButton        | An invalid button.                                       |
+
+The following values are obsolete:
+
+| Constant               | Description                      |
+| ---------------------- | -------------------------------- |
+| QMessageBox.YesAll     | Use YesToAll instead.            |
+| QMessageBox.NoAll      | Use NoToAll instead.             |
+| QMessageBox.Default    | Use the defaultButton argument of information() , warning() , etc. instead, or call setDefaultButton() . |
+| QMessageBox.Escape     | Call setEscapeButton() instead.  |
+| QMessageBox.FlagMask   |                                  |
+| QMessageBox.ButtonMask |                                  |
+
+
+--------------------------------
+## property detailedText : str
+
+This property holds the text to be displayed in the details area..
+
+The text will be interpreted as a plain text.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- detailedText()
+- setDetailedText()
+
+
+--------------------------------
+## property icon : QMessageBox.Icon
+
+This property holds the message box’s icon.
+
+The icon of the message box can be specified with one of the values:
+
+- NoIcon
+- Question
+- Information
+- Warning
+- Critical
+
+The default is NoIcon .
+
+The pixmap used to display the actual icon depends on the current GUI style . You can also set a custom pixmap for the icon by setting the icon pixmap property.
+
+Access functions:
+
+- icon()
+- setIcon()
+
+
+--------------------------------
+## property iconPixmap : QPixmap
+
+This property holds the current icon.
+
+The icon currently used by the message box. Note that it’s often hard to draw one pixmap that looks appropriate in all GUI styles; you may want to supply a different pixmap for each platform.
+
+By default, this property is undefined.
+
+Access functions:
+
+- iconPixmap()
+- setIconPixmap()
+
+
+--------------------------------
+## property informativeText : str
+
+This property holds the informative text that provides a fuller description for the message.
+
+Informative text can be used to expand upon the text() to give more information to the user, for example describing the consequences of the situation, or suggestion alternative solutions.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- informativeText()
+- setInformativeText()
+
+
+--------------------------------
+## property options : Combination of QAbstractFileIconProvider.Option
+
+This property holds Options that affect the look and feel of the dialog..
+
+By default, these options are disabled.
+
+The option DontUseNativeDialog should be set before changing dialog properties or showing the dialog.
+
+Setting options while the dialog is visible is not guaranteed to have an immediate effect on the dialog.
+
+Setting options after changing other properties may cause these values to have no effect.
+
+Access functions:
+
+- options()
+- setOptions()
+
+
+--------------------------------
+## property standardButtons : Combination of QDialogButtonBox.StandardButton
+
+This property holds collection of standard buttons in the message box.
+
+This property controls which standard buttons are used by the message box.
+
+By default, this property contains no standard buttons.
+
+Access functions:
+
+- standardButtons()
+- setStandardButtons()
+
+
+--------------------------------
+## property text : str
+
+This property holds the message box text to be displayed..
+
+The text should be a brief sentence or phrase that describes the situation, ideally formulated as a neutral statement, or a call-to-action question.
+
+The text will be interpreted either as a plain text or as rich text, depending on the text format setting ( textFormat ). The default setting is Qt::AutoText, i.e., the message box will try to auto-detect the format of the text.
+
+The default value of this property is an empty string.
+
+Access functions:
+
+- text()
+- setText()
+
+
+--------------------------------
+## property textFormat : Qt.TextFormat
+
+This property holds the format of the text displayed by the message box.
+
+The current text format used by the message box. See the Qt::TextFormat enum for an explanation of the possible options.
+
+The default format is Qt::AutoText.
+
+Access functions:
+
+- textFormat()
+- setTextFormat()
+
+
+--------------------------------
+## property textInteractionFlags : Combination of Qt.TextInteractionFlag
+
+Specifies how the label of the message box should interact with user input.
+
+The default value depends on the style.
+
+Access functions:
+
+- textInteractionFlags()
+- setTextInteractionFlags()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs an application modal message box with no text and no buttons. parent is passed to the QDialog constructor.
+
+The window modality can be overridden via setWindowModality() before calling show() .
+
+On macOS, if you want your message box to appear as a Qt::Sheet of its parent, set the message box’s window modality to Qt::WindowModal or use open() . Otherwise, the message box will be a standard dialog.
+
+
+--------------------------------
+## __init__(icon, title, text[, buttons=QMessageBox.StandardButton.NoButton[, parent=None[, flags=Qt.Dialog | Qt.MSWindowsFixedSizeDialogHint]]])
+
+Parameters:
+
+- icon – Icon
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- parent – QWidget
+- flags – Combination of WindowType
+
+Constructs an application modal message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton() . The parent and f arguments are passed to the QDialog constructor.
+
+The window modality can be overridden via setWindowModality() before calling show() .
+
+On macOS, if parent is not None and you want your message box to appear as a Qt::Sheet of that parent, set the message box’s window modality to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog.
+
+
+--------------------------------
+## static about(parent, title, text)
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+
+Displays a simple about box with title title and text text. The about box’s parent is parent.
+
+about() looks for a suitable icon in four locations:
+
+1. It prefers parent->icon() if that exists.
+
+2. If not, it tries the top-level widget containing parent.
+
+3. If that fails, it tries the PySide6.QtWidgets.QApplication.activeWindow()
+
+4. As a last resort it uses the Information icon.
+
+The about box has a single button labelled “OK”.
+
+On macOS, the about box is popped up as a modeless window; on other platforms, it is currently application modal.
+
+
+--------------------------------
+## static aboutQt(parent[, title=""])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+
+Displays a simple message box about Qt, with the given title and centered over parent (if parent is not None). The message includes the version number of Qt being used by the application.
+
+This is useful for inclusion in the Help menu of an application, as shown in the Menus example.
+
+QApplication provides this functionality as a slot.
+
+On macOS, the aboutQt box is popped up as a modeless window; on other platforms, it is currently application modal.
+
+
+--------------------------------
+## addButton(button, role)
+
+Parameters:
+
+- button – QAbstractButton
+- role – ButtonRole
+
+Adds the given button to the message box with the specified role.
+
+
+--------------------------------
+## addButton(button)
+
+Parameters:
+
+- button – StandardButton
+
+Return type: QPushButton
+
+This is an overloaded function.
+
+Adds a standard button to the message box if it is valid to do so, and returns the push button.
+
+
+--------------------------------
+## addButton(text, role)
+
+Parameters:
+
+- text – str
+- role – ButtonRole
+
+Return type: QPushButton
+
+This is an overloaded function.
+
+Creates a button with the given text, adds it to the message box for the specified role, and returns it.
+
+
+--------------------------------
+## button(which)
+
+Parameters:
+
+- which – StandardButton
+
+Return type: QAbstractButton
+
+Returns a pointer corresponding to the standard button which, or None if the standard button doesn’t exist in this message box.
+
+
+--------------------------------
+## buttonClicked(button)
+
+Parameters:
+
+- button – QAbstractButton
+
+This signal is emitted whenever a button is clicked inside the QMessageBox . The button that was clicked in returned in button.
+
+
+--------------------------------
+## buttonRole(button)
+
+Parameters:
+
+- button – QAbstractButton
+
+Return type: ButtonRole
+
+Returns the button role for the specified button. This function returns InvalidRole if button is None or has not been added to the message box.
+
+
+--------------------------------
+## buttonText(button)
+
+Parameters:
+
+- button – int
+
+Return type: str
+
+Returns the text of the message box button button, or an empty string if the message box does not contain the button.
+
+Use button() and text() instead.
+
+
+--------------------------------
+## buttons()
+
+Return type: list of QAbstractButton
+
+Returns a list of all the buttons that have been added to the message box.
+
+
+--------------------------------
+## checkBox()
+
+Return type: QCheckBox
+
+Returns the checkbox shown on the dialog. This is None if no checkbox is set.
+
+
+--------------------------------
+## clickedButton()
+
+Return type: QAbstractButton
+
+Returns the button that was clicked by the user, or None if the user hit the Esc key and no escape button was set.
+
+If exec() hasn’t been called yet, returns nullptr.
+
+Example:
+
+```python
+messageBox = QMessageBox(self)
+disconnectButton =
+      messageBox.addButton(tr("Disconnect"), QMessageBox.ActionRole)
+...
+messageBox.exec()
+if messageBox.clickedButton() == disconnectButton:
+    ...
+```
+
+
+--------------------------------
+## static critical(parent, title, text, button0, button1)
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+Return type: int
+
+Opens a critical message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## static critical(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+Return type: StandardButton
+
+Opens a critical message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## defaultButton()
+
+Return type: QPushButton
+
+Returns the button that should be the message box’s default button . Returns nullptr if no default button was set.
+
+
+--------------------------------
+## detailedText()
+
+Return type: str
+
+Getter of property detailedText  .
+
+--------------------------------
+## escapeButton()
+
+Return type: QAbstractButton
+
+Returns the button that is activated when escape is pressed.
+
+By default, QMessageBox attempts to automatically detect an escape button as follows:
+
+If there is only one button, it is made the escape button.
+
+If there is a Cancel button, it is made the escape button.
+
+On macOS only, if there is exactly one button with the role RejectRole , it is made the escape button.
+
+When an escape button could not be automatically detected, pressing Esc has no effect.
+
+
+--------------------------------
+## icon()
+
+Return type: Icon
+
+Getter of property icon  .
+
+
+--------------------------------
+## iconPixmap()
+
+Return type: QPixmap
+
+Getter of property iconPixmap  .
+
+
+--------------------------------
+## static information(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+Return type: StandardButton
+
+Opens an information message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## static information(parent, title, text, button0[, button1=QMessageBox.StandardButton.NoButton])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+Return type: StandardButton
+
+Opens an information message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## informativeText()
+
+Return type: str
+
+Getter of property informativeText  .
+
+
+--------------------------------
+## open(receiver, member)
+
+Parameters:
+
+- receiver – QObject
+- member – str
+
+Opens the dialog and connects its finished() or buttonClicked() signal to the slot specified by receiver and member. If the slot in member has a pointer for its first parameter the connection is to buttonClicked() , otherwise the connection is to finished() .
+
+The signal will be disconnected from the slot when the dialog is closed.
+
+
+--------------------------------
+## options()
+
+Return type: Combination of Option
+
+
+--------------------------------
+## static question(parent, title, text[, buttons=QMessageBox.StandardButtons(QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+Return type: StandardButton
+
+Opens a question message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## static question(parent, title, text, button0, button1)
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+Return type: int
+
+Opens a question message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## removeButton(button)
+
+Parameters:
+
+- button – QAbstractButton
+
+Removes button from the button box without deleting it.
+
+
+--------------------------------
+## setButtonText(button, text)
+
+Parameters:
+
+- button – int
+- text – str
+
+Sets the text of the message box button button to text. Setting the text of a button that is not in the message box is silently ignored.
+
+Use addButton() instead.
+
+
+--------------------------------
+## setCheckBox(cb)
+
+Parameters:
+
+- cb – QCheckBox
+
+Sets the checkbox cb on the message dialog. The message box takes ownership of the checkbox. The argument cb can be None to remove an existing checkbox from the message box.
+
+
+--------------------------------
+## setDefaultButton(button)
+
+Parameters:
+
+- button – StandardButton
+
+Sets the message box’s default button to button.
+
+
+--------------------------------
+## setDefaultButton(button)
+
+Parameters:
+
+- button – QPushButton
+
+Sets the message box’s default button to button.
+
+
+--------------------------------
+## setDetailedText(text)
+
+Parameters:
+
+- text – str
+
+Setter of property detailedText  .
+
+
+--------------------------------
+## setEscapeButton(button)
+
+Parameters:
+
+- button – QAbstractButton
+
+Sets the button that gets activated when the Escape key is pressed to button.
+
+
+--------------------------------
+## setEscapeButton(button)
+
+Parameters:
+
+- button – StandardButton
+
+Sets the buttons that gets activated when the Escape key is pressed to button.
+
+
+--------------------------------
+## setIcon(arg__1)
+
+Parameters:
+
+- arg__1 – Icon
+
+Setter of property icon  .
+
+
+--------------------------------
+## setIconPixmap(pixmap)
+
+Parameters:
+
+- pixmap – QPixmap
+
+Setter of property iconPixmap  .
+
+
+--------------------------------
+## setInformativeText(text)
+
+Parameters:
+
+- text – str
+
+Setter of property informativeText  .
+
+
+--------------------------------
+## setOption(option[, on=true])
+
+Parameters:
+
+- option – Option
+- on – bool
+
+Sets the given option to be enabled if on is true; otherwise, clears the given option.
+
+Options (particularly the DontUseNativeDialog option) should be set before showing the dialog.
+
+Setting options while the dialog is visible is not guaranteed to have an immediate effect on the dialog.
+
+Setting options after changing other properties may cause these values to have no effect.
+
+
+--------------------------------
+## setOptions(options)
+
+Parameters:
+
+- options – Combination of Option
+
+
+--------------------------------
+## setStandardButtons(buttons)
+
+Parameters:
+
+- buttons – Combination of StandardButton
+
+
+--------------------------------
+## setText(text)
+
+Parameters:
+
+- text – str
+
+Setter of property text  .
+
+
+--------------------------------
+## setTextFormat(format)
+
+Parameters:
+
+- format – TextFormat
+
+Setter of property textFormat  .
+
+
+--------------------------------
+## setTextInteractionFlags(flags)
+
+Parameters:
+
+- flags – Combination of TextInteractionFlag
+
+Setter of property textInteractionFlags  .
+
+
+--------------------------------
+## setWindowModality(windowModality)
+
+Parameters:
+
+- windowModality – WindowModality
+
+This function shadows setWindowModality() .
+
+Sets the modality of the message box to windowModality.
+
+On macOS, if the modality is set to Qt::WindowModal and the message box has a parent, then the message box will be a Qt::Sheet, otherwise the message box will be a standard dialog.
+
+
+--------------------------------
+## setWindowTitle(title)
+
+Parameters:
+
+- title – str
+
+This function shadows setWindowTitle() .
+
+Sets the title of the message box to title. On macOS, the window title is ignored (as required by the macOS Guidelines).
+
+
+--------------------------------
+## standardButton(button)
+
+Parameters:
+
+- button – QAbstractButton
+
+Return type: StandardButton
+
+Returns the standard button enum value corresponding to the given button, or NoButton if the given button isn’t a standard button.
+
+
+--------------------------------
+## standardButtons()
+
+Return type: Combination of StandardButton
+
+
+--------------------------------
+## static standardIcon(icon)
+
+Parameters:
+
+- icon – Icon
+
+Return type: QPixmap
+
+Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. icon specifies the required icon, e.g. Question , Information , Warning or Critical .
+
+Call standardIcon() with SP_MessageBoxInformation etc. instead.
+
+
+--------------------------------
+## testOption(option)
+
+Parameters:
+
+- option – Option
+
+Return type: bool
+
+Returns true if the given option is enabled; otherwise, returns false.
+
+
+--------------------------------
+## text()
+
+Return type: str
+
+Getter of property text  .
+
+
+--------------------------------
+## textFormat()
+
+Return type: TextFormat
+
+Getter of property textFormat  .
+
+
+--------------------------------
+## textInteractionFlags()
+
+Return type: Combination of TextInteractionFlag
+
+Getter of property textInteractionFlags  .
+
+
+--------------------------------
+## static warning(parent, title, text[, buttons=QMessageBox.StandardButton.Ok[, defaultButton=QMessageBox.StandardButton.NoButton]])
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- buttons – Combination of StandardButton
+- defaultButton – StandardButton
+
+Return type: StandardButton
+
+Opens a warning message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.
+
+
+--------------------------------
+## static warning(parent, title, text, button0, button1)
+
+Parameters:
+
+- parent – QWidget
+- title – str
+- text – str
+- button0 – StandardButton
+- button1 – StandardButton
+
+Return type: int
+
+Opens a warning message box with the given title and text in front of the specified parent widget.
+
+The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is NoButton , QMessageBox chooses a suitable default automatically.
+
+Returns the identity of the standard button that was clicked. If Esc was pressed instead, the escape button is returned.
+
+The message box is an application modal dialog box.

From d7d144672e075a60084b55a0c5da03c634dbbb5f Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 18:44:28 +0800
Subject: [PATCH 22/38] [PyQt] Add QTimer doc.

---
 Class-3/PyQt6/Class-0/QtCore/QTimer.CN.md | 389 ++++++++++++++++++++++
 Class-3/PyQt6/Class-0/QtCore/QTimer.md    | 389 ++++++++++++++++++++++
 2 files changed, 778 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtCore/QTimer.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtCore/QTimer.md

diff --git a/Class-3/PyQt6/Class-0/QtCore/QTimer.CN.md b/Class-3/PyQt6/Class-0/QtCore/QTimer.CN.md
new file mode 100644
index 0000000..1a47259
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtCore/QTimer.CN.md
@@ -0,0 +1,389 @@
+
+[English doc](QTimer.md)
+
+# class QTimer
+
+QTimer 类提供重复和单次计时器。
+
+
+# Synopsis
+
+## Properties
+
+- [active](#property-active--bool)
+
+- [interval](#property-interval--int)
+
+    超时间隔（以毫秒为单位）。
+
+- [remainingTime](#property-remainingtime--int)
+
+    剩余时间（以毫秒为单位）。
+
+- [singleShot](#property-singleshot--bool)
+
+    计时器是否为单次计时器。
+
+- [timerType](#property-timertype--qttimertype)
+
+    控制计时器的准确性。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def interval()](#interval)
+
+- [def isActive()](#isactive)
+
+- [def isSingleShot()](#issingleshot)
+
+- [def remainingTime()](#remainingtime)
+
+- [def setInterval()](#setintervalmsec)
+
+- [def setSingleShot()](#setsingleshotsingleshot)
+
+- [def setTimerType()](#settimertypeatype)
+
+- [def timerId()](#timerid)
+
+- [def timerType()](#timertype)
+
+
+## Slots
+
+- [def start()](#start)
+
+- [def stop()](#stop)
+
+
+## Signals
+
+- [def timeout()](#timeout)
+
+
+## Static functions
+
+- [def singleShot()](#static-singleshotmsec-context-functor)
+
+
+## Detailed Description
+
+QTimer 类为计时器提供了高级编程接口。要使用它，请创建一个 QTimer ，将其 timeout() 信号连接到适当的插槽，然后调用 start() 。从那时起，它将以恒定的间隔发出 timeout() 信号。
+
+一秒（1000 毫秒）计时器的示例（来自模拟时钟示例）：
+
+```python
+timer = QTimer(self)
+timer.timeout.connect(this, QOverload<>::of(&AnalogClock::update))
+timer.start(1000)
+```
+
+从那时起，update() 槽每秒都会被调用一次。
+
+您可以通过调用 setSingleShot (true) 将计时器设置为仅超时一次。您还可以使用静态 singleShot() 函数在指定间隔后调用槽：
+
+```python
+QTimer::singleShot(200, self.updateCaption)
+```
+
+在多线程应用程序中，您可以在任何具有事件循环的线程中使用 QTimer。要从非 GUI 线程启动事件循环，请使用 exec() 。Qt 使用计时器的线程亲和性来确定哪个线程将发出 timeout() 信号。因此，您必须在其线程中启动和停止计时器；无法从另一个线程启动计时器。
+
+作为一种特殊情况，超时为 0 的 QTimer 将尽快超时，尽管零计时器和其他事件源之间的顺序未指定。零计时器可用于执行某些工作，同时仍提供敏捷的用户界面：
+
+```python
+timer = QTimer(self)
+timer.timeout.connect(self.processOneThing)
+timer.start()
+```
+
+从此以后，processOneThing() 将被重复调用。应以始终快速返回（通常在处理一个数据项后）的方式编写它，以便 Qt 可以将事件传递到用户界面并在完成所有工作后立即停止计时器。这是在 GUI 应用程序中实现繁重工作的传统方式，但随着多线程如今在越来越多的平台上可用，我们预计零毫秒 QTimer 对象将逐渐被 QThread 取代。
+
+
+## Accuracy and Timer Resolution
+
+计时器的精度取决于底层操作系统和硬件。大多数平台支持 1 毫秒的精度，但在很多实际情况下，计时器的精度不会等于此精度。
+
+精度还取决于计时器类型。对于 PreciseTimer ，QTimer 将尝试将精度保持在 1 毫秒。精确计时器也绝不会比预期更早超时。
+
+对于 CoarseTimer 和 VeryCoarseTimer 类型，QTimer 可能会比预期更早唤醒，在这些类型的范围内：CoarseTimer 为间隔的 5%，VeryCoarseTimer 为 500 毫秒。
+
+如果系统繁忙或无法提供所要求的精度，所有计时器类型的超时都可能比预期更晚。在这种超时超限的情况下，Qt 只会发出一次 timeout()，即使多个超时已过期，然后将恢复原始间隔。
+
+
+## Alternatives to QTimer
+
+使用 QTimer 的另一种方法是调用对象的 startTimer() 并在类中重新实现 timerEvent() 事件处理程序（必须继承 QObject ）。缺点是 timerEvent() 不支持单次定时器或信号等高级功能。
+
+另一种替代方案是 QBasicTimer 。它通常比直接使用 startTimer() 更省事。请参阅计时器以了解所有三种方法的概述。
+
+某些操作系统限制可使用的计时器数量；Qt 会尝试解决这些限制。
+
+
+--------------------------------
+## property active : bool
+
+如果计时器正在运行，则此布尔属性为真；否则为假。
+
+访问功能：
+
+- isActive()
+
+
+--------------------------------
+## property interval : int
+
+此属性保存超时间隔（以毫秒为单位）。
+
+此属性的默认值为 0。超时间隔为 0 的 QTimer 将在窗口系统事件队列中的所有事件处理完毕后立即超时。
+
+设置活动计时器的间隔会更改其 timerId() 。
+
+访问功能：
+
+- interval()
+- setInterval()
+
+
+--------------------------------
+## property remainingTime : int
+
+此属性保存剩余时间（以毫秒为单位）。
+
+返回计时器在超时前剩余的毫秒值。如果计时器处于非活动状态，则返回值为 -1。如果计时器已过期，则返回值为 0。
+
+访问功能：
+
+- remainingTime()
+
+
+--------------------------------
+## property singleShot : bool
+
+此属性保存计时器是否为单次计时器。
+
+单次计时器仅触发一次，非单次计时器每隔几毫秒触发一次。
+
+此属性的默认值为 false。
+
+访问功能：
+
+- isSingleShot()
+- setSingleShot()
+
+
+--------------------------------
+## property timerType : Qt.TimerType
+
+此属性控制计时器的准确性。
+
+此属性的默认值为 Qt::CoarseTimer。
+
+访问功能：
+
+- timerType()
+- setTimerType()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QObject
+
+使用给定的父级构造一个计时器。
+
+
+--------------------------------
+## interval()
+
+返回类型：int
+
+属性 interval 的获取器。
+
+
+--------------------------------
+## isActive()
+
+返回类型：bool
+
+如果计时器正在运行（待处理），则返回 true；否则返回 false。
+
+属性 active 的获取器。
+
+
+--------------------------------
+## isSingleShot()
+
+返回类型：bool
+
+属性 singleShot 的获取器。
+
+
+--------------------------------
+## remainingTime()
+
+返回类型：int
+
+属性 remainingTime 的获取器。
+
+
+--------------------------------
+## setInterval(msec)
+
+参数：
+
+- msec – int
+
+属性 interval 的设置者。
+
+
+--------------------------------
+## setSingleShot(singleShot)
+
+参数：
+
+- singleShot – bool
+
+属性 singleShot 的设置者。
+
+
+--------------------------------
+## setTimerType(atype)
+
+参数：
+
+- atype – TimerType
+
+属性timerType的设置者。
+
+
+--------------------------------
+## static singleShot(msec, timerType, receiver, member)
+
+参数：
+
+- msec – int
+- timerType – TimerType
+- receiver – QObject
+- member – str
+
+这是一个重载函数。
+
+这个静态函数在给定的时间间隔后调用一个槽。
+
+使用这个函数非常方便，因为您不需要为 timerEvent 烦恼，也不需要创建本地 QTimer 对象。
+
+接收器是接收对象，成员是槽。时间间隔是 msec 毫秒。 timerType 影响计时器的准确性。
+
+
+--------------------------------
+## static singleShot(msec, receiver, member)
+
+参数：
+
+- msec – int
+- receiver – QObject
+- member – str
+
+此静态函数在给定的时间间隔后调用一个槽。
+
+使用此函数非常方便，因为您不需要担心 timerEvent 或创建本地 QTimer 对象。
+
+示例：
+
+```python
+from PySide6.QtWidgets import QApplication
+from PySide6.QtCore import QTimer
+if __name__ == "__main__":
+
+    app = QApplication([])
+    QTimer.singleShot(600000, app, QCoreApplication.quit)
+    ...
+    sys.exit(app.exec())
+```
+
+此示例程序在 10 分钟（600,000 毫秒）后自动终止。
+
+接收器为接收对象，成员为槽。时间间隔为 msec 毫秒。
+
+
+--------------------------------
+## static singleShot(msec, context, functor)
+
+参数：
+
+- msec – int
+- context – QObject
+- functor – PyCallable
+
+
+--------------------------------
+## static singleShot(msec, functor)
+
+参数：
+
+- msec – int
+- functor – PyCallable
+
+
+--------------------------------
+## start()
+
+此函数重载 start()。
+
+使用 interval 中指定的超时时间启动或重新启动计时器。
+
+如果计时器已在运行，则将停止并重新启动。
+
+如果 singleShot 为 true，则计时器将仅激活一次。
+
+
+--------------------------------
+## start(msec)
+
+参数：
+
+- msec – int
+
+以 msec 毫秒的超时间隔启动或重新启动计时器。
+
+如果计时器已在运行，则将停止并重新启动。
+
+如果 singleShot 为真，则计时器将仅激活一次。这相当于：
+
+```bash
+timer.setInterval(msec);
+timer.start();
+```
+
+
+--------------------------------
+## stop()
+
+停止计时器。
+
+
+--------------------------------
+## timeout()
+
+当计时器超时时发出此信号。
+
+
+--------------------------------
+## timerId()
+
+返回类型：int
+
+如果计时器正在运行，则返回计时器的 ID；否则返回 -1。
+
+
+--------------------------------
+## timerType()
+
+返回类型：TimerType
+
+属性 timerType 的获取器。
diff --git a/Class-3/PyQt6/Class-0/QtCore/QTimer.md b/Class-3/PyQt6/Class-0/QtCore/QTimer.md
new file mode 100644
index 0000000..3709b20
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtCore/QTimer.md
@@ -0,0 +1,389 @@
+
+[Chinese doc](QTimer.CN.md)
+
+# class QTimer
+
+The QTimer class provides repetitive and single-shot timers.
+
+
+# Synopsis
+
+## Properties
+
+- [active](#property-active--bool)
+
+- [interval](#property-interval--int)
+
+    The timeout interval in milliseconds.
+
+- [remainingTime](#property-remainingtime--int)
+
+    The remaining time in milliseconds.
+
+- [singleShot](#property-singleshot--bool)
+
+    Whether the timer is a single-shot timer.
+
+- [timerType](#property-timertype--qttimertype)
+
+    Controls the accuracy of the timer.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def interval()](#interval)
+
+- [def isActive()](#isactive)
+
+- [def isSingleShot()](#issingleshot)
+
+- [def remainingTime()](#remainingtime)
+
+- [def setInterval()](#setintervalmsec)
+
+- [def setSingleShot()](#setsingleshotsingleshot)
+
+- [def setTimerType()](#settimertypeatype)
+
+- [def timerId()](#timerid)
+
+- [def timerType()](#timertype)
+
+
+## Slots
+
+- [def start()](#start)
+
+- [def stop()](#stop)
+
+
+## Signals
+
+- [def timeout()](#timeout)
+
+
+## Static functions
+
+- [def singleShot()](#static-singleshotmsec-context-functor)
+
+
+## Detailed Description
+
+The QTimer class provides a high-level programming interface for timers. To use it, create a QTimer , connect its timeout() signal to the appropriate slots, and call start() . From then on, it will emit the timeout() signal at constant intervals.
+
+Example for a one second (1000 millisecond) timer (from the Analog Clock example):
+
+```python
+timer = QTimer(self)
+timer.timeout.connect(this, QOverload<>::of(&AnalogClock::update))
+timer.start(1000)
+```
+
+From then on, the update() slot is called every second.
+
+You can set a timer to time out only once by calling setSingleShot (true). You can also use the static singleShot() function to call a slot after a specified interval:
+
+```python
+QTimer::singleShot(200, self.updateCaption)
+```
+
+In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI thread, use exec() . Qt uses the timer’s thread affinity to determine which thread will emit the timeout() signal. Because of this, you must start and stop the timer in its thread; it is not possible to start a timer from another thread.
+
+As a special case, a QTimer with a timeout of 0 will time out as soon as possible, though the ordering between zero timers and other sources of events is unspecified. Zero timers can be used to do some work while still providing a snappy user interface:
+
+```python
+timer = QTimer(self)
+timer.timeout.connect(self.processOneThing)
+timer.start()
+```
+
+From then on, processOneThing() will be called repeatedly. It should be written in such a way that it always returns quickly (typically after processing one data item) so that Qt can deliver events to the user interface and stop the timer as soon as it has done all its work. This is the traditional way of implementing heavy work in GUI applications, but as multithreading is nowadays becoming available on more and more platforms, we expect that zero-millisecond QTimer objects will gradually be replaced by QThread s.
+
+
+## Accuracy and Timer Resolution
+
+The accuracy of timers depends on the underlying operating system and hardware. Most platforms support a resolution of 1 millisecond, though the accuracy of the timer will not equal this resolution in many real-world situations.
+
+The accuracy also depends on the timer type . For PreciseTimer , QTimer will try to keep the accuracy at 1 millisecond. Precise timers will also never time out earlier than expected.
+
+For CoarseTimer and VeryCoarseTimer types, QTimer may wake up earlier than expected, within the margins for those types: 5% of the interval for CoarseTimer and 500 ms for VeryCoarseTimer .
+
+All timer types may time out later than expected if the system is busy or unable to provide the requested accuracy. In such a case of timeout overrun, Qt will emit timeout() only once, even if multiple timeouts have expired, and then will resume the original interval.
+
+
+## Alternatives to QTimer
+
+An alternative to using QTimer is to call startTimer() for your object and reimplement the timerEvent() event handler in your class (which must inherit QObject ). The disadvantage is that timerEvent() does not support such high-level features as single-shot timers or signals.
+
+Another alternative is QBasicTimer . It is typically less cumbersome than using startTimer() directly. See Timers for an overview of all three approaches.
+
+Some operating systems limit the number of timers that may be used; Qt tries to work around these limitations.
+
+
+--------------------------------
+## property active : bool
+
+This boolean property is true if the timer is running; otherwise false.
+
+Access functions:
+
+- isActive()
+
+
+--------------------------------
+## property interval : int
+
+This property holds the timeout interval in milliseconds.
+
+The default value for this property is 0. A QTimer with a timeout interval of 0 will time out as soon as all the events in the window system’s event queue have been processed.
+
+Setting the interval of an active timer changes its timerId() .
+
+Access functions:
+
+- interval()
+- setInterval()
+
+
+--------------------------------
+## property remainingTime : int
+
+This property holds the remaining time in milliseconds.
+
+Returns the timer’s remaining value in milliseconds left until the timeout. If the timer is inactive, the returned value will be -1. If the timer is overdue, the returned value will be 0.
+
+Access functions:
+
+- remainingTime()
+
+
+--------------------------------
+## property singleShot : bool
+
+This property holds whether the timer is a single-shot timer.
+
+A single-shot timer fires only once, non-single-shot timers fire every interval milliseconds.
+
+The default value for this property is false.
+
+Access functions:
+
+- isSingleShot()
+- setSingleShot()
+
+
+--------------------------------
+## property timerType : Qt.TimerType
+
+This property holds controls the accuracy of the timer.
+
+The default value for this property is Qt::CoarseTimer.
+
+Access functions:
+
+- timerType()
+- setTimerType()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QObject
+
+Constructs a timer with the given parent.
+
+
+--------------------------------
+## interval()
+
+Return type: int
+
+Getter of property interval  .
+
+
+--------------------------------
+## isActive()
+
+Return type: bool
+
+Returns true if the timer is running (pending); otherwise returns false.
+
+Getter of property active  .
+
+
+--------------------------------
+## isSingleShot()
+
+Return type: bool
+
+Getter of property singleShot  .
+
+
+--------------------------------
+## remainingTime()
+
+Return type: int
+
+Getter of property remainingTime  .
+
+
+--------------------------------
+## setInterval(msec)
+
+Parameters:
+
+- msec – int
+
+Setter of property interval  .
+
+
+--------------------------------
+## setSingleShot(singleShot)
+
+Parameters:
+
+- singleShot – bool
+
+Setter of property singleShot  .
+
+
+--------------------------------
+## setTimerType(atype)
+
+Parameters:
+
+- atype – TimerType
+
+Setter of property timerType  .
+
+
+--------------------------------
+## static singleShot(msec, timerType, receiver, member)
+
+Parameters:
+
+- msec – int
+- timerType – TimerType
+- receiver – QObject
+- member – str
+
+This is an overloaded function.
+
+This static function calls a slot after a given time interval.
+
+It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object.
+
+The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds. The timerType affects the accuracy of the timer.
+
+
+--------------------------------
+## static singleShot(msec, receiver, member)
+
+Parameters:
+
+- msec – int
+- receiver – QObject
+- member – str
+
+This static function calls a slot after a given time interval.
+
+It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object.
+
+Example:
+
+```python
+from PySide6.QtWidgets import QApplication
+from PySide6.QtCore import QTimer
+if __name__ == "__main__":
+
+    app = QApplication([])
+    QTimer.singleShot(600000, app, QCoreApplication.quit)
+    ...
+    sys.exit(app.exec())
+```
+
+This sample program automatically terminates after 10 minutes (600,000 milliseconds).
+
+The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds.
+
+
+--------------------------------
+## static singleShot(msec, context, functor)
+
+Parameters:
+
+- msec – int
+- context – QObject
+- functor – PyCallable
+
+
+--------------------------------
+## static singleShot(msec, functor)
+
+Parameters:
+
+- msec – int
+- functor – PyCallable
+
+
+--------------------------------
+## start()
+
+This function overloads start().
+
+Starts or restarts the timer with the timeout specified in interval .
+
+If the timer is already running, it will be stopped and restarted.
+
+If singleShot is true, the timer will be activated only once.
+
+
+--------------------------------
+## start(msec)
+
+Parameters:
+
+- msec – int
+
+Starts or restarts the timer with a timeout interval of msec milliseconds.
+
+If the timer is already running, it will be stopped and restarted.
+
+If singleShot is true, the timer will be activated only once. This is equivalent to:
+
+```bash
+timer.setInterval(msec);
+timer.start();
+```
+
+
+--------------------------------
+## stop()
+
+Stops the timer.
+
+
+--------------------------------
+## timeout()
+
+This signal is emitted when the timer times out.
+
+
+--------------------------------
+## timerId()
+
+Return type: int
+
+Returns the ID of the timer if the timer is running; otherwise returns -1.
+
+
+--------------------------------
+## timerType()
+
+Return type: TimerType
+
+Getter of property timerType  .

From 37e0e37068ca811e443917c99493309fb2d81ff6 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 19:17:03 +0800
Subject: [PATCH 23/38] [PyQt] Add QProgressBar doc.

---
 .../PyQt6/Class-0/QtWidget/QProgressBar.CN.md | 505 ++++++++++++++++++
 .../PyQt6/Class-0/QtWidget/QProgressBar.md    | 505 ++++++++++++++++++
 2 files changed, 1010 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QProgressBar.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
new file mode 100644
index 0000000..2abc3f6
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
@@ -0,0 +1,505 @@
+
+[English doc](QProgressBar.md)
+
+# class QProgressBar
+
+QProgressBar 小部件提供水平或垂直进度条。
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    进度条的对齐方式。
+
+- [format](#property-format--str)
+
+    用于生成当前文本的字符串。
+
+- [invertedAppearance](#property-invertedappearance--bool)
+
+    进度条是否反转显示进度。
+
+- [maximum](#property-maximum--int)
+
+    进度条的最大值。
+
+- [minimum](#property-minimum--int)
+
+    进度条的最小值。
+
+- [orientation](#property-orientation--qtorientation)
+
+    进度条的方向。
+
+- [text](#property-text--str)
+
+    随进度条显示的描述性文字。
+
+- [textDirection](#property-textdirection--qprogressbardirection)
+
+    垂直进度条的文本阅读方向。
+
+- [textVisible](#property-textvisible--bool)
+
+    是否显示当前完成的百分比。
+
+- [value](#property-value--int)
+
+    进度条的当前值。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def alignment()](#alignment)
+
+- [def format()](#format)
+
+- [def invertedAppearance()](#invertedappearance)
+
+- [def isTextVisible()](#istextvisible)
+
+- [def maximum()](#maximum)
+
+- [def minimum()](#minimum)
+
+- [def orientation()](#orientation)
+
+- [def resetFormat()](#resetformat)
+
+- [def setAlignment()](#setalignmentalignment)
+
+- [def setFormat()](#setformatformat)
+
+- [def setInvertedAppearance()](#setinvertedappearanceinvert)
+
+- [def setTextDirection()](#settextdirectiontextdirection)
+
+- [def setTextVisible()](#settextvisiblevisible)
+
+- [def textDirection()](#textdirection)
+
+- [def value()](#value)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+- [def text()](#text)
+
+
+## Slots
+
+- [def reset()](#reset)
+
+- [def setMaximum()](#setmaximummaximum)
+
+- [def setMinimum()](#setminimumminimum)
+
+- [def setOrientation()](#setorientationarg__1)
+
+- [def setRange()](#setrangeminimum-maximum)
+
+- [def setValue()](#setvaluevalue)
+
+
+## Signals
+
+- [def valueChanged()](#valuechangedvalue)
+
+
+# Detailed Description
+
+进度条用于向用户指示操作的进度，并向他们保证应用程序仍在运行。
+
+进度条使用步骤的概念。您可以通过指定最小和最大可能的步长值来设置它，当您稍后为其提供当前步长值时，它将显示已完成的步骤百分比。百分比是通过将进度 ( value() - minimum() ) 除以 maximum() - minimum() 来计算的。
+
+您可以使用 setMinimum() 和 setMaximum 指定最小和最大步长数。当前步长数使用 setValue() 设置。可以使用 reset() 将进度条倒回到开头。
+
+如果最小值和最大值都设置为 0，则进度条会显示繁忙指示符而不是步长百分比。这很有用，例如，当使用 QNetworkAccessManager 下载项目时，如果无法确定正在下载的项目的大小。
+
+
+--------------------------------
+## class Direction
+
+指定垂直进度条文本的阅读方向。
+
+| Constant                 | Description          |
+| ------------------------ | -------------------- |
+| QProgressBar.TopToBottom | 文本顺时针旋转 90 度。 |
+| QProgressBar.BottomToTop | 文本逆时针旋转 90 度。 |
+
+请注意，是否绘制文本取决于样式。目前 CleanLooks 和 Plastique 绘制文本。Mac、Windows 和 WindowsVista 样式不绘制文本。
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+此属性保存的是进度条的对齐方式。
+
+访问功能：
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property format : str
+
+此属性保存用于生成当前文本的字符串。
+
+%p - 替换为完成的百分比。 %v - 替换为当前值。 %m - 替换为总步骤数。
+
+默认值为“%p%”。
+
+访问功能：
+
+- format()
+- setFormat()
+- resetFormat()
+
+
+--------------------------------
+## property invertedAppearance : bool
+
+此属性用于控制进度条是否反转显示进度。
+
+如果此属性为真，进度条将朝另一个方向增长（例如从右到左）。默认情况下，进度条不会反转。
+
+访问功能：
+
+- invertedAppearance()
+- setInvertedAppearance()
+
+
+--------------------------------
+## property maximum : int
+
+此属性保存进度条的最大值。
+
+设置此属性时，会根据需要调整最小值以确保范围保持有效。如果当前值超出新范围，则使用 reset() 重置进度条。
+
+访问功能：
+
+- maximum()
+- setMaximum()
+
+
+--------------------------------
+## property minimum : int
+
+此属性保存进度条的最小值。
+
+设置此属性时，会根据需要调整最大值以确保范围保持有效。如果当前值超出新范围，则使用 reset() 重置进度条。
+
+访问功能：
+
+- minimum()
+- setMinimum()
+
+
+--------------------------------
+## property orientation : Qt.Orientation
+
+此属性保存进度条的方向。
+
+方向必须是 Qt::Horizo​​ntal（默认）或 Qt::Vertical。
+
+访问功能：
+
+- orientation()
+- setOrientation()
+
+
+--------------------------------
+## property text : str
+
+此属性保存与进度条一起显示的描述性文本。
+
+返回的文本与进度条中心（或在某些样式中，左侧）显示的文本相同。
+
+文本中显示的进度可能小于最小值，表示在设置任何进度之前，进度条处于“重置”状态。
+
+在默认实现中，文本要么包含指示迄今为止进度的百分比值，要么为空白，因为进度条处于重置状态。
+
+访问功能：
+
+- text()
+
+
+--------------------------------
+## property textDirection : QProgressBar.Direction
+
+此属性保存垂直进度条的文本阅读方向。
+
+此属性对水平进度条没有影响。默认情况下，阅读方向为 TopToBottom 。
+
+访问功能：
+
+- textDirection()
+- setTextDirection()
+
+
+--------------------------------
+## property textVisible : bool
+
+此属性保存是否应显示当前完成的百分比。
+
+样式可能会忽略此属性（例如，QMacStyle 从不绘制文本）。
+
+访问功能：
+
+- isTextVisible()
+- setTextVisible()
+
+
+--------------------------------
+## property value : int
+
+此属性保存进度条的当前值。
+
+尝试将当前值更改为最小-最大范围之外的值不会对当前值产生任何影响。
+
+访问功能：
+
+- value()
+- setValue()
+- Signal valueChanged()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用给定的父级构造一个进度条。
+
+默认情况下，最小步长值设置为 0，最大步长值设置为 100。
+
+
+--------------------------------
+## alignment()
+
+返回类型：Combination of AlignmentFlag
+
+属性 alignment 的获取器。
+
+
+--------------------------------
+## format()
+
+返回类型：str
+
+属性格式的获取器。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionProgressBar
+
+用此 QProgressBar 中的值初始化选项。当子类需要 QStyleOptionProgressBar 但又不想自己填写所有信息时，此方法非常有用。
+
+
+--------------------------------
+## invertedAppearance()
+
+返回类型：bool
+
+属性反转外观的获取器。
+
+
+--------------------------------
+## isTextVisible()
+
+返回类型：bool
+
+属性 textVisible 的获取器。
+
+
+--------------------------------
+## maximum()
+
+返回类型：int
+
+属性最大值的获取者。
+
+
+--------------------------------
+## minimum()
+
+返回类型：int
+
+属性最小值的获取者。
+
+
+--------------------------------
+## orientation()
+
+返回类型：Orientation
+
+属性方向的获取器。
+
+
+--------------------------------
+## reset()
+
+重置进度条。进度条“倒退”并且不显示任何进度。
+
+
+--------------------------------
+## resetFormat()
+
+属性格式的重置功能。
+
+
+--------------------------------
+## setAlignment(alignment)
+
+参数：
+
+- alignment – Combination of AlignmentFlag
+
+属性对齐的设置者。
+
+
+--------------------------------
+## setFormat(format)
+
+参数：
+
+- format – str
+
+属性格式的设置者。
+
+
+--------------------------------
+## setInvertedAppearance(invert)
+
+参数：
+
+- invert – bool
+
+属性的设置器反转外观。
+
+
+--------------------------------
+## setMaximum(maximum)
+
+参数：
+
+- maximum – int
+
+属性最大值的设置者。
+
+
+--------------------------------
+## setMinimum(minimum)
+
+参数：
+
+- minimum – int
+
+财产最低限额的设定者 。
+
+
+--------------------------------
+## setOrientation(arg__1)
+
+参数：
+
+- arg__1 – Orientation
+
+属性方向的设置者。
+
+
+--------------------------------
+## setRange(minimum, maximum)
+
+参数：
+
+- minimum – int
+- maximum – int
+
+将进度条的最小值和最大值分别设置为最小值和最大值。
+
+如果最大值小于最小值，则最小值将成为唯一合法值。
+
+如果当前值超出新范围，则使用 reset() 重置进度条。
+
+可以使用 setRange(0, 0) 将 QProgressBar 设置为未确定状态。
+
+
+--------------------------------
+## setTextDirection(textDirection)
+
+参数：
+
+- textDirection – Direction
+
+属性 textDirection 的设置器。
+
+
+--------------------------------
+## setTextVisible(visible)
+
+参数：
+
+- visible – bool
+
+属性 textVisible 的设置者。
+
+
+--------------------------------
+## setValue(value)
+
+参数：
+
+- value – int
+
+属性值的设置者。
+
+
+--------------------------------
+## text()
+
+返回类型：str
+
+属性 text 的获取器。
+
+
+--------------------------------
+## textDirection()
+
+返回类型：Direction
+
+属性 textDirection 的获取器。
+
+
+--------------------------------
+## value()
+
+返回类型：int
+
+属性值的获取器。
+
+
+--------------------------------
+## valueChanged(value)
+
+参数：
+
+- value – int
+
+当进度条显示的值发生变化时发出此信号。value 是进度条显示的新值。
+
+属性 value 的通知信号。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.md b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.md
new file mode 100644
index 0000000..304e8c4
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.md
@@ -0,0 +1,505 @@
+
+[Chinese doc](QProgressBar.CN.md)
+
+# class QProgressBar
+
+The QProgressBar widget provides a horizontal or vertical progress bar.
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    The alignment of the progress bar.
+
+- [format](#property-format--str)
+
+    The string used to generate the current text.
+
+- [invertedAppearance](#property-invertedappearance--bool)
+
+    Whether or not a progress bar shows its progress inverted.
+
+- [maximum](#property-maximum--int)
+
+    The progress bar’s maximum value.
+
+- [minimum](#property-minimum--int)
+
+    The progress bar’s minimum value.
+
+- [orientation](#property-orientation--qtorientation)
+
+    The orientation of the progress bar.
+
+- [text](#property-text--str)
+
+    The descriptive text shown with the progress bar.
+
+- [textDirection](#property-textdirection--qprogressbardirection)
+
+    The reading direction of the text for vertical progress bars.
+
+- [textVisible](#property-textvisible--bool)
+
+    Whether the current completed percentage should be displayed.
+
+- [value](#property-value--int)
+
+    The progress bar’s current value.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def alignment()](#alignment)
+
+- [def format()](#format)
+
+- [def invertedAppearance()](#invertedappearance)
+
+- [def isTextVisible()](#istextvisible)
+
+- [def maximum()](#maximum)
+
+- [def minimum()](#minimum)
+
+- [def orientation()](#orientation)
+
+- [def resetFormat()](#resetformat)
+
+- [def setAlignment()](#setalignmentalignment)
+
+- [def setFormat()](#setformatformat)
+
+- [def setInvertedAppearance()](#setinvertedappearanceinvert)
+
+- [def setTextDirection()](#settextdirectiontextdirection)
+
+- [def setTextVisible()](#settextvisiblevisible)
+
+- [def textDirection()](#textdirection)
+
+- [def value()](#value)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+- [def text()](#text)
+
+
+## Slots
+
+- [def reset()](#reset)
+
+- [def setMaximum()](#setmaximummaximum)
+
+- [def setMinimum()](#setminimumminimum)
+
+- [def setOrientation()](#setorientationarg__1)
+
+- [def setRange()](#setrangeminimum-maximum)
+
+- [def setValue()](#setvaluevalue)
+
+
+## Signals
+
+- [def valueChanged()](#valuechangedvalue)
+
+
+# Detailed Description
+
+A progress bar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running.
+
+The progress bar uses the concept of steps. You set it up by specifying the minimum and maximum possible step values, and it will display the percentage of steps that have been completed when you later give it the current step value. The percentage is calculated by dividing the progress ( value() - minimum() ) divided by maximum() - minimum() .
+
+You can specify the minimum and maximum number of steps with setMinimum() and setMaximum . The current number of steps is set with setValue() . The progress bar can be rewound to the beginning with reset() .
+
+If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QNetworkAccessManager to download items when they are unable to determine the size of the item being downloaded.
+
+
+--------------------------------
+## class Direction
+
+Specifies the reading direction of the text for vertical progress bars.
+
+| Constant                 | Description                               |
+| ------------------------ | ----------------------------------------- |
+| QProgressBar.TopToBottom | The text is rotated 90 degrees clockwise. |
+| QProgressBar.BottomToTop | The text is rotated 90 degrees counter-clockwise. |
+
+Note that whether or not the text is drawn is dependent on the style. Currently CleanLooks and Plastique draw the text. Mac, Windows and WindowsVista style do not.
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+This property holds the alignment of the progress bar.
+
+Access functions:
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property format : str
+
+This property holds the string used to generate the current text.
+
+%p - is replaced by the percentage completed. %v - is replaced by the current value. %m - is replaced by the total number of steps.
+
+The default value is “%p%”.
+
+Access functions:
+
+- format()
+- setFormat()
+- resetFormat()
+
+
+--------------------------------
+## property invertedAppearance : bool
+
+This property holds whether or not a progress bar shows its progress inverted.
+
+If this property is true, the progress bar grows in the other direction (e.g. from right to left). By default, the progress bar is not inverted.
+
+Access functions:
+
+- invertedAppearance()
+- setInvertedAppearance()
+
+
+--------------------------------
+## property maximum : int
+
+This property holds the progress bar’s maximum value.
+
+When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. If the current value falls outside the new range, the progress bar is reset with reset() .
+
+Access functions:
+
+- maximum()
+- setMaximum()
+
+
+--------------------------------
+## property minimum : int
+
+This property holds the progress bar’s minimum value.
+
+When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. If the current value falls outside the new range, the progress bar is reset with reset() .
+
+Access functions:
+
+- minimum()
+- setMinimum()
+
+
+--------------------------------
+## property orientation : Qt.Orientation
+
+This property holds the orientation of the progress bar.
+
+The orientation must be Qt::Horizontal (the default) or Qt::Vertical.
+
+Access functions:
+
+- orientation()
+- setOrientation()
+
+
+--------------------------------
+## property text : str
+
+This property holds the descriptive text shown with the progress bar.
+
+The text returned is the same as the text displayed in the center (or in some styles, to the left) of the progress bar.
+
+The progress shown in the text may be smaller than the minimum value, indicating that the progress bar is in the “reset” state before any progress is set.
+
+In the default implementation, the text either contains a percentage value that indicates the progress so far, or it is blank because the progress bar is in the reset state.
+
+Access functions:
+
+- text()
+
+
+--------------------------------
+## property textDirection : QProgressBar.Direction
+
+This property holds the reading direction of the text for vertical progress bars.
+
+This property has no impact on horizontal progress bars. By default, the reading direction is TopToBottom .
+
+Access functions:
+
+- textDirection()
+- setTextDirection()
+
+
+--------------------------------
+## property textVisible : bool
+
+This property holds whether the current completed percentage should be displayed.
+
+This property may be ignored by the style (e.g., QMacStyle never draws the text).
+
+Access functions:
+
+- isTextVisible()
+- setTextVisible()
+
+
+--------------------------------
+## property value : int
+
+This property holds the progress bar’s current value.
+
+Attempting to change the current value to one outside the minimum-maximum range has no effect on the current value.
+
+Access functions:
+
+- value()
+- setValue()
+- Signal valueChanged()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a progress bar with the given parent.
+
+By default, the minimum step value is set to 0, and the maximum to 100.
+
+
+--------------------------------
+## alignment()
+
+Return type: Combination of AlignmentFlag
+
+Getter of property alignment  .
+
+
+--------------------------------
+## format()
+
+Return type: str
+
+Getter of property format  .
+
+
+--------------------------------
+## initStyleOption(option)
+
+Parameters:
+
+- option – QStyleOptionProgressBar
+
+Initialize option with the values from this QProgressBar . This method is useful for subclasses when they need a QStyleOptionProgressBar , but don’t want to fill in all the information themselves.
+
+
+--------------------------------
+## invertedAppearance()
+
+Return type: bool
+
+Getter of property invertedAppearance  .
+
+
+--------------------------------
+## isTextVisible()
+
+Return type: bool
+
+Getter of property textVisible  .
+
+
+--------------------------------
+## maximum()
+
+Return type: int
+
+Getter of property maximum  .
+
+
+--------------------------------
+## minimum()
+
+Return type: int
+
+Getter of property minimum  .
+
+
+--------------------------------
+## orientation()
+
+Return type: Orientation
+
+Getter of property orientation  .
+
+
+--------------------------------
+## reset()
+
+Reset the progress bar. The progress bar “rewinds” and shows no progress.
+
+
+--------------------------------
+## resetFormat()
+
+Reset function of property format  .
+
+
+--------------------------------
+## setAlignment(alignment)
+
+Parameters:
+
+- alignment – Combination of AlignmentFlag
+
+Setter of property alignment  .
+
+
+--------------------------------
+## setFormat(format)
+
+Parameters:
+
+- format – str
+
+Setter of property format  .
+
+
+--------------------------------
+## setInvertedAppearance(invert)
+
+Parameters:
+
+- invert – bool
+
+Setter of property invertedAppearance  .
+
+
+--------------------------------
+## setMaximum(maximum)
+
+Parameters:
+
+- maximum – int
+
+Setter of property maximum  .
+
+
+--------------------------------
+## setMinimum(minimum)
+
+Parameters:
+
+- minimum – int
+
+Setter of property minimum  .
+
+
+--------------------------------
+## setOrientation(arg__1)
+
+Parameters:
+
+- arg__1 – Orientation
+
+Setter of property orientation  .
+
+
+--------------------------------
+## setRange(minimum, maximum)
+
+Parameters:
+
+- minimum – int
+- maximum – int
+
+Sets the progress bar’s minimum and maximum values to minimum and maximum respectively.
+
+If maximum is smaller than minimum, minimum becomes the only legal value.
+
+If the current value falls outside the new range, the progress bar is reset with reset() .
+
+The QProgressBar can be set to undetermined state by using setRange(0, 0).
+
+
+--------------------------------
+## setTextDirection(textDirection)
+
+Parameters:
+
+- textDirection – Direction
+
+Setter of property textDirection  .
+
+
+--------------------------------
+## setTextVisible(visible)
+
+Parameters:
+
+- visible – bool
+
+Setter of property textVisible  .
+
+
+--------------------------------
+## setValue(value)
+
+Parameters:
+
+- value – int
+
+Setter of property value  .
+
+
+--------------------------------
+## text()
+
+Return type: str
+
+Getter of property text  .
+
+
+--------------------------------
+## textDirection()
+
+Return type: Direction
+
+Getter of property textDirection  .
+
+
+--------------------------------
+## value()
+
+Return type: int
+
+Getter of property value  .
+
+
+--------------------------------
+## valueChanged(value)
+
+Parameters:
+
+- value – int
+
+This signal is emitted when the value shown in the progress bar changes. value is the new value shown by the progress bar.
+
+Notification signal of property value  .

From 5897a604b0629fa88f5f8dfcb3c3c2efa032c569 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 19:29:57 +0800
Subject: [PATCH 24/38] [PyQt] Add QRadioButton doc.

---
 .../PyQt6/Class-0/QtWidget/QRadioButton.CN.md | 72 +++++++++++++++++++
 .../PyQt6/Class-0/QtWidget/QRadioButton.md    | 72 +++++++++++++++++++
 2 files changed, 144 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QRadioButton.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QRadioButton.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.CN.md
new file mode 100644
index 0000000..2af766b
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.CN.md
@@ -0,0 +1,72 @@
+
+[English doc](QRadioButton.md)
+
+# class QRadioButton
+
+QRadioButton 小部件提供了一个带有文本标签的单选按钮。
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionbutton)
+
+
+## Detailed Description
+
+QRadioButton 是一个可以打开（选中）或关闭（取消选中）的选项按钮。单选按钮通常为用户提供“众多选择之一”。在一组单选按钮中，一次只能选中一个单选按钮；如果用户选择另一个按钮，则先前选择的按钮将被关闭。
+
+单选按钮默认为自动独占。如果启用了自动独占，则属于同一父窗口小部件的单选按钮的行为就像它们是同一独占按钮组的一部分一样。如果您需要属于同一父窗口小部件的单选按钮的多个独占按钮组，请将它们放入 QButtonGroup 中。
+
+每当按钮打开或关闭时，它都会发出 toggled() 信号。如果您想在按钮每次改变状态时触发操作，请连接到此信号。使用 isChecked() 查看是否选择了特定按钮。
+
+与 QPushButton 一样，单选按钮显示文本，也可以显示小图标。图标使用 setIcon() 设置。文本可以在构造函数中或使用 setText() 设置。可以通过在文本中将首选字符置于“&”符号前来指定快捷键。例如：
+
+```python
+button = QRadioButton("Search from the cursor", self)
+```
+
+在此示例中，快捷键为 Alt+c。有关详细信息，请参阅 QShortcut 文档。要显示实际的 & 符号，请使用“&&”。
+
+重要的继承成员：text()、setText()、text()、setDown()、isDown()、autoRepeat()、group()、setAutoRepeat()、toggle()、pressed()、released()、clicked() 和 toggled()。
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用给定的父级构造一个单选按钮，但没有文本或像素图。
+
+父级参数传递给 QAbstractButton 构造函数。
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+参数：
+
+- text – str
+- parent – QWidget
+
+使用给定的父级和文本字符串构造一个单选按钮。
+
+父级参数被传递给 QAbstractButton 构造函数。
+
+
+--------------------------------
+## initStyleOption(button)
+
+参数：
+
+- button – QStyleOptionButton
+
+用此 QRadioButton 中的值初始化选项。当子类需要 QStyleOptionButton 但不想自己填写所有信息时，此方法很有用。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.md b/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.md
new file mode 100644
index 0000000..6e8f992
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QRadioButton.md
@@ -0,0 +1,72 @@
+
+[Chinese doc](QRadioButton.CN.md)
+
+# class QRadioButton
+
+The QRadioButton widget provides a radio button with a text label.
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionbutton)
+
+
+## Detailed Description
+
+A QRadioButton is an option button that can be switched on (checked) or off (unchecked). Radio buttons typically present the user with a “one of many” choice. In a group of radio buttons, only one radio button at a time can be checked; if the user selects another button, the previously selected button is switched off.
+
+Radio buttons are autoExclusive by default. If auto-exclusive is enabled, radio buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. If you need multiple exclusive button groups for radio buttons that belong to the same parent widget, put them into a QButtonGroup .
+
+Whenever a button is switched on or off, it emits the toggled() signal. Connect to this signal if you want to trigger an action each time the button changes state. Use isChecked() to see if a particular button is selected.
+
+Just like QPushButton , a radio button displays text, and optionally a small icon. The icon is set with setIcon() . The text can be set in the constructor or with setText() . A shortcut key can be specified by preceding the preferred character with an ampersand in the text. For example:
+
+```python
+button = QRadioButton("Search from the cursor", self)
+```
+
+In this example the shortcut is Alt+c. See the QShortcut documentation for details. To display an actual ampersand, use ‘&&’.
+
+Important inherited members: text() , setText() , text() , setDown() , isDown() , autoRepeat() , group() , setAutoRepeat() , toggle() , pressed() , released() , clicked() , and toggled() .
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a radio button with the given parent, but with no text or pixmap.
+
+The parent argument is passed on to the QAbstractButton constructor.
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+Parameters:
+
+- text – str
+- parent – QWidget
+
+Constructs a radio button with the given parent and text string.
+
+The parent argument is passed on to the QAbstractButton constructor.
+
+
+--------------------------------
+## initStyleOption(button)
+
+Parameters:
+
+- button – QStyleOptionButton
+
+Initialize option with the values from this QRadioButton . This method is useful for subclasses when they need a QStyleOptionButton , but don’t want to fill in all the information themselves.

From 5bf3bd251062d375b7b8471a25b96e97d9849de1 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 19:43:35 +0800
Subject: [PATCH 25/38] [PyQt] Add QCheckBox doc.

---
 .../PyQt6/Class-0/QtWidget/QCheckBox.CN.md    | 167 ++++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QCheckBox.md   | 167 ++++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md   |  24 +--
 .../PyQt6/Class-0/QtWidget/QMessageBox.CN.md  |  18 +-
 .../PyQt6/Class-0/QtWidget/QProgressBar.CN.md |  20 +--
 .../PyQt6/Class-0/QtWidget/QPushButton.CN.md  |   6 +-
 .../PyQt6/Class-0/QtWidget/QTextEdit.CN.md    |  34 ++--
 7 files changed, 385 insertions(+), 51 deletions(-)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QCheckBox.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QCheckBox.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.CN.md
new file mode 100644
index 0000000..18f5f8c
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.CN.md
@@ -0,0 +1,167 @@
+
+[English doc](QCheckBox.md)
+
+# class QCheckBox
+
+QCheckBox 小部件提供了一个带有文本标签的复选框。
+
+
+# Synopsis
+
+## Properties
+
+- [tristate](#property-tristate--bool)
+
+    该复选框是否是三态复选框。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def checkState()](#checkstate)
+
+- [def isTristate()](#istristate)
+
+- [def setCheckState()](#setcheckstatestate)
+
+- [def setTristate()](#settristateytrue)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Signals
+
+- [def checkStateChanged()](#checkstatechangedarg__1)
+
+- [def stateChanged()](#statechangedarg__1)
+
+
+# Detailed Description
+
+QCheckBox 是一个可以打开（选中）或关闭（取消选中）的选项按钮。复选框通常用于表示应用程序中可以启用或禁用而不会影响其他功能的功能。可以实现不同类型的行为。例如，可以使用 QButtonGroup 对复选按钮进行逻辑分组，从而允许使用独占复选框。但是，QButtonGroup 不提供任何视觉表示。
+
+下图进一步说明了独占复选框和非独占复选框之间的区别。
+
+每当选中或清除复选框时，它都会发出信号 checkStateChanged() 。如果您想在复选框每次改变状态时触发操作，请连接到此信号。您可以使用 isChecked() 来查询复选框是否被选中。
+
+除了通常的选中和未选中状态外，QCheckBox 还可以选择提供第三种状态来指示“无变化”。当您需要为用户提供既不选中也不取消选中复选框的选项时，这很有用。如果您需要第三种状态，请使用 setTristate() 启用它，并使用 checkState() 查询当前的切换状态。
+
+就像 QPushButton 一样，复选框显示文本，也可以显示小图标。图标使用 setIcon() 设置。文本可以在构造函数中设置，也可以使用 setText() 设置。可以通过在首选字符前加上 & 符号来指定快捷键。例如：
+
+```python
+checkbox = QCheckBox("Case sensitive", self)
+```
+
+在此示例中，快捷键为 Alt+A。有关详细信息，请参阅 QShortcut 文档。要显示实际的 & 符号，请使用“&&”。
+
+重要的继承函数：text()、setText()、text()、pixmap()、setPixmap()、accel()、setAccel()、isToggleButton()、setDown()、isDown()、isOn()、checkState()、autoRepeat()、isExclusiveToggle()、group()、setAutoRepeat()、toggle()、pressed()、released()、clicked()、toggled()、checkState() 和 checkStateChanged()。
+
+
+--------------------------------
+## property tristate : bool
+
+此属性保存复选框是否为三态复选框。
+
+默认值为 false，即复选框只有两种状态。
+
+访问函数：
+
+- isTristate()
+- setTristate()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用给定的父级构造一个复选框，但没有文本。
+
+父级被传递给 QAbstractButton 构造函数。
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+参数：
+
+- text – str
+- parent – QWidget
+
+使用给定的父级和文本构造一个复选框。
+
+父级被传递给 QAbstractButton 构造函数。
+
+
+--------------------------------
+## checkState()
+
+返回类型：CheckState
+
+返回复选框的选中状态。如果不需要三态支持，也可以使用 isChecked() ，它返回布尔值。
+
+
+--------------------------------
+## checkStateChanged(arg__1)
+
+参数：
+
+- arg__1 – CheckState
+
+每当复选框的状态发生变化时（即，每当用户选中或取消选中复选框时），都会发出此信号。
+
+state 包含复选框的新 Qt::CheckState。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionButton
+
+用此 QCheckBox 中的值初始化选项。此方法对于需要 QStyleOptionButton 但不想自己填写所有信息的子类很有用。
+
+
+--------------------------------
+## isTristate()
+
+返回类型：bool
+
+属性 tristateᅟ 的获取器。
+
+
+--------------------------------
+## setCheckState(state)
+
+参数：
+
+- state – CheckState
+
+将复选框的选中状态设置为 state。如果不需要三态支持，也可以使用 setChecked() ，它接受一个布尔值。
+
+
+--------------------------------
+## setTristate([y=true])
+
+参数：
+
+- y – bool
+
+属性 tristateᅟ 的 setter。
+
+
+--------------------------------
+## stateChanged(arg__1)
+
+参数：
+
+- arg__1 – int
+
+改用 checkStateChanged (Qt::CheckState)。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.md b/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.md
new file mode 100644
index 0000000..8bcbd83
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QCheckBox.md
@@ -0,0 +1,167 @@
+
+[Chinese doc](QCheckBox.CN.md)
+
+# class QCheckBox
+
+The QCheckBox widget provides a checkbox with a text label.
+
+
+# Synopsis
+
+## Properties
+
+- [tristate](#property-tristate--bool)
+
+    Whether the checkbox is a tri-state checkbox.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def checkState()](#checkstate)
+
+- [def isTristate()](#istristate)
+
+- [def setCheckState()](#setcheckstatestate)
+
+- [def setTristate()](#settristateytrue)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Signals
+
+- [def checkStateChanged()](#checkstatechangedarg__1)
+
+- [def stateChanged()](#statechangedarg__1)
+
+
+# Detailed Description
+
+A QCheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. Different types of behavior can be implemented. For example, a QButtonGroup can be used to group check buttons logically, allowing exclusive checkboxes. However, QButtonGroup does not provide any visual representation.
+
+The image below further illustrates the differences between exclusive and non-exclusive checkboxes.
+
+Whenever a checkbox is checked or cleared, it emits the signal checkStateChanged() . Connect to this signal if you want to trigger an action each time the checkbox changes state. You can use isChecked() to query whether or not a checkbox is checked.
+
+In addition to the usual checked and unchecked states, QCheckBox optionally provides a third state to indicate “no change”. This is useful whenever you need to give the user the option of neither checking nor unchecking a checkbox. If you need this third state, enable it with setTristate() , and use checkState() to query the current toggle state.
+
+Just like QPushButton , a checkbox displays text, and optionally a small icon. The icon is set with setIcon() . The text can be set in the constructor or with setText() . A shortcut key can be specified by preceding the preferred character with an ampersand. For example:
+
+```python
+checkbox = QCheckBox("Case sensitive", self)
+```
+
+In this example, the shortcut is Alt+A. See the QShortcut documentation for details. To display an actual ampersand, use ‘&&’.
+
+Important inherited functions: text() , setText() , text() , pixmap(), setPixmap(), accel(), setAccel(), isToggleButton(), setDown() , isDown() , isOn(), checkState() , autoRepeat() , isExclusiveToggle(), group() , setAutoRepeat() , toggle() , pressed() , released() , clicked() , toggled() , checkState() , and checkStateChanged() .
+
+
+--------------------------------
+## property tristate : bool
+
+This property holds whether the checkbox is a tri-state checkbox.
+
+The default is false, i.e., the checkbox has only two states.
+
+Access functions:
+
+- isTristate()
+- setTristate()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a checkbox with the given parent, but with no text.
+
+parent is passed on to the QAbstractButton constructor.
+
+
+--------------------------------
+## __init__(text[, parent=None])
+
+Parameters:
+
+- text – str
+- parent – QWidget
+
+Constructs a checkbox with the given parent and text.
+
+parent is passed on to the QAbstractButton constructor.
+
+
+--------------------------------
+## checkState()
+
+Return type: CheckState
+
+Returns the checkbox’s check state. If you do not need tristate support, you can also use isChecked() , which returns a boolean.
+
+
+--------------------------------
+## checkStateChanged(arg__1)
+
+Parameters:
+
+- arg__1 – CheckState
+
+This signal is emitted whenever the checkbox’s state changes, i.e., whenever the user checks or unchecks it.
+
+state contains the checkbox’s new Qt::CheckState.
+
+
+--------------------------------
+## initStyleOption(option)
+
+Parameters:
+
+- option – QStyleOptionButton
+
+Initializes option with the values from this QCheckBox . This method is useful for subclasses that require a QStyleOptionButton , but do not want to fill in all the information themselves.
+
+
+--------------------------------
+## isTristate()
+
+Return type: bool
+
+Getter of property tristateᅟ .
+
+
+--------------------------------
+## setCheckState(state)
+
+Parameters:
+
+- state – CheckState
+
+Sets the checkbox’s check state to state. If you do not need tristate support, you can also use setChecked() , which takes a boolean.
+
+
+--------------------------------
+## setTristate([y=true])
+
+Parameters:
+
+- y – bool
+
+Setter of property tristateᅟ .
+
+
+--------------------------------
+## stateChanged(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Use checkStateChanged (Qt::CheckState) instead.
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md
index 38b377d..ad78b1a 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLabel.CN.md
@@ -179,7 +179,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认情况下，标签的内容是左对齐且垂直居中。
 
-访问功能：
+访问函数：
 
 - alignment()
 - setAlignment()
@@ -193,7 +193,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认情况下，此属性为 false。
 
-访问功能：
+访问函数：
 
 - hasSelectedText()
 
@@ -208,7 +208,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认情况下，缩进为 -1，这意味着有效缩进按上面描述的方式计算。
 
-访问功能：
+访问函数：
 
 - indent()
 - setIndent()
@@ -222,7 +222,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认边距为 0。
 
-访问功能：
+访问函数：
 
 - margin()
 - setMargin()
@@ -234,7 +234,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认值为 false。
 
-访问功能：
+访问函数：
 
 - openExternalLinks()
 - setOpenExternalLinks()
@@ -246,7 +246,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 设置像素图会清除所有先前的内容。好友快捷方式（如果有）将被禁用。
 
-访问功能：
+访问函数：
 
 - pixmap()
 - setPixmap()
@@ -260,7 +260,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 此属性的默认值为 false。
 
-访问功能：
+访问函数：
 
 - hasScaledContents()
 - setScaledContents()
@@ -274,7 +274,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认情况下，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - selectedText()
 
@@ -291,7 +291,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 请注意，QLabel 非常适合显示小型富文本文档，例如从标签的调色板和字体属性获取其文档特定设置（字体、文本颜色、链接颜色）的小型文档。对于大型文档，请改用只读模式的 QTextEdit。QTextEdit 还可以在必要时提供滚动条。
 
-访问功能：
+访问函数：
 
 - text()
 - setText()
@@ -305,7 +305,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认格式为 Qt::AutoText。
 
-访问功能：
+访问函数：
 
 - textFormat()
 - setTextFormat()
@@ -319,7 +319,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认值为 Qt::LinksAccessibleByMouse。
 
-访问功能：
+访问函数：
 
 - textInteractionFlags()
 - setTextInteractionFlags()
@@ -333,7 +333,7 @@ phoneLabel.setBuddy(phoneEdit)
 
 默认情况下，自动换行处于禁用状态。
 
-访问功能：
+访问函数：
 
 - wordWrap()
 - setWordWrap()
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
index da9526c..e2ddb71 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QMessageBox.CN.md
@@ -371,7 +371,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认情况下，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - detailedText()
 - setDetailedText()
@@ -394,7 +394,7 @@ if msgBox.clickedButton() == connectButton:
 
 用于显示实际图标的像素图取决于当前的 GUI 样式。您还可以通过设置图标像素图属性为图标设置自定义像素图。
 
-访问功能：
+访问函数：
 
 - icon()
 - setIcon()
@@ -409,7 +409,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认情况下，此属性未定义。
 
-访问功能：
+访问函数：
 
 - iconPixmap()
 - setIconPixmap()
@@ -424,7 +424,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认情况下，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - informativeText()
 - setInformativeText()
@@ -443,7 +443,7 @@ if msgBox.clickedButton() == connectButton:
 
 在更改其他属性后设置选项可能会导致这些值不起作用。
 
-访问功能：
+访问函数：
 
 - options()
 - setOptions()
@@ -458,7 +458,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认情况下，此属性不包含任何标准按钮。
 
-访问功能：
+访问函数：
 
 - standardButtons()
 - setStandardButtons()
@@ -475,7 +475,7 @@ if msgBox.clickedButton() == connectButton:
 
 此属性的默认值为空字符串。
 
-访问功能：
+访问函数：
 
 - text()
 - setText()
@@ -490,7 +490,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认格式为 Qt::AutoText。
 
-访问功能：
+访问函数：
 
 - textFormat()
 - setTextFormat()
@@ -503,7 +503,7 @@ if msgBox.clickedButton() == connectButton:
 
 默认值取决于样式。
 
-访问功能：
+访问函数：
 
 - textInteractionFlags()
 - setTextInteractionFlags()
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
index 2abc3f6..0b20140 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QProgressBar.CN.md
@@ -142,7 +142,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 此属性保存的是进度条的对齐方式。
 
-访问功能：
+访问函数：
 
 - alignment()
 - setAlignment()
@@ -157,7 +157,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 默认值为“%p%”。
 
-访问功能：
+访问函数：
 
 - format()
 - setFormat()
@@ -171,7 +171,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 如果此属性为真，进度条将朝另一个方向增长（例如从右到左）。默认情况下，进度条不会反转。
 
-访问功能：
+访问函数：
 
 - invertedAppearance()
 - setInvertedAppearance()
@@ -184,7 +184,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 设置此属性时，会根据需要调整最小值以确保范围保持有效。如果当前值超出新范围，则使用 reset() 重置进度条。
 
-访问功能：
+访问函数：
 
 - maximum()
 - setMaximum()
@@ -197,7 +197,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 设置此属性时，会根据需要调整最大值以确保范围保持有效。如果当前值超出新范围，则使用 reset() 重置进度条。
 
-访问功能：
+访问函数：
 
 - minimum()
 - setMinimum()
@@ -210,7 +210,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 方向必须是 Qt::Horizo​​ntal（默认）或 Qt::Vertical。
 
-访问功能：
+访问函数：
 
 - orientation()
 - setOrientation()
@@ -227,7 +227,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 在默认实现中，文本要么包含指示迄今为止进度的百分比值，要么为空白，因为进度条处于重置状态。
 
-访问功能：
+访问函数：
 
 - text()
 
@@ -239,7 +239,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 此属性对水平进度条没有影响。默认情况下，阅读方向为 TopToBottom 。
 
-访问功能：
+访问函数：
 
 - textDirection()
 - setTextDirection()
@@ -252,7 +252,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 样式可能会忽略此属性（例如，QMacStyle 从不绘制文本）。
 
-访问功能：
+访问函数：
 
 - isTextVisible()
 - setTextVisible()
@@ -265,7 +265,7 @@ QProgressBar 小部件提供水平或垂直进度条。
 
 尝试将当前值更改为最小-最大范围之外的值不会对当前值产生任何影响。
 
-访问功能：
+访问函数：
 
 - value()
 - setValue()
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md
index e4d4c4b..e27403a 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QPushButton.CN.md
@@ -110,7 +110,7 @@ button = QPushButton("Download", self)
 
 有关默认和自动默认如何交互的详细信息，请参阅默认属性。
 
-访问功能：
+访问函数：
 
 - autoDefault()
 - setAutoDefault()
@@ -133,7 +133,7 @@ button = QPushButton("Download", self)
 
 该属性的默认值为 false。
 
-访问功能：
+访问函数：
 
 - isDefault()
 - setDefault()
@@ -146,7 +146,7 @@ button = QPushButton("Download", self)
 
 此属性的默认值为 false。如果设置了此属性，则大多数样式将不会绘制按钮背景，除非按下按钮。setAutoFillBackground() 可用于确保使用 QPalette::Button 画笔填充背景。
 
-访问功能：
+访问函数：
 
 - isFlat()
 - setFlat()
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
index d5e97af..65c0348 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QTextEdit.CN.md
@@ -449,7 +449,7 @@ def insertFromMimeData(self, source):
 
 此属性的默认值为 true。
 
-访问功能：
+访问函数：
 
 - acceptRichText()
 - setAcceptRichText()
@@ -464,7 +464,7 @@ def insertFromMimeData(self, source):
 
 目前，提供的唯一自动格式化功能是 AutoBulletList ；Qt 的未来版本可能会提供更多功能。
 
-访问功能：
+访问函数：
 
 - autoFormatting()
 - setAutoFormatting()
@@ -475,7 +475,7 @@ def insertFromMimeData(self, source):
 
 此属性指定光标的宽度（以像素为单位）。默认值为 1。
 
-访问功能：
+访问函数：
 
 - cursorWidth()
 - setCursorWidth()
@@ -486,7 +486,7 @@ def insertFromMimeData(self, source):
 
 此属性保存文本编辑器的底层文档。
 
-访问功能：
+访问函数：
 
 - document()
 - setDocument()
@@ -499,7 +499,7 @@ def insertFromMimeData(self, source):
 
 默认情况下，对于新创建的空文档，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - documentTitle()
 - setDocumentTitle()
@@ -516,7 +516,7 @@ setHtml() 更改文本编辑的文本。任何先前的文本都将被删除，
 
 默认情况下，对于新创建的空文档，此属性包含用于描述没有正文的 HTML 4.0 文档的文本。
 
-访问功能：
+访问函数：
 
 - toHtml()
 - setHtml()
@@ -532,7 +532,7 @@ setHtml() 更改文本编辑的文本。任何先前的文本都将被删除，
 
 默认情况下，此属性包含 0 值。
 
-访问功能：
+访问函数：
 
 - lineWrapColumnOrWidth()
 - setLineWrapColumnOrWidth()
@@ -545,7 +545,7 @@ setHtml() 更改文本编辑的文本。任何先前的文本都将被删除，
 
 默认模式为 WidgetWidth，这会导致单词在文本编辑的右边缘换行。换行发生在空白处，保持整个单词完整。如果您希望在单词内换行，请使用 setWordWrapMode() 。如果您设置了 FixedPixelWidth 或 FixedColumnWidth 的换行模式，您还应该使用所需的宽度调用 setLineWrapColumnOrWidth()。
 
-访问功能：
+访问函数：
 
 - lineWrapMode()
 - setLineWrapMode()
@@ -569,7 +569,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 默认是MarkdownDialectGitHub。
 
-访问功能：
+访问函数：
 
 - toMarkdown()
 - setMarkdown()
@@ -587,7 +587,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 默认情况下，此属性为 false（新文本不会覆盖现有文本）。
 
-访问功能：
+访问函数：
 
 - overwriteMode()
 - setOverwriteMode()
@@ -602,7 +602,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 默认情况下，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - placeholderText()
 - setPlaceholderText()
@@ -619,7 +619,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 默认情况下，对于没有内容的编辑器，此属性包含一个空字符串。
 
-访问功能：
+访问函数：
 
 - toPlainText()
 - setPlainText()
@@ -634,7 +634,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 此属性的默认值为 false。
 
-访问功能：
+访问函数：
 
 - isReadOnly()
 - setReadOnly()
@@ -647,7 +647,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 ​​
 在某些情况下，文本编辑不应允许用户使用 Tab 键输入制表符或更改缩进，因为这会破坏焦点链。默认值为 false。
 
-访问功能：
+访问函数：
 
 - tabChangesFocus()
 - setTabChangesFocus()
@@ -662,7 +662,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 请勿设置小于 QChar::VisualTabCharacter 字符的 Horizo​​ntalAdvance() 的值，否则制表符将绘制不完整。
 
-访问功能：
+访问函数：
 
 - tabStopDistance()
 - setTabStopDistance()
@@ -675,7 +675,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 默认值取决于 QTextEdit 是只读的还是可编辑的，以及它是否是 QTextBrowser。
 
-访问功能：
+访问函数：
 
 - textInteractionFlags()
 - setTextInteractionFlags()
@@ -688,7 +688,7 @@ markdown 字符串中包含的 HTML 的解析方式与 setHtml 相同；但是
 
 仅当此属性为真，并且存在可以撤消（或重做）的操作时，用户才可以撤消或重做操作。
 
-访问功能：
+访问函数：
 
 - isUndoRedoEnabled()
 - setUndoRedoEnabled()

From c6dae715122aff2279f9689cabd464ad2aec1b5c Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Mon, 5 Aug 2024 20:44:14 +0800
Subject: [PATCH 26/38] [PyQt] Add Layout doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QFormLayout.md | 903 ++++++++++++++++++
 .../PyQt6/Class-0/QtWidget/QGridLayout.CN.md  | 399 ++++++++
 Class-3/PyQt6/Class-0/QtWidget/QGridLayout.md | 399 ++++++++
 .../PyQt6/Class-0/QtWidget/QHBoxLayout.CN.md  |  58 ++
 Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.md |  58 ++
 .../PyQt6/Class-0/QtWidget/QVBoxLayout.CN.md  |  59 ++
 Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.md |  59 ++
 7 files changed, 1935 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QFormLayout.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QGridLayout.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QGridLayout.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.md b/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.md
new file mode 100644
index 0000000..54a3eb3
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.md
@@ -0,0 +1,903 @@
+
+[Chinese doc](QFormLayout.CN.md)
+
+# class QFormLayout
+
+The QFormLayout class manages forms of input widgets and their associated labels.
+
+
+# Synopsis
+
+## Properties
+
+- [fieldGrowthPolicy](#property-fieldgrowthpolicy--qformlayoutfieldgrowthpolicy)
+
+    The way in which the form’s fields grow.
+
+- [formAlignment](#property-formalignment--combination-of-qtalignmentflag)
+
+    The alignment of the form layout’s contents within the layout’s geometry.
+
+- [horizontalSpacing](#property-horizontalspacing--int)
+
+    The spacing between widgets that are laid out side by side.
+
+- [labelAlignment](#property-labelalignment--combination-of-qtalignmentflag)
+
+    The horizontal alignment of the labels.
+
+- [rowWrapPolicy](#property-rowwrappolicy--qformlayoutrowwrappolicy)
+
+    The way in which the form’s rows wrap.
+
+- [verticalSpacing](#property-verticalspacing--int)
+
+    The spacing between widgets that are laid out vertically.
+
+
+## Methods
+
+- [def __init__()](#initparentnone)
+
+- [def addRow()](#addrowlabel-field)
+
+- [def fieldGrowthPolicy()](#fieldgrowthpolicy)
+
+- [def formAlignment()](#formalignment)
+
+- [def getItemPosition()](#getitempositionindex)
+
+- [def getLayoutPosition()](#getlayoutpositionlayout)
+
+- [def getWidgetPosition()](#getwidgetpositionwidget)
+
+- [def horizontalSpacing()](#horizontalspacing)
+
+- [def insertRow()](#insertrowrow-label-field)
+
+- [def isRowVisible()](#isrowvisiblelayout)
+
+- [def itemAt()](#itematrow-role)
+
+- [def labelAlignment()](#labelalignment)
+
+- [def labelForField()](#labelforfieldfield)
+
+- [def removeRow()](#removerowwidget)
+
+- [def rowCount()](#rowcount)
+
+- [def rowWrapPolicy()](#rowwrappolicy)
+
+- [def setFieldGrowthPolicy()](#setfieldgrowthpolicypolicy)
+
+- [def setFormAlignment()](#setformalignmentalignment)
+
+- [def setHorizontalSpacing()](#sethorizontalspacingspacing)
+
+- [def setItem()](#setitemrow-role-item)
+
+- [def setLabelAlignment()](#setlabelalignmentalignment)
+
+- [def setLayout()](#setlayoutrow-role-layout)
+
+- [def setRowVisible()](#setrowvisiblelayout-on)
+
+- [def setRowWrapPolicy()](#setrowwrappolicypolicy)
+
+- [def setVerticalSpacing()](#setverticalspacingspacing)
+
+- [def setWidget()](#setwidgetrow-role-widget)
+
+- [def takeRow()](#takerowlayout)
+
+- [def verticalSpacing()](#verticalspacing)
+
+
+# Detailed Description
+
+QFormLayout is a convenience layout class that lays out its children in a two-column form. The left column consists of labels and the right column consists of “field” widgets (line editors, spin boxes, etc.).
+
+Traditionally, such two-column form layouts were achieved using QGridLayout . QFormLayout is a higher-level alternative that provides the following advantages:
+
+- Adherence to the different platform’s look and feel guidelines.
+
+    For example, the macOS Aqua and KDE guidelines specify that the labels should be right-aligned, whereas Windows and GNOME applications normally use left-alignment.
+
+- Support for wrapping long rows.
+
+    For devices with small displays, QFormLayout can be set to wrap long rows , or even to wrap all rows .
+
+- Convenient API for creating label–field pairs.
+
+    The addRow() overload that takes a QString and a QWidget * creates a QLabel behind the scenes and automatically set up its buddy. We can then write code like this:
+
+```python
+formLayout = QFormLayout(self)
+formLayout.addRow(tr("Name:"), nameLineEdit)
+formLayout.addRow(tr("Email:"), emailLineEdit)
+formLayout.addRow(tr("Age:"), ageSpinBox)
+```
+
+Compare this with the following code, written using QGridLayout :
+
+```python
+gridLayout = QGridLayout(self)
+nameLabel = QLabel(tr("Name:"))
+nameLabel.setBuddy(nameLineEdit)
+emailLabel = QLabel(tr("Name:"))
+emailLabel.setBuddy(emailLineEdit)
+ageLabel = QLabel(tr("Name:"))
+ageLabel.setBuddy(ageSpinBox)
+gridLayout.addWidget(nameLabel, 0, 0)
+gridLayout.addWidget(nameLineEdit, 0, 1)
+gridLayout.addWidget(emailLabel, 1, 0)
+gridLayout.addWidget(emailLineEdit, 1, 1)
+gridLayout.addWidget(ageLabel, 2, 0)
+gridLayout.addWidget(ageSpinBox, 2, 1)
+```
+
+The table below shows the default appearance in different styles.
+
+The form styles can be also be overridden individually by calling setLabelAlignment() , setFormAlignment() , setFieldGrowthPolicy() , and setRowWrapPolicy() . For example, to simulate the form layout appearance of QMacStyle on all platforms, but with left-aligned labels, you could write:
+
+```python
+formLayout.setRowWrapPolicy(QFormLayout.DontWrapRows)
+formLayout.setFieldGrowthPolicy(QFormLayout.FieldsStayAtSizeHint)
+formLayout.setFormAlignment(Qt.AlignHCenter | Qt.AlignTop)
+formLayout.setLabelAlignment(Qt.AlignLeft)
+```
+
+
+--------------------------------
+## class FieldGrowthPolicy
+
+This enum specifies the different policies that can be used to control the way in which the form’s fields grow.
+
+| Constant                          | Description |
+| --------------------------------- | ----------- |
+| QFormLayout.FieldsStayAtSizeHint  | The fields never grow beyond their effective size hint . This is the default for QMacStyle. |
+| QFormLayout.ExpandingFieldsGrow   | Fields with an horizontal size policy of Expanding or MinimumExpanding will grow to fill the available space. The other fields will not grow beyond their effective size hint. This is the default policy for Plastique. |
+| QFormLayout.AllNonFixedFieldsGrow | All fields with a size policy that allows them to grow will grow to fill the available space. This is the default policy for most styles. |
+
+
+--------------------------------
+## class RowWrapPolicy
+
+This enum specifies the different policies that can be used to control the way in which the form’s rows wrap.
+
+| Constant                 | Description |
+| ------------------------ | ----------- |
+| QFormLayout.DontWrapRows | Fields are always laid out next to their label. This is the default policy for all styles except Qt Extended styles. |
+| QFormLayout.WrapLongRows | Labels are given enough horizontal space to fit the widest label, and the rest of the space is given to the fields. If the minimum size of a field pair is wider than the available space, the field is wrapped to the next line. This is the default policy for Qt Extended styles. |
+| QFormLayout.WrapAllRows  | Fields are always laid out below their label. |
+
+
+--------------------------------
+## class ItemRole
+
+This enum specifies the types of widgets (or other layout items) that may appear in a row.
+
+| Constant                 | Description     |
+| ------------------------ | --------------- |
+| QFormLayout.LabelRole    | A label widget. |
+| QFormLayout.FieldRole    | A field widget. |
+| QFormLayout.SpanningRole | A widget that spans label and field columns. |
+
+
+--------------------------------
+## property fieldGrowthPolicy : QFormLayout.FieldGrowthPolicy
+
+This property holds the way in which the form’s fields grow.
+
+The default value depends on the widget or application style. For QMacStyle, the default is FieldsStayAtSizeHint ; for QCommonStyle derived styles (like Plastique and Windows), the default is ExpandingFieldsGrow ; for Qt Extended styles, the default is AllNonFixedFieldsGrow .
+
+If none of the fields can grow and the form is resized, extra space is distributed according to the current form alignment .
+
+Access functions:
+
+- fieldGrowthPolicy()
+- setFieldGrowthPolicy()
+
+
+--------------------------------
+## property formAlignment : Combination of Qt.AlignmentFlag
+
+This property holds the alignment of the form layout’s contents within the layout’s geometry.
+
+The default value depends on the widget or application style. For QMacStyle, the default is Qt::AlignHCenter | Qt::AlignTop; for the other styles, the default is Qt::AlignLeft | Qt::AlignTop.
+
+Access functions:
+
+- formAlignment()
+- setFormAlignment()
+
+
+--------------------------------
+## property horizontalSpacing : int
+
+This property holds the spacing between widgets that are laid out side by side.
+
+By default, if no value is explicitly set, the layout’s horizontal spacing is inherited from the parent layout, or from the style settings for the parent widget.
+
+Access functions:
+
+- horizontalSpacing()
+- setHorizontalSpacing()
+
+
+--------------------------------
+## property labelAlignment : Combination of Qt.AlignmentFlag
+
+This property holds the horizontal alignment of the labels.
+
+The default value depends on the widget or application style. For QCommonStyle derived styles, except for QPlastiqueStyle, the default is Qt::AlignLeft; for the other styles, the default is Qt::AlignRight.
+
+Access functions:
+
+- labelAlignment()
+- setLabelAlignment()
+
+
+--------------------------------
+## property rowWrapPolicy : QFormLayout.RowWrapPolicy
+
+This property holds the way in which the form’s rows wrap.
+
+The default value depends on the widget or application style. For Qt Extended styles, the default is WrapLongRows ; for the other styles, the default is DontWrapRows .
+
+If you want to display each label above its associated field (instead of next to it), set this property to WrapAllRows .
+
+Access functions:
+
+- rowWrapPolicy()
+- setRowWrapPolicy()
+
+
+--------------------------------
+## property verticalSpacing : int
+
+This property holds the spacing between widgets that are laid out vertically.
+
+By default, if no value is explicitly set, the layout’s vertical spacing is inherited from the parent layout, or from the style settings for the parent widget.
+
+Access functions:
+
+- verticalSpacing()
+- setVerticalSpacing()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a new form layout with the given parent widget.
+
+The layout is set directly as the top-level layout for parent. There can be only one top-level layout for a widget. It is returned by layout() .
+
+
+--------------------------------
+## addRow(layout)
+
+Parameters:
+
+- layout – QLayout
+
+This is an overloaded function.
+
+Adds the specified layout at the end of this form layout. The layout spans both columns.
+
+
+--------------------------------
+## addRow(labelText, field)
+
+Parameters:
+
+- labelText – str
+- field – QWidget
+
+This is an overloaded function.
+
+This overload automatically creates a QLabel behind the scenes with labelText as its text. The field is set as the new QLabel ‘s buddy .
+
+
+--------------------------------
+## addRow(labelText, field)
+
+Parameters:
+
+- labelText – str
+- field – QLayout
+
+This is an overloaded function.
+
+This overload automatically creates a QLabel behind the scenes with labelText as its text.
+
+
+--------------------------------
+## addRow(label, field)
+
+Parameters:
+
+- label – QWidget
+- field – QWidget
+
+Adds a new row to the bottom of this form layout, with the given label and field.
+
+
+--------------------------------
+## addRow(label, field)
+
+Parameters:
+
+- label – QWidget
+- field – QLayout
+
+This is an overloaded function.
+
+
+--------------------------------
+## addRow(widget)
+
+Parameters:
+
+- widget – QWidget
+
+This is an overloaded function.
+
+Adds the specified widget at the end of this form layout. The widget spans both columns.
+
+
+--------------------------------
+## fieldGrowthPolicy()
+
+Return type: FieldGrowthPolicy
+
+Getter of property fieldGrowthPolicy  .
+
+
+--------------------------------
+## formAlignment()
+
+Return type: Combination of AlignmentFlag
+
+Getter of property formAlignment  .
+
+
+--------------------------------
+## getItemPosition(index)
+
+Parameters:
+
+- index – int
+
+Return type: PyObject
+
+Retrieves the row and role (column) of the item at the specified index. If index is out of bounds, *``rowPtr`` is set to -1; otherwise the row is stored in *``rowPtr`` and the role is stored in *``rolePtr``.
+
+
+--------------------------------
+## getLayoutPosition(layout)
+
+Parameters:
+
+- layout – QLayout
+
+Return type: PyObject
+
+Retrieves the row and role (column) of the specified child layout. If layout is not in the form layout, *``rowPtr`` is set to -1; otherwise the row is stored in *``rowPtr`` and the role is stored in *``rolePtr``.
+
+
+--------------------------------
+## getWidgetPosition(widget)
+
+Parameters:
+
+- widget – QWidget
+
+Return type: PyObject
+
+Retrieves the row and role (column) of the specified widget in the layout. If widget is not in the layout, *``rowPtr`` is set to -1; otherwise the row is stored in *``rowPtr`` and the role is stored in *``rolePtr``.
+
+
+--------------------------------
+## horizontalSpacing()
+
+Return type: int
+
+Getter of property horizontalSpacing  .
+
+
+--------------------------------
+## insertRow(row, label, field)
+
+Parameters:
+
+- row – int
+- label – QWidget
+- field – QLayout
+
+This is an overloaded function.
+
+
+--------------------------------
+## insertRow(row, labelText, field)
+
+Parameters:
+
+- row – int
+- labelText – str
+- field – QWidget
+
+This is an overloaded function.
+
+This overload automatically creates a QLabel behind the scenes with labelText as its text. The field is set as the new QLabel ‘s buddy .
+
+
+--------------------------------
+## insertRow(row, labelText, field)
+
+Parameters:
+
+- row – int
+- labelText – str
+- field – QLayout
+
+This is an overloaded function.
+
+This overload automatically creates a QLabel behind the scenes with labelText as its text.
+
+
+--------------------------------
+## insertRow(row, widget)
+
+Parameters:
+
+- row – int
+- widget – QWidget
+
+This is an overloaded function.
+
+Inserts the specified widget at position row in this form layout. The widget spans both columns. If row is out of bounds, the widget is added at the end.
+
+
+--------------------------------
+## insertRow(row, label, field)
+
+Parameters:
+
+- row – int
+- label – QWidget
+- field – QWidget
+
+Inserts a new row at position row in this form layout, with the given label and field. If row is out of bounds, the new row is added at the end.
+
+
+--------------------------------
+## insertRow(row, layout)
+
+Parameters:
+
+- row – int
+- layout – QLayout
+
+This is an overloaded function.
+
+Inserts the specified layout at position row in this form layout. The layout spans both columns. If row is out of bounds, the widget is added at the end.
+
+
+--------------------------------
+## isRowVisible(layout)
+
+Parameters:
+
+- layout – QLayout
+
+Return type: bool
+
+This is an overloaded function.
+
+Returns true if some items in the row corresponding to layout are visible, otherwise returns false.
+
+
+--------------------------------
+## isRowVisible(widget)
+
+Parameters:
+
+- widget – QWidget
+
+Return type: bool
+
+This is an overloaded function.
+
+Returns true if some items in the row corresponding to widget are visible, otherwise returns false.
+
+
+--------------------------------
+## isRowVisible(row)
+
+Parameters:
+
+- row – int
+
+Return type: bool
+
+Returns true if some items in the row row are visible, otherwise returns false.
+
+
+--------------------------------
+## itemAt(row, role)
+
+Parameters:
+
+- row – int
+- role – ItemRole
+
+Return type: QLayoutItem
+
+Returns the layout item in the given row with the specified role (column). Returns None if there is no such item.
+
+
+--------------------------------
+## labelAlignment()
+
+Return type: Combination of AlignmentFlag
+
+Getter of property labelAlignment  .
+
+
+--------------------------------
+## labelForField(field)
+
+Parameters:
+
+- field – QWidget
+
+Return type: QWidget
+
+Returns the label associated with the given field.
+
+
+--------------------------------
+## labelForField(field)
+
+Parameters:
+
+- field – QLayout
+
+Return type: QWidget
+
+This is an overloaded function.
+
+
+--------------------------------
+## removeRow(layout)
+
+Parameters:
+
+- layout – QLayout
+
+This is an overloaded function.
+
+Deletes the row corresponding to layout from this form layout.
+
+After this call, rowCount() is decremented by one. All widgets and nested layouts that occupied this row are deleted. That includes both the field widget(s) and the label, if any. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+You can use this function to undo a previous addRow() or insertRow() :
+
+```python
+flay = ...
+vbl = QVBoxLayout()
+flay.insertRow(2, "User:", vbl)
+# later:
+flay.removeRow(layout) # vbl == None at this point
+```
+
+If you want to remove the row from the form layout without deleting the inserted layout, use takeRow() instead.
+
+
+--------------------------------
+## removeRow(widget)
+
+Parameters:
+
+- widget – QWidget
+
+This is an overloaded function.
+
+Deletes the row corresponding to widget from this form layout.
+
+After this call, rowCount() is decremented by one. All widgets and nested layouts that occupied this row are deleted. That includes both the field widget(s) and the label, if any. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+You can use this function to undo a previous addRow() or insertRow() :
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+flay.removeRow(le) # le == None at this point
+```
+
+If you want to remove the row from the layout without deleting the widgets, use takeRow() instead.
+
+
+--------------------------------
+## removeRow(row)
+
+Parameters:
+
+- row – int
+
+Deletes row row from this form layout.
+
+row must be non-negative and less than rowCount() .
+
+After this call, rowCount() is decremented by one. All widgets and nested layouts that occupied this row are deleted. That includes both the field widget(s) and the label, if any. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+You can use this function to undo a previous addRow() or insertRow() :
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+flay.removeRow(2) # le == None at this point
+```
+
+If you want to remove the row from the layout without deleting the widgets, use takeRow() instead.
+
+
+--------------------------------
+## rowCount()
+
+Return type: int
+
+Returns the number of rows in the form.
+
+
+--------------------------------
+## rowWrapPolicy()
+
+Return type: RowWrapPolicy
+
+Getter of property rowWrapPolicy  .
+
+
+--------------------------------
+## setFieldGrowthPolicy(policy)
+
+Parameters:
+
+- policy – FieldGrowthPolicy
+
+Setter of property fieldGrowthPolicy  .
+
+
+--------------------------------
+## setFormAlignment(alignment)
+
+Parameters:
+
+- alignment – Combination of AlignmentFlag
+
+Setter of property formAlignment  .
+
+
+--------------------------------
+## setHorizontalSpacing(spacing)
+
+Parameters:
+
+- spacing – int
+
+Setter of property horizontalSpacing  .
+
+
+--------------------------------
+## setItem(row, role, item)
+
+Parameters:
+
+- row – int
+- role – ItemRole
+- item – QLayoutItem
+
+Sets the item in the given row for the given role to item, extending the layout with empty rows if necessary.
+
+If the cell is already occupied, the item is not inserted and an error message is sent to the console. The item spans both columns.
+
+
+--------------------------------
+## setLabelAlignment(alignment)
+
+Parameters:
+
+- alignment – Combination of AlignmentFlag
+
+Setter of property labelAlignment  .
+
+
+--------------------------------
+## setLayout(row, role, layout)
+
+Parameters:
+
+- row – int
+- role – ItemRole
+- layout – QLayout
+
+Sets the sub-layout in the given row for the given role to layout, extending the form layout with empty rows if necessary.
+
+If the cell is already occupied, the layout is not inserted and an error message is sent to the console.
+
+
+--------------------------------
+## setRowVisible(layout, on)
+
+Parameters:
+
+- layout – QLayout
+- on – bool
+
+This is an overloaded function.
+
+Shows the row corresponding to layout if on is true, otherwise hides the row.
+
+
+--------------------------------
+## setRowVisible(widget, on)
+
+Parameters:
+
+- widget – QWidget
+- on – bool
+
+This is an overloaded function.
+
+Shows the row corresponding to widget if on is true, otherwise hides the row.
+
+
+--------------------------------
+## setRowVisible(row, on)
+
+Parameters:
+
+- row – int
+- on – bool
+
+Shows the row row if on is true, otherwise hides the row.
+
+row must be non-negative and less than rowCount() .
+
+
+--------------------------------
+## setRowWrapPolicy(policy)
+
+Parameters:
+
+- policy – RowWrapPolicy
+
+Setter of property rowWrapPolicy  .
+
+
+--------------------------------
+## setVerticalSpacing(spacing)
+
+Parameters:
+
+- spacing – int
+
+Setter of property verticalSpacing  .
+
+
+--------------------------------
+## setWidget(row, role, widget)
+
+Parameters:
+
+- row – int
+- role – ItemRole
+- widget – QWidget
+
+Sets the widget in the given row for the given role to widget, extending the layout with empty rows if necessary.
+
+If the cell is already occupied, the widget is not inserted and an error message is sent to the console.
+
+
+--------------------------------
+## takeRow(layout)
+
+Parameters:
+
+- layout – QLayout
+
+Return type: TakeRowResult
+
+This is an overloaded function.
+
+Removes the specified layout from this form layout.
+
+After this call, rowCount() is decremented by one. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+```python
+flay = ...
+vbl = QVBoxLayout()
+flay.insertRow(2, "User:", vbl)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(widget)
+```
+
+If you want to remove the row from the form layout and delete the inserted layout, use removeRow() instead.
+
+Returns A structure containing both the widget and corresponding label layout items
+
+
+--------------------------------
+## takeRow(widget)
+
+Parameters:
+
+- widget – QWidget
+
+Return type: TakeRowResult
+
+This is an overloaded function.
+
+Removes the specified widget from this form layout.
+
+After this call, rowCount() is decremented by one. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(widget)
+```
+
+If you want to remove the row from the layout and delete the widgets, use removeRow() instead.
+
+Returns A structure containing both the widget and corresponding label layout items
+
+
+--------------------------------
+## takeRow(row)
+
+Parameters:
+
+- row – int
+
+Return type: TakeRowResult
+
+Removes the specified row from this form layout.
+
+row must be non-negative and less than rowCount() .
+
+After this call, rowCount() is decremented by one. All following rows are shifted up one row and the freed vertical space is redistributed amongst the remaining rows.
+
+You can use this function to undo a previous addRow() or insertRow() :
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(2)
+```
+
+If you want to remove the row from the layout and delete the widgets, use removeRow() instead.
+
+Returns A structure containing both the widget and corresponding label layout items
+
+
+--------------------------------
+## verticalSpacing()
+
+Return type: int
+
+Getter of property verticalSpacing  .
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.CN.md
new file mode 100644
index 0000000..881d1ad
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.CN.md
@@ -0,0 +1,399 @@
+
+[English doc](QGridLayout.md)
+
+# class QGridLayout
+
+QGridLayout 类在网格中布置小部件。
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addItem()](#additemitem-row-column-rowspan1-columnspan1-alignmentqtalignment)
+
+- [def addLayout()](#addlayoutarg__1-row-column-alignmentqtalignment)
+
+- [def addWidget()](#addwidgetarg__1-row-column-alignmentqtalignment)
+
+- [def cellRect()](#cellrectrow-column)
+
+- [def columnCount()](#columncount)
+
+- [def columnMinimumWidth()](#columnminimumwidthcolumn)
+
+- [def columnStretch()](#columnstretchcolumn)
+
+- [def getItemPosition()](#getitempositionidx)
+
+- [def horizontalSpacing()](#horizontalspacing)
+
+- [def itemAtPosition()](#itematpositionrow-column)
+
+- [def originCorner()](#origincorner)
+
+- [def rowCount()](#rowcount)
+
+- [def rowMinimumHeight()](#rowminimumheightrow)
+
+- [def rowStretch()](#rowstretchrow)
+
+- [def setColumnMinimumWidth()](#setcolumnminimumwidthcolumn-minsize)
+
+- [def setColumnStretch()](#setcolumnstretchcolumn-stretch)
+
+- [def setDefaultPositioning()](#setdefaultpositioningn-orient)
+
+- [def setHorizontalSpacing()](#sethorizontalspacingspacing)
+
+- [def setOriginCorner()](#setorigincornerarg__1)
+
+- [def setRowMinimumHeight()](#setrowminimumheightrow-minsize)
+
+- [def setRowStretch()](#setrowstretchrow-stretch)
+
+- [def setVerticalSpacing()](#setverticalspacingspacing)
+
+- [def verticalSpacing()](#verticalspacing)
+
+
+# Detailed Description
+
+QGridLayout 占用提供给它的空间（由其父布局或 parentWidget() 提供），将其划分为行和列，并将其管理的每个小部件放入正确的单元格中。
+
+列和行的行为相同；我们将讨论列，但行也有等效函数。
+
+每列都有一个最小宽度和一个拉伸因子。最小宽度是使用 setColumnMinimumWidth() 设置的最小宽度和该列中每个小部件的最小宽度中的最大值。拉伸因子使用 setColumnStretch() 设置，并确定列将获得多少可用空间超过其必要的最小值。
+
+通常，每个管理的小部件或布局都使用 addWidget() 放入自己的单元格中。小部件也可以使用 addItem() 和 addWidget() 的行和列跨越重载来占据多个单元格。如果这样做，QGridLayout 将猜测如何在列/行上分配大小（基于拉伸因子）。
+
+要从布局中删除小部件，请调用 removeWidget() 。在小部件上调用 hide() 也会有效地从布局中移除小部件，直到调用 show()。
+
+此图显示了一个对话框片段，其中包含一个五列、三行网格（网格以洋红色显示）：
+
+此对话框片段中的第 0、2 和 4 列由 QLabel、QLineEdit 和 QListBox 组成。第 1 列和第 3 列是使用 setColumnMinimumWidth() 创建的占位符。第 0 行包含三个 QLabel 对象，第 1 行包含三个 QLineEdit 对象，第 2 行包含三个 QListBox 对象。我们使用占位符列（1 和 3）来获得列之间正确的空间量。
+
+请注意，列和行的宽度和高度并不相同。如果您希望两列具有相同的宽度，则必须自行将其最小宽度和拉伸因子设置为相同。您可以使用 setColumnMinimumWidth() 和 setColumnStretch() 执行此操作。
+
+如果 QGridLayout 不是顶层布局（即不管理所有小部件的区域和子项），则必须在创建它时将其添加到其父布局中，但在对其进行任何操作之前。添加布局的正常方法是在父布局上调用 addLayout()。
+
+添加布局后，您可以使用 addWidget() 、 addItem() 和 addLayout() 将小部件和其他布局放入网格布局的单元格中。
+
+QGridLayout 还包括两个边距宽度：内容边距和间距()。内容边距是 QGridLayout 四边的保留空间的宽度。间距() 是相邻框之间自动分配的间距的宽度。
+
+默认内容边距值由 style 提供。Qt 样式指定的默认值为子小部件的 9 和窗口的 11。间距默认与顶层布局的边距宽度相同，或与父布局相同。
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用父窗口小部件 parent 构造一个新的 QGridLayout。布局最初有一行和一列，插入新项目时会扩展。
+
+布局直接设置为父级的顶级布局。窗口小部件只能有一个顶级布局。它由 layout() 返回。
+
+如果 parent 为 None，则必须将此网格布局插入另一个布局，或使用 setLayout() 将其设置为窗口小部件的布局。
+
+
+--------------------------------
+## addItem(item, row, column[, rowSpan=1[, columnSpan=1[, alignment=Qt.Alignment()]]])
+
+参数：
+
+- item – QLayoutItem
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+在 row、column 位置添加项目，跨越 rowSpan 行和 columnSpan 列，并根据对齐方式对其进行对齐。如果 rowSpan 和/或 columnSpan 为 -1，则项目将分别延伸到底部和/或右边缘。布局拥有该项目的所有权。
+
+
+--------------------------------
+## addLayout(arg__1, row, column[, alignment=Qt.Alignment()])
+
+参数：
+
+- arg__1 – QLayout
+- row – int
+- column – int
+- alignment – Combination of AlignmentFlag
+
+将布局放置在网格中的 (row, column) 位置。左上角位置为 (0, 0)。
+
+对齐由 alignment 指定。默认对齐为 0，这意味着小部件填充整个单元格。
+
+非零对齐表示布局不应增长以填充可用空间，而应根据 sizeHint() 调整大小。
+
+布局成为网格布局的子项。
+
+
+--------------------------------
+## addLayout(arg__1, row, column, rowSpan, columnSpan[, alignment=Qt.Alignment()])
+
+参数：
+
+- arg__1 – QLayout
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+这是一个重载函数。
+
+此版本将布局添加到单元格网格，跨越多行/列。单元格将从行开始，列跨越 rowSpan 行和 columnSpan 列。
+
+如果 rowSpan 和/或 columnSpan 为 -1，则布局将分别延伸到底部和/或右边缘。
+
+--------------------------------
+## addWidget(arg__1, row, column[, alignment=Qt.Alignment()])
+
+参数：
+
+- arg__1 – QWidget
+- row – int
+- column – int
+- alignment – Combination of AlignmentFlag
+
+将给定的小部件添加到单元格网格的行、列处。默认情况下，左上角位置为 (0, 0)。
+
+对齐方式由对齐方式指定。默认对齐方式为 0，这意味着小部件填充整个单元格。
+
+
+--------------------------------
+## addWidget(arg__1, row, column, rowSpan, columnSpan[, alignment=Qt.Alignment()])
+
+参数：
+
+- arg__1 – QWidget
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+这是一个重载函数。
+
+此版本将给定的小部件添加到单元格网格，跨越多行/列。单元格将从 fromRow、fromColumn 开始，跨越 rowSpan 行和 columnSpan 列。小部件将具有给定的对齐方式。
+
+如果 rowSpan 和/或 columnSpan 为 -1，则小部件将分别延伸到底部和/或右侧边缘。
+
+
+--------------------------------
+## cellRect(row, column)
+
+参数：
+
+- row – int
+- column – int
+
+返回类型：QRect
+
+返回网格中行 row 和列 column 单元格的几何形状。如果行或列超出网格范围，则返回无效矩形。
+
+
+--------------------------------
+## columnCount()
+
+返回类型：int
+
+返回此网格中的列数。
+
+
+--------------------------------
+## columnMinimumWidth(column)
+
+参数：
+
+- column – int
+
+返回类型：int
+
+返回列的列间距。
+
+
+--------------------------------
+## columnStretch(column)
+
+参数：
+
+- column – int
+
+返回类型：int
+
+返回列的拉伸因子。
+
+
+--------------------------------
+## getItemPosition(idx)
+
+参数：
+
+- idx – int
+
+返回类型：PyObject*
+
+返回具有给定索引的项目的位置信息。
+
+作为行和列传递的变量将使用布局中项目的位置进行更新，rowSpan 和 columnSpan 变量将使用项目的垂直和水平跨度进行更新。
+
+
+--------------------------------
+## horizontalSpacing()
+
+返回类型：int
+
+
+--------------------------------
+## itemAtPosition(row, column)
+
+参数：
+
+- row – int
+- column – int
+
+返回类型：QLayoutItem
+
+返回占据单元格（行、列）的布局项，如果单元格为空，则返回 None。
+
+
+--------------------------------
+## originCorner()
+
+返回类型：Corner
+
+返回用于网格原点的角，即位置 (0, 0)。
+
+
+--------------------------------
+## rowCount()
+
+返回类型：int
+
+返回此网格中的行数。
+
+
+--------------------------------
+## rowMinimumHeight(row)
+
+参数：
+
+- row – int
+
+返回类型：int
+
+返回为行设置的最小宽度。
+
+
+--------------------------------
+## rowStretch(row)
+
+参数：
+
+- row – int
+
+返回类型：int
+
+返回行 row 的拉伸因子。
+
+
+--------------------------------
+## setColumnMinimumWidth(column, minSize)
+
+参数：
+
+- column – int
+- minSize – int
+
+将列的最小宽度设置为 minSize 像素。
+
+
+--------------------------------
+## setColumnStretch(column, stretch)
+
+参数：
+
+- column – int
+- stretch – int
+
+将列的拉伸因子设置为拉伸。第一列为数字 0。
+
+拉伸因子与此网格中的其他列相关。拉伸因子较高的列占用更多可用空间。
+
+默认拉伸因子为 0。如果拉伸因子为 0，并且此表中的其他列都无法增长，则该列仍可能增长。
+
+另一种方法是使用带有 QSpacerItem 的 addItem() 添加间距。
+
+
+--------------------------------
+## setDefaultPositioning(n, orient)
+
+参数：
+
+- n – int
+- orient – Orientation
+
+
+--------------------------------
+## setHorizontalSpacing(spacing)
+
+参数：
+
+- spacing – int
+
+
+--------------------------------
+## setOriginCorner(arg__1)
+
+参数：
+
+- arg__1 – Corner
+
+将网格的原点角（即位置 (0, 0)）设置为角。
+
+
+--------------------------------
+## setRowMinimumHeight(row, minSize)
+
+参数：
+
+- row – int
+- minSize – int
+
+将行的最小高度设置为 minSize 像素。
+
+
+--------------------------------
+## setRowStretch(row, stretch)
+
+参数：
+
+- row – int
+- stretch – int
+
+将行的拉伸因子设置为拉伸。第一行是数字 0。
+
+拉伸因子是相对于此网格中的其他行。拉伸因子越高的行占用的可用空间越多。
+
+默认拉伸因子为 0。如果拉伸因子为 0，并且此表中的其他行都无法增长，则该行仍可能增长。
+
+
+--------------------------------
+## setVerticalSpacing(spacing)
+
+参数：
+
+- spacing – int
+
+
+--------------------------------
+## verticalSpacing()
+
+返回类型：int
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.md b/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.md
new file mode 100644
index 0000000..c7f0b9d
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QGridLayout.md
@@ -0,0 +1,399 @@
+
+[Chinese doc](QGridLayout.CN.md)
+
+# class QGridLayout
+
+The QGridLayout class lays out widgets in a grid.
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addItem()](#additemitem-row-column-rowspan1-columnspan1-alignmentqtalignment)
+
+- [def addLayout()](#addlayoutarg__1-row-column-alignmentqtalignment)
+
+- [def addWidget()](#addwidgetarg__1-row-column-alignmentqtalignment)
+
+- [def cellRect()](#cellrectrow-column)
+
+- [def columnCount()](#columncount)
+
+- [def columnMinimumWidth()](#columnminimumwidthcolumn)
+
+- [def columnStretch()](#columnstretchcolumn)
+
+- [def getItemPosition()](#getitempositionidx)
+
+- [def horizontalSpacing()](#horizontalspacing)
+
+- [def itemAtPosition()](#itematpositionrow-column)
+
+- [def originCorner()](#origincorner)
+
+- [def rowCount()](#rowcount)
+
+- [def rowMinimumHeight()](#rowminimumheightrow)
+
+- [def rowStretch()](#rowstretchrow)
+
+- [def setColumnMinimumWidth()](#setcolumnminimumwidthcolumn-minsize)
+
+- [def setColumnStretch()](#setcolumnstretchcolumn-stretch)
+
+- [def setDefaultPositioning()](#setdefaultpositioningn-orient)
+
+- [def setHorizontalSpacing()](#sethorizontalspacingspacing)
+
+- [def setOriginCorner()](#setorigincornerarg__1)
+
+- [def setRowMinimumHeight()](#setrowminimumheightrow-minsize)
+
+- [def setRowStretch()](#setrowstretchrow-stretch)
+
+- [def setVerticalSpacing()](#setverticalspacingspacing)
+
+- [def verticalSpacing()](#verticalspacing)
+
+
+# Detailed Description
+
+QGridLayout takes the space made available to it (by its parent layout or by the parentWidget() ), divides it up into rows and columns, and puts each widget it manages into the correct cell.
+
+Columns and rows behave identically; we will discuss columns, but there are equivalent functions for rows.
+
+Each column has a minimum width and a stretch factor. The minimum width is the greatest of that set using setColumnMinimumWidth() and the minimum width of each widget in that column. The stretch factor is set using setColumnStretch() and determines how much of the available space the column will get over and above its necessary minimum.
+
+Normally, each managed widget or layout is put into a cell of its own using addWidget() . It is also possible for a widget to occupy multiple cells using the row and column spanning overloads of addItem() and addWidget() . If you do this, QGridLayout will guess how to distribute the size over the columns/rows (based on the stretch factors).
+
+To remove a widget from a layout, call removeWidget() . Calling hide() on a widget also effectively removes the widget from the layout until show() is called.
+
+This illustration shows a fragment of a dialog with a five-column, three-row grid (the grid is shown overlaid in magenta):
+
+Columns 0, 2 and 4 in this dialog fragment are made up of a QLabel , a QLineEdit , and a QListBox. Columns 1 and 3 are placeholders made with setColumnMinimumWidth() . Row 0 consists of three QLabel objects, row 1 of three QLineEdit objects and row 2 of three QListBox objects. We used placeholder columns (1 and 3) to get the right amount of space between the columns.
+
+Note that the columns and rows are not equally wide or tall. If you want two columns to have the same width, you must set their minimum widths and stretch factors to be the same yourself. You do this using setColumnMinimumWidth() and setColumnStretch() .
+
+If the QGridLayout is not the top-level layout (i.e. does not manage all of the widget’s area and children), you must add it to its parent layout when you create it, but before you do anything with it. The normal way to add a layout is by calling addLayout() on the parent layout.
+
+Once you have added your layout you can start putting widgets and other layouts into the cells of your grid layout using addWidget() , addItem() , and addLayout() .
+
+QGridLayout also includes two margin widths: the contents margin and the spacing() . The contents margin is the width of the reserved space along each of the QGridLayout ‘s four sides. The spacing() is the width of the automatically allocated spacing between neighboring boxes.
+
+The default contents margin values are provided by the style . The default value Qt styles specify is 9 for child widgets and 11 for windows. The spacing defaults to the same as the margin width for a top-level layout, or to the same as the parent layout.
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a new QGridLayout with parent widget, parent. The layout has one row and one column initially, and will expand when new items are inserted.
+
+The layout is set directly as the top-level layout for parent. There can be only one top-level layout for a widget. It is returned by layout() .
+
+If parent is None, then you must insert this grid layout into another layout, or set it as a widget’s layout using setLayout() .
+
+
+--------------------------------
+## addItem(item, row, column[, rowSpan=1[, columnSpan=1[, alignment=Qt.Alignment()]]])
+
+Parameters:
+
+- item – QLayoutItem
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.
+
+
+--------------------------------
+## addLayout(arg__1, row, column[, alignment=Qt.Alignment()])
+
+Parameters:
+
+- arg__1 – QLayout
+- row – int
+- column – int
+- alignment – Combination of AlignmentFlag
+
+Places the layout at position (row, column) in the grid. The top-left position is (0, 0).
+
+The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.
+
+A non-zero alignment indicates that the layout should not grow to fill the available space but should be sized according to sizeHint() .
+
+layout becomes a child of the grid layout.
+
+
+--------------------------------
+## addLayout(arg__1, row, column, rowSpan, columnSpan[, alignment=Qt.Alignment()])
+
+Parameters:
+
+- arg__1 – QLayout
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+This is an overloaded function.
+
+This version adds the layout layout to the cell grid, spanning multiple rows/columns. The cell will start at row, column spanning rowSpan rows and columnSpan columns.
+
+If rowSpan and/or columnSpan is -1, then the layout will extend to the bottom and/or right edge, respectively.
+
+--------------------------------
+## addWidget(arg__1, row, column[, alignment=Qt.Alignment()])
+
+Parameters:
+
+- arg__1 – QWidget
+- row – int
+- column – int
+- alignment – Combination of AlignmentFlag
+
+Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.
+
+The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.
+
+
+--------------------------------
+## addWidget(arg__1, row, column, rowSpan, columnSpan[, alignment=Qt.Alignment()])
+
+Parameters:
+
+- arg__1 – QWidget
+- row – int
+- column – int
+- rowSpan – int
+- columnSpan – int
+- alignment – Combination of AlignmentFlag
+
+This is an overloaded function.
+
+This version adds the given widget to the cell grid, spanning multiple rows/columns. The cell will start at fromRow, fromColumn spanning rowSpan rows and columnSpan columns. The widget will have the given alignment.
+
+If rowSpan and/or columnSpan is -1, then the widget will extend to the bottom and/or right edge, respectively.
+
+
+--------------------------------
+## cellRect(row, column)
+
+Parameters:
+
+- row – int
+- column – int
+
+Return type: QRect
+
+Returns the geometry of the cell with row row and column column in the grid. Returns an invalid rectangle if row or column is outside the grid.
+
+
+--------------------------------
+## columnCount()
+
+Return type: int
+
+Returns the number of columns in this grid.
+
+
+--------------------------------
+## columnMinimumWidth(column)
+
+Parameters:
+
+- column – int
+
+Return type: int
+
+Returns the column spacing for column column.
+
+
+--------------------------------
+## columnStretch(column)
+
+Parameters:
+
+- column – int
+
+Return type: int
+
+Returns the stretch factor for column column.
+
+
+--------------------------------
+## getItemPosition(idx)
+
+Parameters:
+
+- idx – int
+
+Return type: PyObject*
+
+Returns the position information of the item with the given index.
+
+The variables passed as row and column are updated with the position of the item in the layout, and the rowSpan and columnSpan variables are updated with the vertical and horizontal spans of the item.
+
+
+--------------------------------
+## horizontalSpacing()
+
+Return type: int
+
+
+--------------------------------
+## itemAtPosition(row, column)
+
+Parameters:
+
+- row – int
+- column – int
+
+Return type: QLayoutItem
+
+Returns the layout item that occupies cell (row, column), or None if the cell is empty.
+
+
+--------------------------------
+## originCorner()
+
+Return type: Corner
+
+Returns the corner that’s used for the grid’s origin, i.e. for position (0, 0).
+
+
+--------------------------------
+## rowCount()
+
+Return type: int
+
+Returns the number of rows in this grid.
+
+
+--------------------------------
+## rowMinimumHeight(row)
+
+Parameters:
+
+- row – int
+
+Return type: int
+
+Returns the minimum width set for row row.
+
+
+--------------------------------
+## rowStretch(row)
+
+Parameters:
+
+- row – int
+
+Return type: int
+
+Returns the stretch factor for row row.
+
+
+--------------------------------
+## setColumnMinimumWidth(column, minSize)
+
+Parameters:
+
+- column – int
+- minSize – int
+
+Sets the minimum width of column column to minSize pixels.
+
+
+--------------------------------
+## setColumnStretch(column, stretch)
+
+Parameters:
+
+- column – int
+- stretch – int
+
+Sets the stretch factor of column column to stretch. The first column is number 0.
+
+The stretch factor is relative to the other columns in this grid. Columns with a higher stretch factor take more of the available space.
+
+The default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow.
+
+An alternative approach is to add spacing using addItem() with a QSpacerItem .
+
+
+--------------------------------
+## setDefaultPositioning(n, orient)
+
+Parameters:
+
+- n – int
+- orient – Orientation
+
+
+--------------------------------
+## setHorizontalSpacing(spacing)
+
+Parameters:
+
+- spacing – int
+
+
+--------------------------------
+## setOriginCorner(arg__1)
+
+Parameters:
+
+- arg__1 – Corner
+
+Sets the grid’s origin corner, i.e. position (0, 0), to corner.
+
+
+--------------------------------
+## setRowMinimumHeight(row, minSize)
+
+Parameters:
+
+- row – int
+- minSize – int
+
+Sets the minimum height of row row to minSize pixels.
+
+
+--------------------------------
+## setRowStretch(row, stretch)
+
+Parameters:
+
+- row – int
+- stretch – int
+
+Sets the stretch factor of row row to stretch. The first row is number 0.
+
+The stretch factor is relative to the other rows in this grid. Rows with a higher stretch factor take more of the available space.
+
+The default stretch factor is 0. If the stretch factor is 0 and no other row in this table can grow at all, the row may still grow.
+
+
+--------------------------------
+## setVerticalSpacing(spacing)
+
+Parameters:
+
+- spacing – int
+
+
+--------------------------------
+## verticalSpacing()
+
+Return type: int
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.CN.md
new file mode 100644
index 0000000..8b8cfb4
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.CN.md
@@ -0,0 +1,58 @@
+
+[English doc](QHBoxLayout.md)
+
+# class QHBoxLayout
+
+QHBoxLayout 类水平排列小部件。
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#init)
+
+## Detailed Description
+
+此类用于构造水平框布局对象。详情请参阅 QBoxLayout。
+
+该类的最简单用法如下：
+
+```python
+window = QWidget()
+button1 = QPushButton("One")
+button2 = QPushButton("Two")
+button3 = QPushButton("Three")
+button4 = QPushButton("Four")
+button5 = QPushButton("Five")
+
+layout = QHBoxLayout(window)
+layout.addWidget(button1)
+layout.addWidget(button2)
+layout.addWidget(button3)
+layout.addWidget(button4)
+layout.addWidget(button5)
+window.show()
+```
+
+首先，我们创建要添加到布局中的小部件。然后，我们创建 QHBoxLayout 对象，并通过在构造函数中传递它来将窗口设置为父级；接下来，我们将小部件添加到布局中。窗口将是添加到布局中的小部件的父级。
+
+如果您没有将父窗口传递给构造函数，您可以在稍后使用 setLayout() 将 QHBoxLayout 对象安装到窗口上。此时，布局中的小部件将重新设置为以窗口为父级。
+
+
+--------------------------------
+## __init__()
+
+构造一个新的水平框。您必须将其添加到另一个布局中。
+
+
+--------------------------------
+## __init__(parent)
+
+参数:
+
+- parent – QWidget
+
+构造一个带有父级 parent 的新顶层水平框。
+
+布局直接设置为 parent 的顶层布局。每个小部件只能有一个顶层布局。它由 layout() 返回。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.md b/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.md
new file mode 100644
index 0000000..6cf4a74
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QHBoxLayout.md
@@ -0,0 +1,58 @@
+
+[Chinese doc](QHBoxLayout.CN.md)
+
+# class QHBoxLayout
+
+The QHBoxLayout class lines up widgets horizontally.
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#init)
+
+## Detailed Description
+
+This class is used to construct horizontal box layout objects. See QBoxLayout for details.
+
+The simplest use of the class is like this:
+
+```python
+window = QWidget()
+button1 = QPushButton("One")
+button2 = QPushButton("Two")
+button3 = QPushButton("Three")
+button4 = QPushButton("Four")
+button5 = QPushButton("Five")
+
+layout = QHBoxLayout(window)
+layout.addWidget(button1)
+layout.addWidget(button2)
+layout.addWidget(button3)
+layout.addWidget(button4)
+layout.addWidget(button5)
+window.show()
+```
+
+First, we create the widgets we want to add to the layout. Then, we create the QHBoxLayout object, setting window as parent by passing it in the constructor; next we add the widgets to the layout. window will be the parent of the widgets that are added to the layout.
+
+If you don’t pass a parent window to the constructor, you can at a later point use setLayout() to install the QHBoxLayout object onto window. At that point, the widgets in the layout are reparented to have window as their parent.
+
+
+--------------------------------
+## __init__()
+
+Constructs a new horizontal box. You must add it to another layout.
+
+
+--------------------------------
+## __init__(parent)
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a new top-level horizontal box with parent parent.
+
+The layout is set directly as the top-level layout for parent. There can be only one top-level layout for a widget. It is returned by layout() .
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.CN.md
new file mode 100644
index 0000000..802c5db
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.CN.md
@@ -0,0 +1,59 @@
+
+[English doc](QVBoxLayout.md)
+
+# class QVBoxLayout
+
+QVBoxLayout 类垂直排列小部件。
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#init)
+
+
+## Detailed Description
+
+此类用于构造垂直框布局对象。详情请参阅 QBoxLayout。
+
+该类的最简单用法如下：
+
+```python
+window = QWidget()
+button1 = QPushButton("One")
+button2 = QPushButton("Two")
+button3 = QPushButton("Three")
+button4 = QPushButton("Four")
+button5 = QPushButton("Five")
+
+layout = QVBoxLayout(window)
+layout.addWidget(button1)
+layout.addWidget(button2)
+layout.addWidget(button3)
+layout.addWidget(button4)
+layout.addWidget(button5)
+window.show()
+```
+
+首先，我们创建要添加到布局中的小部件。然后，我们创建 QVBoxLayout 对象，并通过在构造函数中传递它来将窗口设置为父级；接下来，我们将小部件添加到布局中。窗口将是添加到布局中的小部件的父级。
+
+如果您没有将父窗口传递给构造函数，您可以在稍后使用 setLayout() 将 QVBoxLayout 对象安装到窗口上。此时，布局中的小部件将重新设置为以窗口为父级。
+
+
+--------------------------------
+## __init__()
+
+构造一个新的垂直框。您必须将其添加到另一个布局中。
+
+
+--------------------------------
+## __init__(parent)
+
+参数:
+
+- parent – QWidget
+
+构造一个新的顶层垂直框，其父级为 parent。
+
+布局直接设置为 parent 的顶层布局。每个小部件只能有一个顶层布局。它由 layout() 返回。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.md b/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.md
new file mode 100644
index 0000000..79b10eb
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QVBoxLayout.md
@@ -0,0 +1,59 @@
+
+[Chinese doc](QVBoxLayout.CN.md)
+
+# class QVBoxLayout
+
+The QVBoxLayout class lines up widgets vertically.
+
+
+# Synopsis
+
+## Methods
+
+- [def \_\_init__()](#init)
+
+
+## Detailed Description
+
+This class is used to construct vertical box layout objects. See QBoxLayout for details.
+
+The simplest use of the class is like this:
+
+```python
+window = QWidget()
+button1 = QPushButton("One")
+button2 = QPushButton("Two")
+button3 = QPushButton("Three")
+button4 = QPushButton("Four")
+button5 = QPushButton("Five")
+
+layout = QVBoxLayout(window)
+layout.addWidget(button1)
+layout.addWidget(button2)
+layout.addWidget(button3)
+layout.addWidget(button4)
+layout.addWidget(button5)
+window.show()
+```
+
+First, we create the widgets we want to add to the layout. Then, we create the QVBoxLayout object, setting window as parent by passing it in the constructor; next we add the widgets to the layout. window will be the parent of the widgets that are added to the layout.
+
+If you don’t pass a parent window to the constructor, you can at a later point use setLayout() to install the QVBoxLayout object onto window. At that point, the widgets in the layout are reparented to have window as their parent.
+
+
+--------------------------------
+## __init__()
+
+Constructs a new vertical box. You must add it to another layout.
+
+
+--------------------------------
+## __init__(parent)
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a new top-level vertical box with parent parent.
+
+The layout is set directly as the top-level layout for parent. There can be only one top-level layout for a widget. It is returned by layout() .

From 267345a1255f801907b8017eb00bd554d04f05ff Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 6 Aug 2024 11:20:59 +0800
Subject: [PATCH 27/38] [PyQt] Add form layout doc.

---
 .../PyQt6/Class-0/QtWidget/QFormLayout.CN.md  | 903 ++++++++++++++++++
 1 file changed, 903 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QFormLayout.CN.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.CN.md
new file mode 100644
index 0000000..91c82ff
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QFormLayout.CN.md
@@ -0,0 +1,903 @@
+
+[English doc](QFormLayout.md)
+
+# class QFormLayout
+
+QFormLayout 类管理输入小部件的形式及其相关标签。
+
+
+# Synopsis
+
+## Properties
+
+- [fieldGrowthPolicy](#property-fieldgrowthpolicy--qformlayoutfieldgrowthpolicy)
+
+    表单字段的增长方式。
+
+- [formAlignment](#property-formalignment--combination-of-qtalignmentflag)
+
+    表单布局内容在布局几何形状内的对齐方式。
+
+- [horizontalSpacing](#property-horizontalspacing--int)
+
+    并排布局的小部件之间的间距。
+
+- [labelAlignment](#property-labelalignment--combination-of-qtalignmentflag)
+
+    标签的水平对齐方式。
+
+- [rowWrapPolicy](#property-rowwrappolicy--qformlayoutrowwrappolicy)
+
+    表单行换行的方式。
+
+- [verticalSpacing](#property-verticalspacing--int)
+
+    垂直布局的小部件之间的间距。
+
+
+## Methods
+
+- [def __init__()](#initparentnone)
+
+- [def addRow()](#addrowlabel-field)
+
+- [def fieldGrowthPolicy()](#fieldgrowthpolicy)
+
+- [def formAlignment()](#formalignment)
+
+- [def getItemPosition()](#getitempositionindex)
+
+- [def getLayoutPosition()](#getlayoutpositionlayout)
+
+- [def getWidgetPosition()](#getwidgetpositionwidget)
+
+- [def horizontalSpacing()](#horizontalspacing)
+
+- [def insertRow()](#insertrowrow-label-field)
+
+- [def isRowVisible()](#isrowvisiblelayout)
+
+- [def itemAt()](#itematrow-role)
+
+- [def labelAlignment()](#labelalignment)
+
+- [def labelForField()](#labelforfieldfield)
+
+- [def removeRow()](#removerowwidget)
+
+- [def rowCount()](#rowcount)
+
+- [def rowWrapPolicy()](#rowwrappolicy)
+
+- [def setFieldGrowthPolicy()](#setfieldgrowthpolicypolicy)
+
+- [def setFormAlignment()](#setformalignmentalignment)
+
+- [def setHorizontalSpacing()](#sethorizontalspacingspacing)
+
+- [def setItem()](#setitemrow-role-item)
+
+- [def setLabelAlignment()](#setlabelalignmentalignment)
+
+- [def setLayout()](#setlayoutrow-role-layout)
+
+- [def setRowVisible()](#setrowvisiblelayout-on)
+
+- [def setRowWrapPolicy()](#setrowwrappolicypolicy)
+
+- [def setVerticalSpacing()](#setverticalspacingspacing)
+
+- [def setWidget()](#setwidgetrow-role-widget)
+
+- [def takeRow()](#takerowlayout)
+
+- [def verticalSpacing()](#verticalspacing)
+
+
+# Detailed Description
+
+QFormLayout 是一个便利的布局类，它以两列的形式布局其子项。左列由标签组成，右列由“字段”小部件（行编辑器、旋转框等）组成。
+
+传统上，这种两列表格布局是使用 QGridLayout 实现的。QFormLayout 是一种更高级的替代方案，它具有以下优势：
+
+- 遵守不同平台的外观和感觉指南。
+
+    例如，macOS Aqua 和 KDE 指南规定标签应右对齐，而 Windows 和 GNOME 应用程序通常使用左对齐。
+
+- 支持长行换行。
+
+    对于具有小显示屏的设备，可以将 QFormLayout 设置为换行长行，甚至可以换行所有行。
+
+- 用于创建标签字段对的便捷 API。
+
+    接受 QString 和 QWidget * 的 addRow() 重载在后台创建 QLabel 并自动设置其伙伴。然后我们可以编写如下代码：
+
+```python
+formLayout = QFormLayout(self)
+formLayout.addRow(tr("Name:"), nameLineEdit)
+formLayout.addRow(tr("Email:"), emailLineEdit)
+formLayout.addRow(tr("Age:"), ageSpinBox)
+```
+
+将其与以下使用 QGridLayout 编写的代码进行比较：
+
+```python
+gridLayout = QGridLayout(self)
+nameLabel = QLabel(tr("Name:"))
+nameLabel.setBuddy(nameLineEdit)
+emailLabel = QLabel(tr("Name:"))
+emailLabel.setBuddy(emailLineEdit)
+ageLabel = QLabel(tr("Name:"))
+ageLabel.setBuddy(ageSpinBox)
+gridLayout.addWidget(nameLabel, 0, 0)
+gridLayout.addWidget(nameLineEdit, 0, 1)
+gridLayout.addWidget(emailLabel, 1, 0)
+gridLayout.addWidget(emailLineEdit, 1, 1)
+gridLayout.addWidget(ageLabel, 2, 0)
+gridLayout.addWidget(ageSpinBox, 2, 1)
+```
+
+下表显示了不同样式的默认外观。
+
+还可以通过调用 setLabelAlignment() 、 setFormAlignment() 、 setFieldGrowthPolicy() 和 setRowWrapPolicy() 单独覆盖表单样式。例如，要在所有平台上模拟 QMacStyle 的表单布局外观，但使用左对齐标签，您可以编写：
+
+```python
+formLayout.setRowWrapPolicy(QFormLayout.DontWrapRows)
+formLayout.setFieldGrowthPolicy(QFormLayout.FieldsStayAtSizeHint)
+formLayout.setFormAlignment(Qt.AlignHCenter | Qt.AlignTop)
+formLayout.setLabelAlignment(Qt.AlignLeft)
+```
+
+
+--------------------------------
+## class FieldGrowthPolicy
+
+此枚举指定了可用于控制表单字段增长方式的不同策略。
+
+| Constant                          | Description |
+| --------------------------------- | ----------- |
+| QFormLayout.FieldsStayAtSizeHint  | 字段永远不会超出其有效大小提示。这是 QMacStyle 的默认设置。 |
+| QFormLayout.ExpandingFieldsGrow   | 水平尺寸策略为 Expanding 或 MinimumExpanding 的字段将增长以填充可用空间。其他字段不会超出其有效尺寸提示。这是 Plastique 的默认策略。 |
+| QFormLayout.AllNonFixedFieldsGrow | 所有具有允许其增长的尺寸策略的字段都将增长以填充可用空间。这是大多数样式的默认策略。 |
+
+
+--------------------------------
+## class RowWrapPolicy
+
+此枚举指定了可用于控制表单行换行方式的不同策略。
+
+| Constant                 | Description |
+| ------------------------ | ----------- |
+| QFormLayout.DontWrapRows | 字段始终排列在其标签旁边。这是除 Qt Extended 样式之外的所有样式的默认策略。 |
+| QFormLayout.WrapLongRows | 标签有足够的水平空间来容纳最宽的标签，其余空间分配给字段。如果字段对的最小大小比可用空间宽，则字段将换行到下一行。这是 Qt Extended 样式的默认策略。 |
+| QFormLayout.WrapAllRows  | 字段始终布置在其标签下方。 |
+
+
+--------------------------------
+## class ItemRole
+
+此枚举指定可能出现在一行中的小部件（或其他布局项）的类型。
+
+| Constant                 | Description              |
+| ------------------------ | ------------------------ |
+| QFormLayout.LabelRole    | 标签小部件。              |
+| QFormLayout.FieldRole    | 字段小部件。              |
+| QFormLayout.SpanningRole | 跨越标签和字段列的小部件。 |
+
+
+--------------------------------
+## property fieldGrowthPolicy : QFormLayout.FieldGrowthPolicy
+
+此属性保存表单字段的增长方式。
+
+默认值取决于小部件或应用程序样式。对于 QMacStyle，默认值为 FieldsStayAtSizeHint ；对于 QCommonStyle 派生样式（如 Plastique 和 Windows），默认值为 ExpandingFieldsGrow ；对于 Qt Extended 样式，默认值为 AllNonFixedFieldsGrow 。
+
+如果所有字段都无法增长且表单大小已调整，则根据当前表单对齐方式分配额外空间。
+
+访问函数：
+
+- fieldGrowthPolicy()
+- setFieldGrowthPolicy()
+
+
+--------------------------------
+## property formAlignment : Combination of Qt.AlignmentFlag
+
+此属性保存表单布局内容在布局几何图形内的对齐方式。
+
+默认值取决于小部件或应用程序样式。对于 QMacStyle，默认值为 Qt::AlignHCenter | Qt::AlignTop；对于其他样式，默认值为 Qt::AlignLeft | Qt::AlignTop。
+
+访问函数：
+
+- formAlignment()
+- setFormAlignment()
+
+
+--------------------------------
+## property horizontalSpacing : int
+
+此属性保存并排布局的小部件之间的间距。
+
+默认情况下，如果未明确设置值，则布局的水平间距将从父布局或父小部件的样式设置继承。
+
+访问函数：
+
+- horizontalSpacing()
+- setHorizontalSpacing()
+
+
+--------------------------------
+## property labelAlignment : Combination of Qt.AlignmentFlag
+
+此属性保存标签的水平对齐方式。
+
+默认值取决于小部件或应用程序样式。对于 QCommonStyle 派生样式，除 QPlastiqueStyle 外，默认值为 Qt::AlignLeft；对于其他样式，默认值为 Qt::AlignRight。
+
+访问函数：
+
+- labelAlignment()
+- setLabelAlignment()
+
+
+--------------------------------
+## property rowWrapPolicy : QFormLayout.RowWrapPolicy
+
+此属性保存表单行换行的方式。
+
+默认值取决于小部件或应用程序样式。对于 Qt Extended 样式，默认值为 WrapLongRows ；对于其他样式，默认值为 DontWrapRows 。
+
+如果要将每个标签显示在其关联字段上方（而不是旁边），请将此属性设置为 WrapAllRows 。
+
+访问函数：
+
+- rowWrapPolicy()
+- setRowWrapPolicy()
+
+
+--------------------------------
+## property verticalSpacing : int
+
+此属性保存垂直布局的小部件之间的间距。
+
+默认情况下，如果未明确设置任何值，则布局的垂直间距将从父布局或父小部件的样式设置继承。
+
+访问函数：
+
+- verticalSpacing()
+- setVerticalSpacing()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用给定的父窗口小部件构造新的表单布局。
+
+布局直接设置为父窗口小部件的顶级布局。窗口小部件只能有一个顶级布局。它由 layout() 返回。
+
+
+--------------------------------
+## addRow(layout)
+
+参数：
+
+- layout – QLayout
+
+这是一个重载函数。
+
+在此表单布局的末尾添加指定的布局。布局跨越两列。
+
+
+--------------------------------
+## addRow(labelText, field)
+
+参数：
+
+- labelText – str
+- field – QWidget
+
+这是一个重载函数。
+
+此重载会自动在后台创建一个 QLabel，其文本为 labelText。该字段设置为新 QLabel 的伙伴。
+
+
+--------------------------------
+## addRow(labelText, field)
+
+参数：
+
+- labelText – str
+- field – QLayout
+
+这是一个重载函数。
+
+此重载会自动在后台创建一个 QLabel，并以 labelText 作为其文本。
+
+
+--------------------------------
+## addRow(label, field)
+
+参数：
+
+- label – QWidget
+- field – QWidget
+
+在此表单布局的底部添加一个新行，其中包含给定的标签和字段。
+
+
+--------------------------------
+## addRow(label, field)
+
+参数：
+
+- label – QWidget
+- field – QLayout
+
+这是一个重载函数。
+
+
+--------------------------------
+## addRow(widget)
+
+参数：
+
+- widget – QWidget
+
+这是一个重载函数。
+
+在此表单布局的末尾添加指定的小部件。小部件跨越两列。
+
+
+--------------------------------
+## fieldGrowthPolicy()
+
+返回类型：FieldGrowthPolicy
+
+属性 fieldGrowthPolicy 的 getter 。
+
+
+--------------------------------
+## formAlignment()
+
+返回类型：Combination of AlignmentFlag
+
+属性 formAlignment 的获取器。
+
+
+--------------------------------
+## getItemPosition(index)
+
+参数：
+
+- index – int
+
+返回类型：PyObject
+
+检索指定索引处项目的行和角色（列）。如果索引超出范围，则将 *``rowPtr`` 设置为 -1；否则将行存储在 *``rowPtr`` 中，将角色存储在 *``rolePtr`` 中。
+
+
+--------------------------------
+## getLayoutPosition(layout)
+
+参数：
+
+- layout – QLayout
+
+返回类型：PyObject
+
+检索指定子布局的行和角色（列）。如果布局不在表单布局中，则将*``rowPtr``设置为 -1；否则将行存储在*``rowPtr``中，将角色存储在*``rolePtr``中。
+
+
+--------------------------------
+## getWidgetPosition(widget)
+
+参数：
+
+- widget – QWidget
+
+返回类型：PyObject
+
+检索布局中指定窗口小部件的行和角色（列）。如果窗口小部件不在布局中，则将 *``rowPtr`` 设置为 -1；否则将行存储在 *``rowPtr`` 中，将角色存储在 *``rolePtr`` 中。
+
+
+--------------------------------
+## horizontalSpacing()
+
+返回类型：int
+
+属性 Horizo​​ntalSpacing 的获取器。
+
+
+--------------------------------
+## insertRow(row, label, field)
+
+参数：
+
+- row – int
+- label – QWidget
+- field – QLayout
+
+这是一个重载函数。
+
+
+--------------------------------
+## insertRow(row, labelText, field)
+
+参数：
+
+- row – int
+- labelText – str
+- field – QWidget
+
+这是一个重载函数。
+
+此重载会自动在后台创建一个 QLabel，其文本为 labelText。该字段设置为新 QLabel 的伙伴。
+
+
+--------------------------------
+## insertRow(row, labelText, field)
+
+参数：
+
+- row – int
+- labelText – str
+- field – QLayout
+
+这是一个重载函数。
+
+此重载会自动在后台创建一个 QLabel，并以 labelText 作为其文本。
+
+
+--------------------------------
+## insertRow(row, widget)
+
+参数：
+
+- row – int
+- widget – QWidget
+
+这是一个重载函数。
+
+在此表单布局中的行位置插入指定的小部件。小部件跨越两列。如果行超出范围，则将小部件添加到末尾。
+
+
+--------------------------------
+## insertRow(row, label, field)
+
+参数：
+
+- row – int
+- label – QWidget
+- field – QWidget
+
+在此表单布局中的 row 位置插入一个新行，并带有给定的标签和字段。如果 row 超出范围，则将新行添加到末尾。
+
+
+--------------------------------
+## insertRow(row, layout)
+
+参数：
+
+- row – int
+- layout – QLayout
+
+这是一个重载函数。
+
+在此表单布局的行位置插入指定的布局。布局跨越两列。如果行超出范围，则将小部件添加到末尾。
+
+
+--------------------------------
+## isRowVisible(layout)
+
+参数：
+
+- layout – QLayout
+
+返回类型：bool
+
+这是一个重载函数。
+
+如果布局对应的行中的某些项目可见，则返回 true，否则返回 false。
+
+
+--------------------------------
+## isRowVisible(widget)
+
+参数：
+
+- widget – QWidget
+
+返回类型：bool
+
+这是一个重载函数。
+
+如果小部件对应的行中的某些项目可见，则返回 true，否则返回 false。
+
+
+--------------------------------
+## isRowVisible(row)
+
+参数：
+
+- row – int
+
+返回类型：bool
+
+如果行中的某些项目可见，则返回 true，否则返回 false。
+
+
+--------------------------------
+## itemAt(row, role)
+
+参数：
+
+- row – int
+- role – ItemRole
+
+返回类型：QLayoutItem
+
+返回给定行中具有指定角色（列）的布局项。如果不存在这样的项，则返回 None。
+
+
+--------------------------------
+## labelAlignment()
+
+返回类型：Combination of AlignmentFlag
+
+属性 labelAlignment 的获取器。
+
+
+--------------------------------
+## labelForField(field)
+
+参数：
+
+- field – QWidget
+
+返回类型：QWidget
+
+返回与给定字段关联的标签。
+
+
+--------------------------------
+## labelForField(field)
+
+参数：
+
+- field – QLayout
+
+返回类型：QWidget
+
+这是一个重载函数。
+
+
+--------------------------------
+## removeRow(layout)
+
+参数：
+
+- layout – QLayout
+
+这是一个重载函数。
+
+从此表单布局中删除与布局对应的行。
+
+调用此函数后，rowCount() 减一。 占用此行的所有小部件和嵌套布局都将被删除。 包括字段小部件和标签（如果有）。 所有后续行都上移一行，释放的垂直空间将在剩余行中重新分配。
+
+您可以使用此函数撤消上一个 addRow() 或 insertRow() ：
+
+```python
+flay = ...
+vbl = QVBoxLayout()
+flay.insertRow(2, "User:", vbl)
+# later:
+flay.removeRow(layout) # vbl == None at this point
+```
+
+如果您想从表单布局中删除行而不删除插入的布局，请改用 takeRow()。
+
+
+--------------------------------
+## removeRow(widget)
+
+参数：
+
+- widget – QWidget
+
+这是一个重载函数。
+
+从此表单布局中删除与 widget 对应的行。
+
+调用此函数后，rowCount() 减一。占用此行的所有 widget 和嵌套布局都将被删除。这包括字段 widget 和标签（如果有）。所有后续行都上移一行，释放的垂直空间将在剩余行中重新分配。
+
+您可以使用此函数撤消上一个 addRow() 或 insertRow() ：
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+flay.removeRow(le) # le == None at this point
+```
+
+如果您想从布局中删除行而不删除小部件，请改用 takeRow()。
+
+
+--------------------------------
+## removeRow(row)
+
+参数：
+
+- row – int
+
+从此表单布局中删除行 row。
+
+row 必须为非负数且小于 rowCount() 。
+
+调用此函数后， rowCount() 减一。占用此行的所有小部件和嵌套布局都将被删除。这包括字段小部件和标签（如果有）。所有后续行都上移一行，释放的垂直空间将在剩余行中重新分配。
+
+您可以使用此函数撤消上一个 addRow() 或 insertRow() ：
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+flay.removeRow(2) # le == None at this point
+```
+
+如果您想从布局中删除行而不删除小部件，请改用 takeRow()。
+
+
+--------------------------------
+## rowCount()
+
+返回类型：int
+
+返回表单中的行数。
+
+
+--------------------------------
+## rowWrapPolicy()
+
+返回类型：RowWrapPolicy
+
+属性 rowWrapPolicy 的获取器。
+
+
+--------------------------------
+## setFieldGrowthPolicy(policy)
+
+参数：
+
+- policy – FieldGrowthPolicy
+
+属性 fieldGrowthPolicy 的设置者。
+
+
+--------------------------------
+## setFormAlignment(alignment)
+
+参数：
+
+- alignment – Combination of AlignmentFlag
+
+属性 formAlignment 的设置器。
+
+
+--------------------------------
+## setHorizontalSpacing(spacing)
+
+参数：
+
+- spacing – int
+
+属性 Horizo​​ntalSpacing 的设置器。
+
+
+--------------------------------
+## setItem(row, role, item)
+
+参数：
+
+- row – int
+- role – ItemRole
+- item – QLayoutItem
+
+将给定角色的给定行中的项目设置为 item，必要时使用空行扩展布局。
+
+如果单元格已被占用，则不会插入该项目，并向控制台发送错误消息。该项目跨越两列。
+
+
+--------------------------------
+## setLabelAlignment(alignment)
+
+参数：
+
+- alignment – Combination of AlignmentFlag
+
+属性 labelAlignment 的设置器。
+
+
+--------------------------------
+## setLayout(row, role, layout)
+
+参数：
+
+- row – int
+- role – ItemRole
+- layout – QLayout
+
+将给定角色的给定行中的子布局设置为布局，必要时使用空行扩展表单布局。
+
+如果单元格已被占用，则不会插入布局，并向控制台发送错误消息。
+
+
+--------------------------------
+## setRowVisible(layout, on)
+
+参数：
+
+- layout – QLayout
+- on – bool
+
+这是一个重载函数。
+
+如果 on 为真，则显示与布局对应的行，否则隐藏该行。
+
+
+--------------------------------
+## setRowVisible(widget, on)
+
+参数：
+
+- widget – QWidget
+- on – bool
+
+这是一个重载函数。
+
+如果 on 为真，则显示与小部件对应的行，否则隐藏该行。
+
+
+--------------------------------
+## setRowVisible(row, on)
+
+参数：
+
+- row – int
+- on – bool
+
+如果 on 为真则显示该行，否则隐藏该行。
+
+row 必须为非负数且小于 rowCount() 。
+
+
+--------------------------------
+## setRowWrapPolicy(policy)
+
+参数：
+
+- policy – RowWrapPolicy
+
+属性 rowWrapPolicy 的设置者。
+
+
+--------------------------------
+## setVerticalSpacing(spacing)
+
+参数：
+
+- spacing – int
+
+属性 verticalSpacing 的设置器。
+
+
+--------------------------------
+## setWidget(row, role, widget)
+
+参数：
+
+- row – int
+- role – ItemRole
+- widget – QWidget
+
+将给定角色的给定行中的小部件设置为小部件，如有必要，使用空行扩展布局。
+
+如果单元格已被占用，则不会插入小部件，并向控制台发送错误消息。
+
+
+--------------------------------
+## takeRow(layout)
+
+参数：
+
+- layout – QLayout
+
+返回类型：TakeRowResult
+
+这是一个重载函数。
+
+从此表单布局中删除指定的布局。
+
+调用此函数后，rowCount() 会减一。所有后续行都会上移一行，释放的垂直空间会在剩余行之间重新分配。
+
+```python
+flay = ...
+vbl = QVBoxLayout()
+flay.insertRow(2, "User:", vbl)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(widget)
+```
+
+如果要从表单布局中删除行并删除插入的布局，请改用 removeRow()。
+
+返回包含小部件和相应标签布局项的结构。
+
+
+--------------------------------
+## takeRow(widget)
+
+参数：
+
+- widget – QWidget
+
+返回类型：TakeRowResult
+
+这是一个重载函数。
+
+从此表单布局中删除指定的小部件。
+
+调用此函数后，rowCount() 会减一。所有后续行都会上移一行，释放的垂直空间会在剩余行之间重新分配。
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(widget)
+```
+
+如果要从布局中删除行并删除小部件，请改用 removeRow()。
+
+返回包含小部件和相应标签布局项的结构。
+
+
+--------------------------------
+## takeRow(row)
+
+参数：
+
+- row – int
+
+返回类型：TakeRowResult
+
+从此表单布局中删除指定的行。
+
+row 必须为非负数且小于 rowCount() 。
+
+调用此函数后， rowCount() 减一。所有后续行均上移一行，释放的垂直空间将在剩余行中重新分配。
+
+您可以使用此函数撤消上一个 addRow() 或 insertRow() ：
+
+```python
+flay = ...
+le = QLineEdit()
+flay.insertRow(2, "User:", le)
+# later:
+QFormLayout.TakeRowResult result = flay.takeRow(2)
+```
+
+如果要从布局中删除行并删除小部件，请改用 removeRow()。
+
+返回包含小部件和相应标签布局项的结构。
+
+
+--------------------------------
+## verticalSpacing()
+
+返回类型：int
+
+属性 verticalSpacing 的获取器。

From 25e7fcd3c31bd364421edf26b1f45b719705c023 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 6 Aug 2024 15:47:01 +0800
Subject: [PATCH 28/38] [PyQt] Add QLineEdit doc.

---
 .../PyQt6/Class-0/QtWidget/QLineEdit.CN.md    | 1339 +++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QLineEdit.md   | 1339 +++++++++++++++++
 2 files changed, 2678 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QLineEdit.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QLineEdit.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.CN.md
new file mode 100644
index 0000000..59c9e95
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.CN.md
@@ -0,0 +1,1339 @@
+
+[English doc](QLineEdit.md)
+
+# class QLineEdit
+
+QLineEdit 小部件是一个单行文本编辑器。
+
+
+# Synopsis
+
+## Properties
+
+- [acceptableInput](#property-acceptableinput--bool)
+
+    输入是否满足inputMask和validator。
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    行的编辑。
+
+- [clearButtonEnabled](#property-clearbuttonenabled--bool)
+
+    当行编辑不为空时是否显示清除按钮。
+
+- [cursorMoveStyle](#property-cursormovestyle--qtcursormovestyle)
+
+    本行编辑中光标的移动风格。
+
+- [cursorPosition](#property-cursorposition--int)
+
+    此行编辑的当前光标位置。
+
+- [displayText](#property-displaytext--str)
+
+    显示的文本。
+
+- [dragEnabled](#property-dragenabled--bool)
+
+    当用户按下并移动鼠标到某些选定的文本上时，行编辑是否开始拖动。
+
+- [echoMode](#property-echomode--qlineeditechomode)
+
+    行编辑的回声模式。
+
+- [frame](#property-frame--bool)
+
+    线编辑是否用框架绘制自身。
+
+- [hasSelectedText](#property-hasselectedtext--bool)
+
+    是否选择了任何文本。
+
+- [inputMask](#property-inputmask--str)
+
+    验证输入掩码。
+
+- [maxLength](#property-maxlength--int)
+
+    文本的最大允许长度。
+
+- [modified](#property-modified--bool)
+
+    行编辑的内容是否已被用户修改。
+
+- [placeholderText](#property-placeholdertext--str)
+
+    行编辑的占位符文本。
+
+- [readOnly](#property-readonly--bool)
+
+    行编辑是否是只读的。
+
+- [redoAvailable](#property-redoavailable--bool)
+
+    是否可以重做。
+
+- [selectedText](#property-selectedtext--str)
+
+    选定的文本。
+
+- [text](#property-text--str)
+
+    行编辑的文本。
+
+- [undoAvailable](#property-undoavailable--bool)
+
+    是否可以撤消。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addAction()](#addactionaction-position)
+
+- [def alignment()](#alignment)
+
+- [def backspace()](#backspace)
+
+- [def completer()](#completer)
+
+- [def createStandardContextMenu()](#createstandardcontextmenu)
+
+- [def cursorBackward()](#cursorbackwardmark-steps1)
+
+- [def cursorForward()](#cursorforwardmark-steps1)
+
+- [def cursorMoveStyle()](#cursormovestyle)
+
+- [def cursorPosition()](#cursorposition)
+
+- [def cursorPositionAt()](#cursorpositionatpos)
+
+- [def cursorRect()](#cursorrect)
+
+- [def cursorWordBackward()](#cursorwordbackwardmark)
+
+- [def cursorWordForward()](#cursorwordforwardmark)
+
+- [def del_()](#del_)
+
+- [def deselect()](#deselect)
+
+- [def displayText()](#displaytext)
+
+- [def dragEnabled()](#dragenabled)
+
+- [def echoMode()](#echomode)
+
+- [def end()](#endmark)
+
+- [def hasAcceptableInput()](#hasacceptableinput)
+
+- [def hasFrame()](#hasframe)
+
+- [def hasSelectedText()](#hasselectedtext)
+
+- [def home()](#homemark)
+
+- [def inputMask()](#inputmask)
+
+- [def inputMethodQuery()](#inputmethodqueryproperty-argument)
+
+- [def insert()](#insertarg__1)
+
+- [def isClearButtonEnabled()](#isclearbuttonenabled)
+
+- [def isModified()](#ismodified)
+
+- [def isReadOnly()](#isreadonly)
+
+- [def isRedoAvailable()](#isredoavailable)
+
+- [def isUndoAvailable()](#isundoavailable)
+
+- [def maxLength()](#maxlength)
+
+- [def placeholderText()](#placeholdertext)
+
+- [def selectedText()](#selectedtext)
+
+- [def selectionEnd()](#selectionend)
+
+- [def selectionLength()](#selectionlength)
+
+- [def selectionStart()](#selectionstart)
+
+- [def setAlignment()](#setalignmentflag)
+
+- [def setClearButtonEnabled()](#setclearbuttonenabledenable)
+
+- [def setCompleter()](#setcompletercompleter)
+
+- [def setCursorMoveStyle()](#setcursormovestylestyle)
+
+- [def setCursorPosition()](#setcursorpositionarg__1)
+
+- [def setDragEnabled()](#setdragenabledb)
+
+- [def setEchoMode()](#setechomodearg__1)
+
+- [def setFrame()](#setframearg__1)
+
+- [def setInputMask()](#setinputmaskinputmask)
+
+- [def setMaxLength()](#setmaxlengtharg__1)
+
+- [def setModified()](#setmodifiedarg__1)
+
+- [def setPlaceholderText()](#setplaceholdertextarg__1)
+
+- [def setReadOnly()](#setreadonlyarg__1)
+
+- [def setSelection()](#setselectionarg__1-arg__2)
+
+- [def setTextMargins()](#settextmarginsmargins)
+
+- [def setValidator()](#setvalidatorarg__1)
+
+- [def text()](#text)
+
+- [def textMargins()](#textmargins)
+
+- [def validator()](#validator)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def clear()](#clear)
+
+- [def copy()](#copy)
+
+- [def cut()](#cut)
+
+- [def paste()](#paste)
+
+- [def redo()](#redo)
+
+- [def selectAll()](#selectall)
+
+- [def setText()](#settextarg__1)
+
+- [def undo()](#undo)
+
+
+## Signals
+
+- [def cursorPositionChanged()](#cursorpositionchangedarg__1-arg__2)
+
+- [def editingFinished()](#editingfinished)
+
+- [def inputRejected()](#inputrejected)
+
+- [def returnPressed()](#returnpressed)
+
+- [def selectionChanged()](#selectionchanged)
+
+- [def textChanged()](#textchangedarg__1)
+
+- [def textEdited()](#texteditedarg__1)
+
+
+# Detailed Description
+
+行编辑允许用户输入和编辑一行纯文本，并具有有用的编辑功能，包括撤消和重做、剪切和粘贴以及拖放。
+
+通过更改行编辑的 echoMode()，它还可以用作输入密码等的只写字段。
+
+QTextEdit 是一个相关类，允许多行、富文本编辑。
+
+
+## Constraining Text
+
+使用 maxLength 定义文本的最大允许长度。您可以使用 inputMask 和 setValidator() 进一步限制文本内容。
+
+
+## Editing Text
+
+您可以使用 setText() 或 insert() 更改文本。使用 text() 检索文本，使用 displayText() 检索显示的文本（可能有所不同，请参阅 EchoMode）。您可以使用 setSelection() 或 selectAll() 选择文本，还可以 cut() 、 copy() 和 paste() 选定内容。要对齐文本，请使用 setAlignment() 。
+
+当文本更改时，将发出 textChanged() 信号。当文本以除调用 setText() 以外的其他方式更改时，将发出 textEdited() 信号。当光标移动时，将发出 cursorPositionChanged() 信号。当选择 Return 或 Enter 键时，将发出 returnPressed() 信号。
+
+当文本编辑完成时（因为行编辑失去焦点或选择了 Return/Enter 键），将发出 editingFinished() 信号。
+
+如果行编辑焦点丢失且文本没有任何变化，则不会发出 editingFinished() 信号。
+
+如果在行编辑中设置了验证器，则仅当验证器返回 QValidator::Acceptable 时，才会发出 returnPressed() / editingFinished() 信号。
+
+有关 QLineEdit 的多种使用方式的更多信息，请参阅行编辑示例，其中还提供了一系列行编辑示例，展示了各种属性和验证器对用户提供的输入和输出的影响。
+
+
+## Setting a Frame
+
+默认情况下，QLineEdits 具有平台样式指南中指定的框架。您可以通过调用 setFrame (false) 关闭框架。
+
+
+## Default Key Bindings
+
+下表介绍了默认的键绑定。
+
+任何其他代表有效字符的按键都将导致该字符插入到行编辑中。
+
+
+--------------------------------
+## class ActionPosition
+
+此枚举类型描述了行编辑应如何显示要添加的操作小部件。
+
+| Constant                   | Description |
+| -------------------------- | ----------- |
+| QLineEdit.LeadingPosition  | 当使用布局方向 Qt::LeftToRight 时，小部件显示在文本左侧；当使用 Qt::RightToLeft 时，小部件显示在文本右侧。 |
+| QLineEdit.TrailingPosition | 当使用布局方向 Qt::LeftToRight 时，小部件显示在文本的右侧；当使用 Qt::RightToLeft 时，小部件显示在文本的左侧。 |
+
+
+--------------------------------
+## class EchoMode
+
+此枚举类型描述了行编辑应如何显示其内容。
+
+| Constant                     | Description |
+| ---------------------------- | ----------- |
+| QLineEdit.Normal             | 按输入的方式显示字符。这是默认设置。 |
+| QLineEdit.NoEcho             | 不显示任何内容。这可能适用于密码长度也应保密的密码。 |
+| QLineEdit.Password           | 显示与平台相关的密码掩码字符而不是实际输入的字符。 |
+| QLineEdit.PasswordEchoOnEdit | 仅显示输入的字符。否则，显示与密码相同的字符。 |
+
+
+--------------------------------
+## property acceptableInput : bool
+
+此属性保存输入是否满足 inputMask 和验证器。
+
+默认情况下，此属性为 true。
+
+访问函数：
+
+- hasAcceptableInput()
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+此属性保存行编辑的对齐方式。
+
+此处允许水平和垂直对齐，Qt::AlignJustify 将映射到 Qt::AlignLeft。
+
+默认情况下，此属性包含 Qt::AlignLeft 和 Qt::AlignVCenter 的组合。
+
+访问函数：
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property clearButtonEnabled : bool
+
+此属性保存当行编辑不为空时是否显示清除按钮。
+
+如果启用，当行编辑包含一些文本时，它会显示尾随清除按钮。否则，行编辑不会显示清除按钮（默认）。
+
+访问函数：
+
+- isClearButtonEnabled()
+- setClearButtonEnabled()
+
+
+--------------------------------
+## property cursorMoveStyle : Qt.CursorMoveStyle
+
+此属性保存此行编辑中光标的移动样式。
+
+当此属性设置为 Qt::VisualMoveStyle 时，行编辑将使用视觉移动样式。使用左箭头键将始终导致光标向左移动，无论文本的书写方向如何。右箭头键也适用相同的行为。
+
+当此属性设置为 Qt::LogicalMoveStyle（默认值）时，在从左到右 (LTR) 的文本块中，使用左箭头键将增加光标位置，而使用右箭头键将减少光标位置。如果文本块是从右到左 (RTL)，则适用相反的行为。
+
+访问函数：
+
+- cursorMoveStyle()
+- setCursorMoveStyle()
+
+
+--------------------------------
+## property cursorPosition : int
+
+此属性保存此行编辑的当前光标位置。
+
+设置光标位置会在适当的时候导致重新绘制。
+
+默认情况下，此属性包含值为 0。
+
+访问函数：
+
+- cursorPosition()
+- setCursorPosition()
+
+
+--------------------------------
+## property displayText : str
+
+此属性保存显示的文本。
+
+如果 echoMode 为 Normal ，则返回与 text() 相同的结果。如果 EchoMode 为 Password 或 PasswordEchoOnEdit ，则返回一串与平台相关的密码掩码字符（例如“******”）。如果 EchoMode 为 NoEcho ，则返回一个空字符串。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- displayText()
+
+
+--------------------------------
+## property dragEnabled : bool
+
+此属性保存当用户按下并移动鼠标到某些选定文本上时，行编辑是否开始拖动。
+
+默认情况下，拖动功能处于禁用状态。
+
+访问函数：
+
+- dragEnabled()
+- setDragEnabled()
+
+
+--------------------------------
+## property echoMode : QLineEdit.EchoMode
+
+此属性保存行编辑的回显模式。
+
+回显模式决定了行编辑中输入的文本如何显示（或回显）给用户。
+
+最常见的设置是 Normal ，其中用户输入的文本将逐字显示。QLineEdit 还支持允许抑制或隐藏输入文本的模式：这些模式包括 NoEcho 、 Password 和 PasswordEchoOnEdit 。
+
+小部件的显示以及复制或拖动文本的能力受此设置的影响。
+
+默认情况下，此属性设置为 Normal 。
+
+访问函数：
+
+- echoMode()
+- setEchoMode()
+
+
+--------------------------------
+## property frame : bool
+
+此属性保存线编辑是否使用框架绘制自身。
+
+如果启用（默认），线编辑将在框架内绘制自身。否则，线编辑将在没有任何框架的情况下绘制自身。
+
+访问函数：
+
+- hasFrame()
+- setFrame()
+
+
+--------------------------------
+## property hasSelectedText : bool
+
+此属性保存是否有任何文本被选中。
+
+如果用户选择了部分或全部文本，hasSelectedText() 将返回 true。否则，它将返回 false。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- hasSelectedText()
+
+
+--------------------------------
+## property inputMask : str
+
+此属性保存验证输入掩码。
+
+设置 QLineEdit 的验证掩码。验证器可以代替掩码或与掩码一起使用；请参阅 setValidator() 。默认值为空字符串，表示不使用输入掩码。
+
+要取消设置掩码并返回正常的 QLineEdit 操作，请传递一个空字符串。
+
+输入掩码是输入模板字符串。它可以包含以下元素：
+
+|                 |                                      |
+| --------------- | ------------------------------------ |
+| Mask Characters | 定义在此位置被视为有效的输入字符的类别。 |
+| Meta Characters | 各种特殊含义（详见下文）。              |
+| Separators      | 所有其他字符都被视为不可变的分隔符。     |
+
+下表显示了输入掩码中可以使用的掩码和元字符。
+
+| Mask Character | Meaning                                       |
+| -------------- | --------------------------------------------- |
+| A              | 必填字母类别的字符，例如 A-Z、a-z。              |
+| a              | 允许但不是必须的字母类别的字符。                 |
+| N              | 必需的字母或数字类别的字符，例如 A-Z、a-z、0-9。  |
+| n              | 允许但不是必须的字母或数字类别的字符。            |
+| X              | 需要任何非空白字符。                            |
+| x              | 允许但不是必须的任何非空白字符。                 |
+| 9              | 必填数字类别的字符，例如0-9。                    |
+| 0              | 允许但不是必须的数字类别的字符。                 |
+| D              | 必须为数字类别且大于零的字符，例如1-9。           |
+| d              | 数字类别的字符，允许但不要求大于零，例如 1-9。    |
+| #              | 数字类别的字符，或者加号/减号，允许但不要求。     |
+| H              | 需要十六进制字符。A-F、a-f、0-9。               |
+| h              | 允许但不是必须的十六进制字符。                   |
+| B              | 需要二进制字符。0-1。                           |
+| b              | 允许但不是必需的二进制字符。                     |
+
+| Meta Character | Meaning                                          |
+| -------------- | ------------------------------------------------ |
+| >              | 所有后续字母均大写。                               |
+| <              | 以下所有字母均为小写。                             |
+| !              | 关闭大小写转换。                                   |
+| ;c             | 终止输入掩码并将空白字符设置为 c。                  |
+| [ ] { }        | 保留的。                                          |
+| \              | 使用 \ 来转义上面列出的特殊字符，以将它们用作分隔符。 |
+
+创建或清除后，行编辑将用输入掩码字符串的副本填充，其中元字符已被删除，掩码字符已被替换为空白字符（默认情况下为空格）。
+
+设置输入掩码后，text() 方法将返回行编辑内容的修改副本，其中所有空白字符均已被删除。可以使用 displayText() 读取未修改的内容。
+
+如果行编辑的当前内容不满足输入掩码的要求，hasAcceptableInput() 方法将返回 false。
+
+示例：
+
+| Mask                | Notes                      |
+| ------------------- | -------------------------- |
+| 000.000.000.000;_   | IP address; blanks are _.  |
+| HH:HH:HH:HH:HH:HH;_ | MAC address                |
+| 0000-00-00          | ISO Date; blanks are space |
+| >AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;# | 许可证号码；空格为#且所有（字母）字符均转换为大写。 |
+
+为了获得范围控制（例如，对于 IP 地址），请将掩码与验证器一起使用。
+
+访问函数：
+
+- inputMask()
+- setInputMask()
+
+
+--------------------------------
+## property maxLength : int
+
+此属性保存文本的最大允许长度。
+
+如果文本太长，则会在限制处截断。
+
+如果发生截断，则将取消选择任何选定的文本，将光标位置设置为 0，并显示字符串的第一部分。
+
+如果行编辑具有输入掩码，则掩码定义最大字符串长度。
+
+默认情况下，此属性包含值 32767。
+
+访问函数：
+
+- maxLength()
+- setMaxLength()
+
+
+--------------------------------
+## property modified : bool
+
+此属性保存的是行编辑的内容是否已被用户修改。
+
+QLineEdit 永远不会读取 modified 标志；它的默认值为 false，并且每当用户更改行编辑的内容时，它都会更改为 true。
+
+这对于需要提供默认值但一开始不知道默认值应该是什么的情况很有用（例如，它取决于表单上的其他字段）。在没有最佳默认值的情况下开始行编辑，当默认值已知时，如果 modified() 返回 false（用户未输入任何文本），则插入默认值。
+
+调用 setText() 会将 modified 标志重置为 false。
+
+访问函数：
+
+- isModified()
+- setModified()
+
+
+--------------------------------
+## property placeholderText : str
+
+此属性保存行编辑的占位符文本。
+
+设置此属性会使行编辑显示灰色的占位符文本（只要行编辑为空）。
+
+通常，空行编辑即使具有焦点也会显示占位符文本。但是，如果内容水平居中，则当行编辑具有焦点时，占位符文本不会显示在光标下方。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property readOnly : bool
+
+此属性保存行编辑是否为只读。
+
+在只读模式下，用户仍然可以将文本复制到剪贴板，或拖放文本（如果 echoMode() 为 Normal ），但无法编辑它。
+
+QLineEdit 在只读模式下不显示光标。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isReadOnly()
+- setReadOnly()
+
+
+--------------------------------
+## property redoAvailable : bool
+
+此属性保存是否可重做。
+
+一旦用户对行编辑中的文本执行了一个或多个撤消操作，即可重做。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isRedoAvailable()
+
+
+--------------------------------
+## property selectedText : str
+
+此属性保存所选文本。
+
+如果没有选定文本，则此属性的值为空字符串。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- selectedText()
+
+
+--------------------------------
+## property text : str
+
+此属性保存行编辑的文本。
+
+设置此属性将清除选择，清除撤消/重做历史记录，将光标移动到行尾，并将修改后的属性重置为 false。使用 setText() 插入时不会验证文本。
+
+文本被截断为 maxLength() 长度。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- text()
+- setText()
+- Signal textChanged()
+
+
+--------------------------------
+## property undoAvailable : bool
+
+此属性保存是否可撤消。
+
+一旦用户修改了行编辑中的文本，撤消即可变为可用。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isUndoAvailable()
+
+
+--------------------------------
+## __init__(arg__1[, parent=None])
+
+参数：
+
+- arg__1 – str
+- parent – QWidget
+
+构造一个包含文本内容的行编辑作为父级的子级。
+
+光标位置设置为行尾，最大文本长度为 32767 个字符。
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+构造一个没有文本的行编辑。
+
+最大文本长度设置为 32767 个字符。
+
+父参数被发送到 QWidget 构造函数。
+
+
+--------------------------------
+## addAction(icon, position)
+
+参数：
+
+- icon – QIcon
+- position – ActionPosition
+
+返回类型：QAction
+
+这是一个重载函数。
+
+在指定位置使用给定图标创建新操作。
+
+
+--------------------------------
+## addAction(action, position)
+
+参数：
+
+- action – QAction
+- position – ActionPosition
+
+将该动作添加到该位置的动作列表中。
+
+
+--------------------------------
+## alignment()
+
+返回类型：Combination of AlignmentFlag
+
+属性 alignment 的获取器。
+
+
+--------------------------------
+## backspace()
+
+如果未选择任何文本，则删除文本光标左侧的字符，并将光标向左移动一个位置。如果选择了任何文本，则将光标移动到所选文本的开头，并删除所选文本。
+
+
+--------------------------------
+## clear()
+
+清除行编辑的内容。
+
+
+--------------------------------
+## completer()
+
+返回类型：QCompleter
+
+返回当前提供完成的 QCompleter。
+
+
+--------------------------------
+## copy()
+
+将选定的文本复制到剪贴板（如果有），并且 echoMode() 为 Normal 。
+
+
+--------------------------------
+## createStandardContextMenu()
+
+返回类型：QMenu
+
+创建标准上下文菜单，当用户用鼠标右键单击行编辑时显示。它从默认 contextMenuEvent() 处理程序调用。弹出菜单的所有权将转移给调用者。
+
+
+--------------------------------
+## cursorBackward(mark[, steps=1])
+
+参数：
+
+- mark – bool
+- steps – int
+
+将光标向后移动几个字符。如果 mark 为真，则移动的每个字符都会添加到选择中。如果 mark 为假，则清除选择。
+
+
+--------------------------------
+## cursorForward(mark[, steps=1])
+
+参数：
+
+- mark – bool
+- steps – int
+
+将光标向前移动几个字符。如果 mark 为真，则移动的每个字符都会添加到选择中。如果 mark 为假，则清除选择。
+
+
+--------------------------------
+## cursorMoveStyle()
+
+返回类型：CursorMoveStyle
+
+属性 cursorMoveStyle 的获取器。
+
+
+--------------------------------
+## cursorPosition()
+
+返回类型：int
+
+属性 cursorPosition 的获取器。
+
+
+--------------------------------
+## cursorPositionAt(pos)
+
+参数：
+
+- pos – QPoint
+
+返回类型：int
+
+返回点 pos 下的光标位置。
+
+
+--------------------------------
+## cursorPositionChanged(arg__1, arg__2)
+
+参数：
+
+- arg__1 – int
+- arg__2 – int
+
+光标移动时会发出此信号。之前的位置由 oldPos 指定，新位置由 newPos 指定。
+
+
+--------------------------------
+## cursorRect()
+
+返回类型：QRect
+
+返回包含行编辑光标的矩形。
+
+
+--------------------------------
+## cursorWordBackward(mark)
+
+参数：
+
+- mark – bool
+
+将光标向后移动一个单词。如果 mark 为真，则还会选择该单词。
+
+
+--------------------------------
+## cursorWordForward(mark)
+
+参数：
+
+- mark – bool
+
+将光标向前移动一个单词。如果 mark 为真，则还会选择该单词。
+
+
+--------------------------------
+## cut()
+
+将选定的文本复制到剪贴板并删除它（如果有），并且 echoMode() 为 Normal 。
+
+如果当前验证器不允许删除选定的文本，则 cut() 将复制但不删除。
+
+
+--------------------------------
+## del_()
+## deselect()
+
+取消选择任何选定的文本。
+
+
+--------------------------------
+## displayText()
+
+返回类型：str
+
+属性 displayText 的获取器。
+
+
+--------------------------------
+## dragEnabled()
+
+返回类型：bool
+
+属性 dragEnabled 的获取器。
+
+
+--------------------------------
+## echoMode()
+
+返回类型：EchoMode
+
+属性 echoMode 的获取器。
+
+--------------------------------
+## editingFinished()
+
+当使用 Return 或 Enter 键时，或者行编辑失去焦点并且其内容自上次发射此信号以来发生了变化时，就会发射此信号。
+
+
+--------------------------------
+## end(mark)
+
+参数：
+
+- mark – bool
+
+将文本光标移动到行尾，除非光标已经位于该处。如果 mark 为真，则文本将朝最后一个位置选择。否则，如果移动光标，则任何选定的文本都将取消选择。
+
+
+--------------------------------
+## hasAcceptableInput()
+
+返回类型：bool
+
+属性 acceptingInput 的获取器。
+
+
+--------------------------------
+## hasFrame()
+
+返回类型：bool
+
+属性框架的获取器。
+
+
+--------------------------------
+## hasSelectedText()
+
+返回类型：bool
+
+属性 hasSelectedText 的获取器。
+
+
+--------------------------------
+## home(mark)
+
+参数：
+
+- mark – bool
+
+将文本光标移动到行首，除非光标已经位于该处。如果 mark 为真，则文本将朝第一个位置选定。否则，如果移动光标，则任何选定的文本都将取消选定。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionFrame
+
+使用此 QLineEdit 中的值初始化选项。当子类需要 QStyleOptionFrame ，但又不想自己填写所有信息时，此方法很有用。
+
+
+--------------------------------
+## inputMask()
+
+返回类型：str
+
+属性 inputMask 的获取方法。
+
+
+--------------------------------
+## inputMethodQuery(property, argument)
+
+参数：
+
+- property – InputMethodQuery
+- argument – object
+
+返回类型：object
+
+
+--------------------------------
+## inputRejected()
+
+当用户使用不被视为有效输入的键时，会发出此信号。例如，如果使用键导致验证器的validate（）调用返回无效。另一种情况是尝试输入超出行编辑最大长度的字符。
+
+
+--------------------------------
+## insert(arg__1)
+
+参数：
+
+- arg__1 – str
+
+删除任何选定的文本，插入新文本，并验证结果。如果有效，则将新文本设置为行编辑的新内容。
+
+
+--------------------------------
+## isClearButtonEnabled()
+
+返回类型：bool
+
+属性 clearButtonEnabled 的获取器。
+
+
+--------------------------------
+## isModified()
+
+返回类型：bool
+
+修改属性的 getter。
+
+
+--------------------------------
+## isReadOnly()
+
+返回类型：bool
+
+属性 readOnly 的获取器。
+
+
+--------------------------------
+## isRedoAvailable()
+
+返回类型：bool
+
+属性 redoAvailable 的获取器。
+
+
+--------------------------------
+## isUndoAvailable()
+
+返回类型：bool
+
+属性 undoAvailable 的获取器。
+
+
+--------------------------------
+## maxLength()
+
+返回类型：int
+
+属性 maxLength 的获取器。
+
+
+--------------------------------
+## paste()
+
+将剪贴板的文本插入到光标位置，删除任何选定的文本，前提是行编辑不是只读的。
+
+如果最终结果对当前验证器无效，则不会发生任何事情。
+
+
+--------------------------------
+## placeholderText()
+
+返回类型：str
+
+属性 placeholderText 的获取方法。
+
+
+--------------------------------
+## redo()
+
+如果可重做，则重做上一次操作。
+
+
+--------------------------------
+## returnPressed()
+
+当使用 Return 或 Enter 键时发出此信号。
+
+
+--------------------------------
+## selectAll()
+
+选择所有文本（突出显示）并将光标移动到末尾。
+
+
+--------------------------------
+## selectedText()
+
+返回类型：str
+
+属性 selectedText 的获取方法。
+
+
+--------------------------------
+## selectionChanged()
+
+每当选择改变时就会发射此信号。
+
+
+--------------------------------
+## selectionEnd()
+
+返回类型：int
+
+返回行编辑中选择内容之后直接显示的字符的索引（如果未选择文本，则返回 -1）。
+
+
+--------------------------------
+## selectionLength()
+
+返回类型：int
+
+返回选择的长度。
+
+
+--------------------------------
+## selectionStart()
+
+返回类型：int
+
+返回行编辑中第一个选定字符的索引（如果未选择文本，则返回 -1）。
+
+
+--------------------------------
+## setAlignment(flag)
+
+参数：
+
+- flag – Combination of AlignmentFlag
+
+属性对齐的设置者。
+
+
+--------------------------------
+## setClearButtonEnabled(enable)
+
+参数：
+
+- enable – bool
+
+属性 clearButtonEnabled 的设置者。
+
+
+--------------------------------
+## setCompleter(completer)
+
+参数：
+
+- completer – QCompleter
+
+设置此行编辑以提供来自完成器 c 的自动完成。使用 setCompletionMode() 设置完成模式。
+
+要将 QCompleter 与 QValidator 或 inputMask 一起使用，您需要确保提供给 QCompleter 的模型包含有效条目。您可以使用 QSortFilterProxyModel 来确保 QCompleter 的模型仅包含有效条目。
+
+要删除完成器并禁用自动完成，请传递一个 nullptr。
+
+
+--------------------------------
+## setCursorMoveStyle(style)
+
+参数：
+
+- style – CursorMoveStyle
+
+属性 cursorMoveStyle 的设置器。
+
+
+--------------------------------
+## setCursorPosition(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 cursorPosition 的设置器。
+
+
+--------------------------------
+## setDragEnabled(b)
+
+参数：
+
+- b – bool
+
+属性 dragEnabled 的设置者。
+
+
+--------------------------------
+## setEchoMode(arg__1)
+
+参数：
+
+- arg__1 – EchoMode
+
+属性 echoMode 的设置者。
+
+
+--------------------------------
+## setFrame(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性框架的设置者。
+
+
+--------------------------------
+## setInputMask(inputMask)
+
+参数：
+
+- inputMask – str
+
+属性 inputMask 的设置者。
+
+
+--------------------------------
+## setMaxLength(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 maxLength 的设置者。
+
+
+--------------------------------
+## setModified(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性的设置者已修改。
+
+
+--------------------------------
+## setPlaceholderText(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 placeholderText 的设置者。
+
+
+--------------------------------
+## setReadOnly(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性 readOnly 的设置者。
+
+
+--------------------------------
+## setSelection(arg__1, arg__2)
+
+参数：
+
+- arg__1 – int
+- arg__2 – int
+
+从位置 start 选择文本，长度为字符数。允许使用负长度。
+
+
+--------------------------------
+## setText(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性文本的设置者。
+
+
+--------------------------------
+## setTextMargins(margins)
+
+参数：
+
+- margins – QMargins
+
+设置框架内文本周围的边距。
+
+
+--------------------------------
+## setTextMargins(left, top, right, bottom)
+
+参数：
+
+- left – int
+- top – int
+- right – int
+- bottom – int
+
+设置框架内文本周围的边距，包括左边距、上边距、右边距和下边距。
+
+
+--------------------------------
+## setValidator(arg__1)
+
+参数：
+
+- arg__1 – QValidator
+
+将行编辑值的验证器设置为 v。
+
+仅当 v 验证行编辑的内容为可接受时，才会发出行编辑的 returnPressed() 和 editingFinished() 信号。用户可以在编辑期间将内容更改为任何中间值，但无法将文本编辑为 v 验证为无效的值。
+
+这允许您限制编辑完成后将存储的文本，同时让用户有足够的自由将文本从一个有效状态编辑到另一个有效状态。
+
+要删除当前输入验证器，请传递 nullptr。初始设置是没有输入验证器（接受任何输入，最大长度为 maxLength() ）。
+
+
+--------------------------------
+## text()
+
+返回类型：str
+
+属性 text 的获取器。
+
+
+--------------------------------
+## textChanged(arg__1)
+
+参数：
+
+- arg__1 – str
+
+每当文本发生变化时，都会发出此信号。text 参数是新文本。
+
+与 textEdited() 不同，当以编程方式更改文本（例如通过调用 setText() ）时也会发出此信号。
+
+属性 text 的通知信号。
+
+
+--------------------------------
+## textEdited(arg__1)
+
+参数：
+
+- arg__1 – str
+
+每当编辑文本时都会发出此信号。文本参数是新文本。
+
+与 textChanged() 不同，当以编程方式更改文本（例如通过调用 setText() ）时不会发出此信号。
+
+
+--------------------------------
+## textMargins()
+
+返回类型：QMargins
+
+返回小部件的文本边距。
+
+
+--------------------------------
+## undo()
+
+如果可撤消，则撤消上一个操作。取消选择任何当前选择，并将选择开始更新为当前光标位置。
+
+
+--------------------------------
+## validator()
+
+返回类型：QValidator
+
+返回指向当前输入验证器的指针，如果未设置验证器，则返回 None。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.md b/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.md
new file mode 100644
index 0000000..981e4ae
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QLineEdit.md
@@ -0,0 +1,1339 @@
+
+[Chinese doc](QLineEdit.CN.md)
+
+# class QLineEdit
+
+The QLineEdit widget is a one-line text editor.
+
+
+# Synopsis
+
+## Properties
+
+- [acceptableInput](#property-acceptableinput--bool)
+
+    Whether the input satisfies the inputMask and the validator.
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    Of the line edit.
+
+- [clearButtonEnabled](#property-clearbuttonenabled--bool)
+
+    Whether the line edit displays a clear button when it is not empty.
+
+- [cursorMoveStyle](#property-cursormovestyle--qtcursormovestyle)
+
+    Movement style of the cursor in this line edit.
+
+- [cursorPosition](#property-cursorposition--int)
+
+    Current cursor position for this line edit.
+
+- [displayText](#property-displaytext--str)
+
+    Displayed text.
+
+- [dragEnabled](#property-dragenabled--bool)
+
+    Whether the line edit starts a drag if the user presses and moves the mouse on some selected text.
+
+- [echoMode](#property-echomode--qlineeditechomode)
+
+    Line edit’s echo mode.
+
+- [frame](#property-frame--bool)
+
+    Whether the line edit draws itself with a frame.
+
+- [hasSelectedText](#property-hasselectedtext--bool)
+
+    Whether there is any text selected.
+
+- [inputMask](#property-inputmask--str)
+
+    Validation input mask.
+
+- [maxLength](#property-maxlength--int)
+
+    Maximum permitted length of the text.
+
+- [modified](#property-modified--bool)
+
+    Whether the line edit’s contents has been modified by the user.
+
+- [placeholderText](#property-placeholdertext--str)
+
+    Line edit’s placeholder text.
+
+- [readOnly](#property-readonly--bool)
+
+    Whether the line edit is read-only.
+
+- [redoAvailable](#property-redoavailable--bool)
+
+    Whether redo is available.
+
+- [selectedText](#property-selectedtext--str)
+
+    Selected text.
+
+- [text](#property-text--str)
+
+    Line edit’s text.
+
+- [undoAvailable](#property-undoavailable--bool)
+
+    Whether undo is available.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addAction()](#addactionaction-position)
+
+- [def alignment()](#alignment)
+
+- [def backspace()](#backspace)
+
+- [def completer()](#completer)
+
+- [def createStandardContextMenu()](#createstandardcontextmenu)
+
+- [def cursorBackward()](#cursorbackwardmark-steps1)
+
+- [def cursorForward()](#cursorforwardmark-steps1)
+
+- [def cursorMoveStyle()](#cursormovestyle)
+
+- [def cursorPosition()](#cursorposition)
+
+- [def cursorPositionAt()](#cursorpositionatpos)
+
+- [def cursorRect()](#cursorrect)
+
+- [def cursorWordBackward()](#cursorwordbackwardmark)
+
+- [def cursorWordForward()](#cursorwordforwardmark)
+
+- [def del_()](#del_)
+
+- [def deselect()](#deselect)
+
+- [def displayText()](#displaytext)
+
+- [def dragEnabled()](#dragenabled)
+
+- [def echoMode()](#echomode)
+
+- [def end()](#endmark)
+
+- [def hasAcceptableInput()](#hasacceptableinput)
+
+- [def hasFrame()](#hasframe)
+
+- [def hasSelectedText()](#hasselectedtext)
+
+- [def home()](#homemark)
+
+- [def inputMask()](#inputmask)
+
+- [def inputMethodQuery()](#inputmethodqueryproperty-argument)
+
+- [def insert()](#insertarg__1)
+
+- [def isClearButtonEnabled()](#isclearbuttonenabled)
+
+- [def isModified()](#ismodified)
+
+- [def isReadOnly()](#isreadonly)
+
+- [def isRedoAvailable()](#isredoavailable)
+
+- [def isUndoAvailable()](#isundoavailable)
+
+- [def maxLength()](#maxlength)
+
+- [def placeholderText()](#placeholdertext)
+
+- [def selectedText()](#selectedtext)
+
+- [def selectionEnd()](#selectionend)
+
+- [def selectionLength()](#selectionlength)
+
+- [def selectionStart()](#selectionstart)
+
+- [def setAlignment()](#setalignmentflag)
+
+- [def setClearButtonEnabled()](#setclearbuttonenabledenable)
+
+- [def setCompleter()](#setcompletercompleter)
+
+- [def setCursorMoveStyle()](#setcursormovestylestyle)
+
+- [def setCursorPosition()](#setcursorpositionarg__1)
+
+- [def setDragEnabled()](#setdragenabledb)
+
+- [def setEchoMode()](#setechomodearg__1)
+
+- [def setFrame()](#setframearg__1)
+
+- [def setInputMask()](#setinputmaskinputmask)
+
+- [def setMaxLength()](#setmaxlengtharg__1)
+
+- [def setModified()](#setmodifiedarg__1)
+
+- [def setPlaceholderText()](#setplaceholdertextarg__1)
+
+- [def setReadOnly()](#setreadonlyarg__1)
+
+- [def setSelection()](#setselectionarg__1-arg__2)
+
+- [def setTextMargins()](#settextmarginsmargins)
+
+- [def setValidator()](#setvalidatorarg__1)
+
+- [def text()](#text)
+
+- [def textMargins()](#textmargins)
+
+- [def validator()](#validator)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def clear()](#clear)
+
+- [def copy()](#copy)
+
+- [def cut()](#cut)
+
+- [def paste()](#paste)
+
+- [def redo()](#redo)
+
+- [def selectAll()](#selectall)
+
+- [def setText()](#settextarg__1)
+
+- [def undo()](#undo)
+
+
+## Signals
+
+- [def cursorPositionChanged()](#cursorpositionchangedarg__1-arg__2)
+
+- [def editingFinished()](#editingfinished)
+
+- [def inputRejected()](#inputrejected)
+
+- [def returnPressed()](#returnpressed)
+
+- [def selectionChanged()](#selectionchanged)
+
+- [def textChanged()](#textchangedarg__1)
+
+- [def textEdited()](#texteditedarg__1)
+
+
+# Detailed Description
+
+A line edit allows users to enter and edit a single line of plain text with useful editing functions, including undo and redo, cut and paste, and drag and drop.
+
+By changing the echoMode() of a line edit, it can also be used as a write-only field for inputs such as passwords.
+
+QTextEdit is a related class that allows multi-line, rich text editing.
+
+
+## Constraining Text
+
+Use maxLength to define the maximum permitted length of a text. You can use a inputMask and setValidator() to further constrain the text content.
+
+
+## Editing Text
+
+You can change the text with setText() or insert() . Use text() to retrieve the text and displayText() to retrieve the displayed text (which may be different, see EchoMode ). You can select the text with setSelection() or selectAll() , and you can cut() , copy() , and paste() the selection. To align the text, use setAlignment() .
+
+When the text changes, the textChanged() signal is emitted. When the text changes in some other way than by calling setText() , the textEdited() signal is emitted. When the cursor is moved, the cursorPositionChanged() signal is emitted. And when the Return or Enter key is selected, the returnPressed() signal is emitted.
+
+When text editing is finished, either because the line edit lost focus or Return/Enter was selected, the editingFinished() signal is emitted.
+
+If the line edit focus is lost without any text changes, the editingFinished() signal won’t be emitted.
+
+If there is a validator set on the line edit, the returnPressed() / editingFinished() signals will only be emitted if the validator returns QValidator::Acceptable.
+
+For more information on the many ways that QLineEdit can be used, see Line Edits Example , which also provides a selection of line edit examples that show the effects of various properties and validators on the input and output supplied by the user.
+
+
+## Setting a Frame
+
+By default, QLineEdits have a frame as specified in the platform style guides. You can turn the frame off by calling setFrame (false).
+
+
+## Default Key Bindings
+
+The table below describes the default key bindings.
+
+Any other keystroke that represents a valid character, will cause the character to be inserted into the line edit.
+
+
+--------------------------------
+## class ActionPosition
+
+This enum type describes how a line edit should display the action widgets to be added.
+
+| Constant                   | Description |
+| -------------------------- | ----------- |
+| QLineEdit.LeadingPosition  | The widget is displayed to the left of the text when using layout direction Qt::LeftToRight or to the right when using Qt::RightToLeft, respectively. |
+| QLineEdit.TrailingPosition | The widget is displayed to the right of the text when using layout direction Qt::LeftToRight or to the left when using Qt::RightToLeft, respectively. |
+
+
+--------------------------------
+## class EchoMode
+
+This enum type describes how a line edit should display its contents.
+
+| Constant                     | Description |
+| ---------------------------- | ----------- |
+| QLineEdit.Normal             | Display characters as they are entered. This is the default. |
+| QLineEdit.NoEcho             | Do not display anything. This may be appropriate for passwords where even the length of the password should be kept secret. |
+| QLineEdit.Password           | Display platform-dependent password mask characters instead of the characters actually entered. |
+| QLineEdit.PasswordEchoOnEdit | Display characters only while they are entered. Otherwise, display characters as with Password. |
+
+
+--------------------------------
+## property acceptableInput : bool
+
+This property holds Whether the input satisfies the inputMask and the validator..
+
+By default, this property is true.
+
+Access functions:
+
+- hasAcceptableInput()
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+This property holds The alignment of the line edit..
+
+Both horizontal and vertical alignment is allowed here, Qt::AlignJustify will map to Qt::AlignLeft.
+
+By default, this property contains a combination of Qt::AlignLeft and Qt::AlignVCenter.
+
+Access functions:
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property clearButtonEnabled : bool
+
+This property holds Whether the line edit displays a clear button when it is not empty..
+
+If enabled, the line edit displays a trailing clear button when it contains some text. Otherwise, the line edit does not show a clear button (the default).
+
+Access functions:
+
+- isClearButtonEnabled()
+- setClearButtonEnabled()
+
+
+--------------------------------
+## property cursorMoveStyle : Qt.CursorMoveStyle
+
+This property holds The movement style of the cursor in this line edit..
+
+When this property is set to Qt::VisualMoveStyle, the line edit will use a visual movement style. Using the left arrow key will always cause the cursor to move left, regardless of the text’s writing direction. The same behavior applies to the right arrow key.
+
+When the property is set to Qt::LogicalMoveStyle (the default), within a left-to-right (LTR) text block, using the left arrow key will increase the cursor position, whereas using the right arrow key will decrease the cursor position. If the text block is right-to-left (RTL), the opposite behavior applies.
+
+Access functions:
+
+- cursorMoveStyle()
+- setCursorMoveStyle()
+
+
+--------------------------------
+## property cursorPosition : int
+
+This property holds The current cursor position for this line edit..
+
+Setting the cursor position causes a repaint when appropriate.
+
+By default, this property contains a value of 0.
+
+Access functions:
+
+- cursorPosition()
+- setCursorPosition()
+
+
+--------------------------------
+## property displayText : str
+
+This property holds The displayed text..
+
+If echoMode is Normal , this returns the same as text() . If EchoMode is Password or PasswordEchoOnEdit , it returns a string of platform-dependent password mask characters (e.g. “******”). If EchoMode is NoEcho , it returns an empty string.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- displayText()
+
+
+--------------------------------
+## property dragEnabled : bool
+
+This property holds Whether the line edit starts a drag if the user presses and moves the mouse on some selected text..
+
+Dragging is disabled by default.
+
+Access functions:
+
+- dragEnabled()
+- setDragEnabled()
+
+
+--------------------------------
+## property echoMode : QLineEdit.EchoMode
+
+This property holds The line edit’s echo mode..
+
+The echo mode determines how the text entered in the line edit is displayed (or echoed) to the user.
+
+The most common setting is Normal , in which the text entered by the user is displayed verbatim. QLineEdit also supports modes that allow the entered text to be suppressed or obscured: these include NoEcho , Password and PasswordEchoOnEdit .
+
+The widget’s display and the ability to copy or drag the text is affected by this setting.
+
+By default, this property is set to Normal .
+
+Access functions:
+
+- echoMode()
+- setEchoMode()
+
+
+--------------------------------
+## property frame : bool
+
+This property holds Whether the line edit draws itself with a frame..
+
+If enabled (the default), the line edit draws itself inside a frame. Otherwise, the line edit draws itself without any frame.
+
+Access functions:
+
+- hasFrame()
+- setFrame()
+
+
+--------------------------------
+## property hasSelectedText : bool
+
+This property holds Whether there is any text selected..
+
+hasSelectedText() returns true if some or all of the text has been selected by the user. Otherwise, it returns false.
+
+By default, this property is false.
+
+Access functions:
+
+- hasSelectedText()
+
+
+--------------------------------
+## property inputMask : str
+
+This property holds The validation input mask..
+
+Sets the QLineEdit ‘s validation mask. Validators can be used instead of, or in conjunction with masks; see setValidator() . The default is an empty string, which means that no input mask is used.
+
+To unset the mask and return to normal QLineEdit operation, pass an empty string.
+
+The input mask is an input template string. It can contain the following elements:
+
+|                 |          |
+| --------------- | -------- |
+| Mask Characters | Defines the Category of input characters that are considered valid in this position. |
+| Meta Characters | Various special meanings (see details below).              |
+| Separators      | All other characters are regarded as immutable separators. |
+
+The following table shows the mask and meta characters that can be used in an input mask.
+
+| Mask Character | Meaning |
+| -------------- | ------- |
+| A              | Character of the Letter category required, such as A-Z, a-z. |
+| a              | Character of the Letter category permitted but not required. |
+| N              | Character of the Letter or Number category required, such as A-Z, a-z, 0-9. |
+| n              | Character of the Letter or Number category permitted but not required. |
+| X              | Any non-blank character required.                            |
+| x              | Any non-blank character permitted but not required.          |
+| 9              | Character of the Number category required, such as 0-9.      |
+| 0              | Character of the Number category permitted but not required. |
+| D              | Character of the Number category and larger than zero required, such as 1-9. |
+| d              | Character of the Number category and larger than zero permitted but not required, such as 1-9. |
+| #              | Character of the Number category, or plus/minus sign permitted but not required. |
+| H              | Hexadecimal character required. A-F, a-f, 0-9.               |
+| h              | Hexadecimal character permitted but not required.            |
+| B              | Binary character required. 0-1.                              |
+| b              | Binary character permitted but not required.                 |
+
+| Meta Character | Meaning                                             |
+| -------------- | --------------------------------------------------- |
+| >              | All following alphabetic characters are uppercased. |
+| <              | All following alphabetic characters are lowercased. |
+| !              | Switch off case conversion.                         |
+| ;c             | Terminates the input mask and sets the blank character to c. |
+| [ ] { }        | Reserved.                                           |
+| \              | Use \ to escape the special characters listed above to use them as separators. |
+
+When created or cleared, the line edit will be filled with a copy of the input mask string where the meta characters have been removed, and the mask characters have been replaced with the blank character (by default, a space).
+
+When an input mask is set, the text() method returns a modified copy of the line edit content where all the blank characters have been removed. The unmodified content can be read using displayText() .
+
+The hasAcceptableInput() method returns false if the current content of the line edit does not fulfill the requirements of the input mask.
+
+Examples:
+
+| Mask                | Notes                      |
+| ------------------- | -------------------------- |
+| 000.000.000.000;_   | IP address; blanks are _.  |
+| HH:HH:HH:HH:HH:HH;_ | MAC address                |
+| 0000-00-00          | ISO Date; blanks are space |
+| >AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;# | License number; blanks are # and all (alphabetic) characters are converted to uppercase. |
+
+To get range control (e.g., for an IP address) use masks together with validators .
+
+Access functions:
+
+- inputMask()
+- setInputMask()
+
+
+--------------------------------
+## property maxLength : int
+
+This property holds The maximum permitted length of the text..
+
+If the text is too long, it is truncated at the limit.
+
+If truncation occurs, any selected text will be unselected, the cursor position is set to 0, and the first part of the string is shown.
+
+If the line edit has an input mask, the mask defines the maximum string length.
+
+By default, this property contains a value of 32767.
+
+Access functions:
+
+- maxLength()
+- setMaxLength()
+
+
+--------------------------------
+## property modified : bool
+
+This property holds Whether the line edit’s contents has been modified by the user..
+
+The modified flag is never read by QLineEdit ; it has a default value of false and is changed to true whenever the user changes the line edit’s contents.
+
+This is useful for things that need to provide a default value but do not start out knowing what the default should be (for example, it depends on other fields on the form). Start the line edit without the best default, and when the default is known, if modified() returns false (the user hasn’t entered any text), insert the default value.
+
+Calling setText() resets the modified flag to false.
+
+Access functions:
+
+- isModified()
+- setModified()
+
+
+--------------------------------
+## property placeholderText : str
+
+This property holds The line edit’s placeholder text..
+
+Setting this property makes the line edit display a grayed-out placeholder text as long as the line edit is empty.
+
+Normally, an empty line edit shows the placeholder text even when it has focus. However, if the content is horizontally centered, the placeholder text is not displayed under the cursor when the line edit has focus.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property readOnly : bool
+
+This property holds Whether the line edit is read-only..
+
+In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text (if echoMode() is Normal ), but cannot edit it.
+
+QLineEdit does not show a cursor in read-only mode.
+
+By default, this property is false.
+
+Access functions:
+
+- isReadOnly()
+- setReadOnly()
+
+
+--------------------------------
+## property redoAvailable : bool
+
+This property holds Whether redo is available..
+
+Redo becomes available once the user has performed one or more undo operations on the text in the line edit.
+
+By default, this property is false.
+
+Access functions:
+
+- isRedoAvailable()
+
+
+--------------------------------
+## property selectedText : str
+
+This property holds The selected text..
+
+If there is no selected text, this property’s value is an empty string.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- selectedText()
+
+
+--------------------------------
+## property text : str
+
+This property holds The line edit’s text..
+
+Setting this property clears the selection, clears the undo/redo history, moves the cursor to the end of the line, and resets the modified property to false. The text is not validated when inserted with setText().
+
+The text is truncated to maxLength() length.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- text()
+- setText()
+- Signal textChanged()
+
+
+--------------------------------
+## property undoAvailable : bool
+
+This property holds Whether undo is available..
+
+Undo becomes available once the user has modified the text in the line edit.
+
+By default, this property is false.
+
+Access functions:
+
+- isUndoAvailable()
+
+
+--------------------------------
+## __init__(arg__1[, parent=None])
+
+Parameters:
+
+- arg__1 – str
+- parent – QWidget
+
+Constructs a line edit containing the text contents as a child of parent.
+
+The cursor position is set to the end of the line and the maximum text length to 32767 characters.
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a line edit with no text.
+
+The maximum text length is set to 32767 characters.
+
+The parent argument is sent to the QWidget constructor.
+
+
+--------------------------------
+## addAction(icon, position)
+
+Parameters:
+
+- icon – QIcon
+- position – ActionPosition
+
+Return type: QAction
+
+This is an overloaded function.
+
+Creates a new action with the given icon at the position.
+
+
+--------------------------------
+## addAction(action, position)
+
+Parameters:
+
+- action – QAction
+- position – ActionPosition
+
+Adds the action to the list of actions at the position.
+
+
+--------------------------------
+## alignment()
+
+Return type: Combination of AlignmentFlag
+
+Getter of property alignment  .
+
+
+--------------------------------
+## backspace()
+
+If no text is selected, deletes the character to the left of the text cursor, and moves the cursor one position to the left. If any text is selected, the cursor is moved to the beginning of the selected text, and the selected text is deleted.
+
+
+--------------------------------
+## clear()
+
+Clears the contents of the line edit.
+
+
+--------------------------------
+## completer()
+
+Return type: QCompleter
+
+Returns the current QCompleter that provides completions.
+
+
+--------------------------------
+## copy()
+
+Copies the selected text to the clipboard, if there is any, and if echoMode() is Normal .
+
+
+--------------------------------
+## createStandardContextMenu()
+
+Return type: QMenu
+
+Creates the standard context menu, which is shown when the user clicks on the line edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu’s ownership is transferred to the caller.
+
+
+--------------------------------
+## cursorBackward(mark[, steps=1])
+
+Parameters:
+
+- mark – bool
+- steps – int
+
+Moves the cursor back steps characters. If mark is true, each character moved over is added to the selection. If mark is false, the selection is cleared.
+
+
+--------------------------------
+## cursorForward(mark[, steps=1])
+
+Parameters:
+
+- mark – bool
+- steps – int
+
+Moves the cursor forward steps characters. If mark is true, each character moved over is added to the selection. If mark is false, the selection is cleared.
+
+
+--------------------------------
+## cursorMoveStyle()
+
+Return type: CursorMoveStyle
+
+Getter of property cursorMoveStyle  .
+
+
+--------------------------------
+## cursorPosition()
+
+Return type: int
+
+Getter of property cursorPosition  .
+
+
+--------------------------------
+## cursorPositionAt(pos)
+
+Parameters:
+
+- pos – QPoint
+
+Return type: int
+
+Returns the cursor position under the point pos.
+
+
+--------------------------------
+## cursorPositionChanged(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – int
+- arg__2 – int
+
+This signal is emitted whenever the cursor moves. The previous position is given by oldPos, and the new position by newPos.
+
+
+--------------------------------
+## cursorRect()
+
+Return type: QRect
+
+Returns a rectangle that includes the line edit cursor.
+
+
+--------------------------------
+## cursorWordBackward(mark)
+
+Parameters:
+
+- mark – bool
+
+Moves the cursor one word backward. If mark is true, the word is also selected.
+
+
+--------------------------------
+## cursorWordForward(mark)
+
+Parameters:
+
+- mark – bool
+
+Moves the cursor one word forward. If mark is true, the word is also selected.
+
+
+--------------------------------
+## cut()
+
+Copies the selected text to the clipboard and deletes it, if there is any, and if echoMode() is Normal .
+
+If the current validator disallows deleting the selected text, cut() will copy without deleting.
+
+
+--------------------------------
+## del_()
+## deselect()
+
+Deselects any selected text.
+
+
+--------------------------------
+## displayText()
+
+Return type: str
+
+Getter of property displayText  .
+
+
+--------------------------------
+## dragEnabled()
+
+Return type: bool
+
+Getter of property dragEnabled  .
+
+
+--------------------------------
+## echoMode()
+
+Return type: EchoMode
+
+Getter of property echoMode  .
+
+--------------------------------
+## editingFinished()
+
+This signal is emitted when the Return or Enter key is used, or if the line edit loses focus and its contents have changed since the last time this signal was emitted.
+
+
+--------------------------------
+## end(mark)
+
+Parameters:
+
+- mark – bool
+
+Moves the text cursor to the end of the line unless it is already there. If mark is true, text is selected towards the last position. Otherwise, any selected text is unselected if the cursor is moved.
+
+
+--------------------------------
+## hasAcceptableInput()
+
+Return type: bool
+
+Getter of property acceptableInput  .
+
+
+--------------------------------
+## hasFrame()
+
+Return type: bool
+
+Getter of property frame  .
+
+
+--------------------------------
+## hasSelectedText()
+
+Return type: bool
+
+Getter of property hasSelectedText  .
+
+
+--------------------------------
+## home(mark)
+
+Parameters:
+
+- mark – bool
+
+Moves the text cursor to the beginning of the line unless it is already there. If mark is true, text is selected towards the first position. Otherwise, any selected text is unselected if the cursor is moved.
+
+
+--------------------------------
+## initStyleOption(option)
+
+Parameters:
+
+- option – QStyleOptionFrame
+
+Initialize option with the values from this QLineEdit . This method is useful for subclasses when they need a QStyleOptionFrame , but don’t want to fill in all the information themselves.
+
+
+--------------------------------
+## inputMask()
+
+Return type: str
+
+Getter of property inputMask  .
+
+
+--------------------------------
+## inputMethodQuery(property, argument)
+
+Parameters:
+
+- property – InputMethodQuery
+- argument – object
+
+Return type: object
+
+
+--------------------------------
+## inputRejected()
+
+This signal is emitted when the user uses a key that is not considered to be valid input. For example, if using a key results in a validator’s validate() call to return Invalid. Another case is when trying to enter more characters beyond the maximum length of the line edit.
+
+
+--------------------------------
+## insert(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Deletes any selected text, inserts newText, and validates the result. If it is valid, it sets the new text as the new contents of the line edit.
+
+
+--------------------------------
+## isClearButtonEnabled()
+
+Return type: bool
+
+Getter of property clearButtonEnabled  .
+
+
+--------------------------------
+## isModified()
+
+Return type: bool
+
+Getter of property modified  .
+
+
+--------------------------------
+## isReadOnly()
+
+Return type: bool
+
+Getter of property readOnly  .
+
+
+--------------------------------
+## isRedoAvailable()
+
+Return type: bool
+
+Getter of property redoAvailable  .
+
+
+--------------------------------
+## isUndoAvailable()
+
+Return type: bool
+
+Getter of property undoAvailable  .
+
+
+--------------------------------
+## maxLength()
+
+Return type: int
+
+Getter of property maxLength  .
+
+
+--------------------------------
+## paste()
+
+Inserts the clipboard’s text at the cursor position, deleting any selected text, providing the line edit is not read-only .
+
+If the end result would be invalid to the current validator , nothing happens.
+
+
+--------------------------------
+## placeholderText()
+
+Return type: str
+
+Getter of property placeholderText  .
+
+
+--------------------------------
+## redo()
+
+Redoes the last operation if redo is available .
+
+
+--------------------------------
+## returnPressed()
+
+This signal is emitted when the Return or Enter key is used.
+
+
+--------------------------------
+## selectAll()
+
+Selects all the text (highlights it) and moves the cursor to the end.
+
+
+--------------------------------
+## selectedText()
+
+Return type: str
+
+Getter of property selectedText  .
+
+
+--------------------------------
+## selectionChanged()
+
+This signal is emitted whenever the selection changes.
+
+
+--------------------------------
+## selectionEnd()
+
+Return type: int
+
+Returns the index of the character directly after the selection in the line edit (or -1 if no text is selected).
+
+
+--------------------------------
+## selectionLength()
+
+Return type: int
+
+Returns the length of the selection.
+
+
+--------------------------------
+## selectionStart()
+
+Return type: int
+
+Returns the index of the first selected character in the line edit (or -1 if no text is selected).
+
+
+--------------------------------
+## setAlignment(flag)
+
+Parameters:
+
+- flag – Combination of AlignmentFlag
+
+Setter of property alignment  .
+
+
+--------------------------------
+## setClearButtonEnabled(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property clearButtonEnabled  .
+
+
+--------------------------------
+## setCompleter(completer)
+
+Parameters:
+
+- completer – QCompleter
+
+Sets this line edit to provide auto completions from the completer, c. The completion mode is set using setCompletionMode() .
+
+To use a QCompleter with a QValidator or inputMask , you need to ensure that the model provided to QCompleter contains valid entries. You can use the QSortFilterProxyModel to ensure that the QCompleter ‘s model contains only valid entries.
+
+To remove the completer and disable auto-completion, pass a nullptr.
+
+
+--------------------------------
+## setCursorMoveStyle(style)
+
+Parameters:
+
+- style – CursorMoveStyle
+
+Setter of property cursorMoveStyle  .
+
+
+--------------------------------
+## setCursorPosition(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property cursorPosition  .
+
+
+--------------------------------
+## setDragEnabled(b)
+
+Parameters:
+
+- b – bool
+
+Setter of property dragEnabled  .
+
+
+--------------------------------
+## setEchoMode(arg__1)
+
+Parameters:
+
+- arg__1 – EchoMode
+
+Setter of property echoMode  .
+
+
+--------------------------------
+## setFrame(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property frame  .
+
+
+--------------------------------
+## setInputMask(inputMask)
+
+Parameters:
+
+- inputMask – str
+
+Setter of property inputMask  .
+
+
+--------------------------------
+## setMaxLength(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property maxLength  .
+
+
+--------------------------------
+## setModified(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property modified  .
+
+
+--------------------------------
+## setPlaceholderText(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property placeholderText  .
+
+
+--------------------------------
+## setReadOnly(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property readOnly  .
+
+
+--------------------------------
+## setSelection(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – int
+- arg__2 – int
+
+Selects text from position start and for length characters. Negative lengths are allowed.
+
+
+--------------------------------
+## setText(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property text  .
+
+
+--------------------------------
+## setTextMargins(margins)
+
+Parameters:
+
+- margins – QMargins
+
+Sets the margins around the text inside the frame.
+
+
+--------------------------------
+## setTextMargins(left, top, right, bottom)
+
+Parameters:
+
+- left – int
+- top – int
+- right – int
+- bottom – int
+
+Sets the margins around the text inside the frame to have the sizes left, top, right, and bottom.
+
+
+--------------------------------
+## setValidator(arg__1)
+
+Parameters:
+
+- arg__1 – QValidator
+
+Sets the validator for values of line edit to v.
+
+The line edit’s returnPressed() and editingFinished() signals will only be emitted if v validates the line edit’s content as Acceptable. The user may change the content to any Intermediate value during editing, but will be prevented from editing the text to a value that v validates as Invalid.
+
+This allows you to constrain the text that will be stored when editing is done while leaving users with enough freedom to edit the text from one valid state to another.
+
+To remove the current input validator, pass nullptr. The initial setting is to have no input validator (any input is accepted up to maxLength() ).
+
+
+--------------------------------
+## text()
+
+Return type: str
+
+Getter of property text  .
+
+
+--------------------------------
+## textChanged(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is emitted whenever the text changes. The text argument is the new text.
+
+Unlike textEdited() , this signal is also emitted when the text is changed programmatically, for example, by calling setText() .
+
+Notification signal of property text  .
+
+
+--------------------------------
+## textEdited(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is emitted whenever the text is edited. The text argument is the new text.
+
+Unlike textChanged() , this signal is not emitted when the text is changed programmatically, for example, by calling setText() .
+
+
+--------------------------------
+## textMargins()
+
+Return type: QMargins
+
+Returns the widget’s text margins.
+
+
+--------------------------------
+## undo()
+
+Undoes the last operation if undo is available . Deselects any current selection, and updates the selection start to the current cursor position.
+
+
+--------------------------------
+## validator()
+
+Return type: QValidator
+
+Returns a pointer to the current input validator, or None if no validator has been set.

From 47539516c4ecba7d5aef32482044f5e19b476630 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 6 Aug 2024 19:16:10 +0800
Subject: [PATCH 29/38] [PyQt] Add QGroupBox doc.

---
 .../PyQt6/Class-0/QtWidget/QGroupBox.CN.md    | 323 ++++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QGroupBox.md   | 321 +++++++++++++++++
 2 files changed, 644 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QGroupBox.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QGroupBox.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.CN.md
new file mode 100644
index 0000000..3ad0aea
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.CN.md
@@ -0,0 +1,323 @@
+
+[English doc](QGroupBox.md)
+
+# class QGroupBox
+
+QGroupBox 小部件提供了一个带有标题的组合框。
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    组框标题的对齐方式。
+
+- [checkable](#property-checkable--bool)
+
+    组框的标题中是否有复选框。
+
+- [checked](#property-checked--bool)
+
+    组框是否被选中。
+
+- [flat](#property-flat--bool)
+
+    组框是否涂成平面或带有框架。
+
+- [title](#property-title--str)
+
+    组框标题文本。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def alignment()](#alignment)
+
+- [def isCheckable()](#ischeckable)
+
+- [def isChecked()](#ischecked)
+
+- [def isFlat()](#isflat)
+
+- [def setAlignment()](#setalignmentalignment)
+
+- [def setCheckable()](#setcheckablecheckable)
+
+- [def setFlat()](#setflatflat)
+
+- [def setTitle()](#settitletitle)
+
+- [def title()](#title)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def setChecked()](#setcheckedchecked)
+
+
+## Signals
+
+- [def clicked()](#clickedcheckedfalse)
+
+- [def toggled()](#toggledarg__1)
+
+
+# Detailed Description
+
+组框提供框架、顶部的标题、键盘快捷键，并在其内部显示各种其他小部件。键盘快捷键将键盘焦点移动到组框的子小部件之一。
+
+QGroupBox 还允许您设置标题（通常在构造函数中设置）和标题的对齐方式。组框可以是可选中的。可选中组框中的子小部件的启用或禁用取决于组框是否被选中。
+
+您可以通过启用 flat 属性来最大限度地减少组框的空间消耗。在大多数样式中，启用此属性会导致删除框架的左、右和下边缘。
+
+QGroupBox 不会自动布局子小部件（通常是 QCheckBox 或 QRadioButton，但可以是任何小部件）。以下示例显示了如何使用布局设置 QGroupBox：
+
+```bash
+groupBox = QGroupBox(tr("Exclusive Radio Buttons"))
+radio1 = QRadioButton(tr("Radio button 1"))
+radio2 = QRadioButton(tr("Radio button 2"))
+radio3 = QRadioButton(tr("Radio button 3"))
+radio1.setChecked(True)
+```
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+此属性保存组框标题的对齐方式。
+
+大多数样式将标题放在框架顶部。可以使用以下列表中的单个值指定标题的水平对齐方式：
+
+- Qt::AlignLeft 将标题文本与组框左侧对齐。
+
+- Qt::AlignRight 将标题文本与组框右侧对齐。
+
+- Qt::AlignHCenter 将标题文本与组框水平中心对齐。
+
+默认对齐方式为 Qt::AlignLeft。
+
+访问函数：
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property checkable : bool
+
+此属性保存组框的标题中是否有复选框。
+
+如果此属性为真，则组框将使用复选框代替普通标签来显示其标题。 如果选中复选框，则组框的子项将被启用；否则，它们将被禁用且无法访问。
+
+默认情况下，组框不可选中。
+
+如果为组框启用了此属性，则还会首先检查它以确保其内容已启用。
+
+访问函数：
+
+- isCheckable()
+- setCheckable()
+
+
+--------------------------------
+## property checked : bool
+
+此属性保存组框是否被选中。
+
+如果组框是可选中的，则显示复选框。 如果复选框被选中，则组框的子项被启用；否则，子项被禁用，用户无法访问。
+
+默认情况下，可选中的组框也会被选中。
+
+访问函数：
+
+- isChecked()
+- setChecked()
+- Signal toggled()
+
+
+--------------------------------
+## property flat : bool
+
+此属性用于控制组框是平铺绘制还是带有框架。
+
+组框通常由一个周围框架组成，顶部带有标题。如果启用此属性，则在大多数样式中仅绘制框架的顶部；否则，将绘制整个框架。
+
+默认情况下，此属性处于禁用状态，即，除非明确指定，否则组框不是平铺的。
+
+访问函数：
+
+- isFlat()
+- setFlat()
+
+
+--------------------------------
+## property title : str
+
+此属性保存组框标题文本。
+
+如果标题包含一个与号 (’&’) 和一个字母，则组框标题文本将具有键盘快捷键。
+
+```python
+g.setTitle("User information")
+```
+
+在上面的示例中，Alt+U 将键盘焦点移至组框。有关详细信息，请参阅 QShortcut 文档（要显示实际的 & 符号，请使用“&&”）。
+
+没有默认标题文本。
+
+访问函数：
+
+- title()
+- setTitle()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+构造一个具有给定父级但没有标题的组合框小部件。
+
+
+--------------------------------
+## __init__(title[, parent=None])
+
+参数：
+
+- title – str
+- parent – QWidget
+
+构造具有给定标题和父级的组合框。
+
+
+--------------------------------
+## alignment()
+
+返回类型：Combination of AlignmentFlag
+
+属性 alignment 的获取器。
+
+
+--------------------------------
+## clicked([checked=false])
+
+参数：
+
+- checked – bool
+
+当复选框被激活（即，当鼠标光标位于按钮内时按下然后释放）或键入快捷键时，会发出此信号。值得注意的是，如果您调用 setChecked() ，则不会发出此信号。
+
+如果复选框被选中，则 checked 为 true；如果复选框未被选中，则为 false。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionGroupBox
+
+用此 QGroupBox 中的值初始化选项。当子类需要 QStyleOptionGroupBox 但不想自己填写所有信息时，此方法很有用。
+
+
+--------------------------------
+## isCheckable()
+
+返回类型：bool
+
+属性 checkable 的获取器。
+
+
+--------------------------------
+## isChecked()
+
+返回类型：bool
+
+属性 checked 的获取器。
+
+
+--------------------------------
+## isFlat()
+
+返回类型：bool
+
+财产 单位 的 获得者 。
+
+
+--------------------------------
+## setAlignment(alignment)
+
+参数：
+
+- alignment – int
+
+
+--------------------------------
+## setCheckable(checkable)
+
+参数：
+
+- checkable – bool
+
+属性 checkable 的设置者。
+
+
+--------------------------------
+## setChecked(checked)
+
+参数：
+
+- checked – bool
+
+已检查属性的设置者。
+
+
+--------------------------------
+## setFlat(flat)
+
+参数：
+
+- flat – bool
+
+物业单位设置者。
+
+
+--------------------------------
+## setTitle(title)
+
+参数：
+
+- title – str
+
+财产所有权的设定者。
+
+
+--------------------------------
+## title()
+
+返回类型：str
+
+财产所有权的获取者。
+
+
+--------------------------------
+## toggled(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+如果组框是可勾选的，则在复选框被切换时发出此信号。如果复选框被勾选，则 on 为 true；否则为 false。
+
+属性 checked 的通知信号。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.md b/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.md
new file mode 100644
index 0000000..2b72d86
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QGroupBox.md
@@ -0,0 +1,321 @@
+
+[Chinese doc](QGroupBox.CN.md)
+
+# class QGroupBox
+
+The QGroupBox widget provides a group box frame with a title.
+
+
+# Synopsis
+
+## Properties
+
+- [alignment](#property-alignment--combination-of-qtalignmentflag)
+
+    The alignment of the group box title.
+
+- [checkable](#property-checkable--bool)
+
+    Whether the group box has a checkbox in its title.
+
+- [checked](#property-checked--bool)
+
+    Whether the group box is checked.
+
+- [flat](#property-flat--bool)
+
+    Whether the group box is painted flat or has a frame.
+
+- [title](#property-title--str)
+
+    The group box title text.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def alignment()](#alignment)
+
+- [def isCheckable()](#ischeckable)
+
+- [def isChecked()](#ischecked)
+
+- [def isFlat()](#isflat)
+
+- [def setAlignment()](#setalignmentalignment)
+
+- [def setCheckable()](#setcheckablecheckable)
+
+- [def setFlat()](#setflatflat)
+
+- [def setTitle()](#settitletitle)
+
+- [def title()](#title)
+
+
+## Virtual methods
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+
+## Slots
+
+- [def setChecked()](#setcheckedchecked)
+
+
+## Signals
+
+- [def clicked()](#clickedcheckedfalse)
+
+- [def toggled()](#toggledarg__1)
+
+
+# Detailed Description
+
+A group box provides a frame, a title on top, a keyboard shortcut, and displays various other widgets inside itself. The keyboard shortcut moves keyboard focus to one of the group box’s child widgets.
+
+QGroupBox also lets you set the title (normally set in the constructor) and the title’s alignment . Group boxes can be checkable . Child widgets in checkable group boxes are enabled or disabled depending on whether or not the group box is checked .
+
+You can minimize the space consumption of a group box by enabling the flat property. In most styles , enabling this property results in the removal of the left, right and bottom edges of the frame.
+
+QGroupBox doesn’t automatically lay out the child widgets (which are often QCheckBox es or QRadioButton s but can be any widgets). The following example shows how we can set up a QGroupBox with a layout:
+
+```bash
+groupBox = QGroupBox(tr("Exclusive Radio Buttons"))
+radio1 = QRadioButton(tr("Radio button 1"))
+radio2 = QRadioButton(tr("Radio button 2"))
+radio3 = QRadioButton(tr("Radio button 3"))
+radio1.setChecked(True)
+```
+
+
+--------------------------------
+## property alignment : Combination of Qt.AlignmentFlag
+
+This property holds the alignment of the group box title..
+
+Most styles place the title at the top of the frame. The horizontal alignment of the title can be specified using single values from the following list:
+
+- Qt::AlignLeft aligns the title text with the left-hand side of the group box.
+- Qt::AlignRight aligns the title text with the right-hand side of the group box.
+- Qt::AlignHCenter aligns the title text with the horizontal center of the group box.
+
+The default alignment is Qt::AlignLeft.
+
+Access functions:
+
+- alignment()
+- setAlignment()
+
+
+--------------------------------
+## property checkable : bool
+
+This property holds whether the group box has a checkbox in its title.
+
+If this property is true, the group box displays its title using a checkbox in place of an ordinary label. If the checkbox is checked, the group box’s children are enabled; otherwise, they are disabled and inaccessible.
+
+By default, group boxes are not checkable.
+
+If this property is enabled for a group box, it will also be initially checked to ensure that its contents are enabled.
+
+Access functions:
+
+- isCheckable()
+- setCheckable()
+
+
+--------------------------------
+## property checked : bool
+
+This property holds whether the group box is checked.
+
+If the group box is checkable, it is displayed with a check box. If the check box is checked, the group box’s children are enabled; otherwise, the children are disabled and are inaccessible to the user.
+
+By default, checkable group boxes are also checked.
+
+Access functions:
+
+- isChecked()
+- setChecked()
+- Signal toggled()
+
+
+--------------------------------
+## property flat : bool
+
+This property holds whether the group box is painted flat or has a frame.
+
+A group box usually consists of a surrounding frame with a title at the top. If this property is enabled, only the top part of the frame is drawn in most styles; otherwise, the whole frame is drawn.
+
+By default, this property is disabled, i.e., group boxes are not flat unless explicitly specified.
+
+Access functions:
+
+- isFlat()
+- setFlat()
+
+
+--------------------------------
+## property title : str
+
+This property holds the group box title text.
+
+The group box title text will have a keyboard shortcut if the title contains an ampersand (’&’) followed by a letter.
+
+```python
+g.setTitle("User information")
+```
+
+In the example above, Alt+U moves the keyboard focus to the group box. See the QShortcut documentation for details (to display an actual ampersand, use ‘&&’).
+
+There is no default title text.
+
+Access functions:
+
+- title()
+- setTitle()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a group box widget with the given parent but with no title.
+
+
+--------------------------------
+## __init__(title[, parent=None])
+
+Parameters:
+
+- title – str
+- parent – QWidget
+
+Constructs a group box with the given title and parent.
+
+
+--------------------------------
+## alignment()
+
+Return type: Combination of AlignmentFlag
+
+Getter of property alignment  .
+
+
+--------------------------------
+## clicked([checked=false])
+
+Parameters:
+
+- checked – bool
+
+This signal is emitted when the check box is activated (i.e., pressed down then released while the mouse cursor is inside the button), or when the shortcut key is typed. Notably, this signal is not emitted if you call setChecked() .
+
+If the check box is checked, checked is true; it is false if the check box is unchecked.
+
+
+--------------------------------
+## initStyleOption(option)
+
+Parameters:
+
+- option – QStyleOptionGroupBox
+
+Initialize option with the values from this QGroupBox . This method is useful for subclasses when they need a QStyleOptionGroupBox , but don’t want to fill in all the information themselves.
+
+
+--------------------------------
+## isCheckable()
+
+Return type: bool
+
+Getter of property checkable  .
+
+
+--------------------------------
+## isChecked()
+
+Return type: bool
+
+Getter of property checked  .
+
+
+--------------------------------
+## isFlat()
+
+Return type: bool
+
+Getter of property flat  .
+
+
+--------------------------------
+## setAlignment(alignment)
+
+Parameters:
+
+- alignment – int
+
+
+--------------------------------
+## setCheckable(checkable)
+
+Parameters:
+
+- checkable – bool
+
+Setter of property checkable  .
+
+
+--------------------------------
+## setChecked(checked)
+
+Parameters:
+
+- checked – bool
+
+Setter of property checked  .
+
+
+--------------------------------
+## setFlat(flat)
+
+Parameters:
+
+- flat – bool
+
+Setter of property flat  .
+
+
+--------------------------------
+## setTitle(title)
+
+Parameters:
+
+- title – str
+
+Setter of property title  .
+
+
+--------------------------------
+## title()
+
+Return type: str
+
+Getter of property title  .
+
+
+--------------------------------
+## toggled(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+If the group box is checkable, this signal is emitted when the check box is toggled. on is true if the check box is checked; otherwise, it is false.
+
+Notification signal of property checked  .

From 2ee20da70df9206c31f2f9e450522959d6aae2ed Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Tue, 6 Aug 2024 20:09:04 +0800
Subject: [PATCH 30/38] [PyQt] Add QApplication doc.

---
 .../PyQt6/Class-0/QtWidget/QApplication.CN.md | 842 ++++++++++++++++++
 .../PyQt6/Class-0/QtWidget/QApplication.md    | 842 ++++++++++++++++++
 2 files changed, 1684 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QApplication.CN.md
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QApplication.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QApplication.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QApplication.CN.md
new file mode 100644
index 0000000..457d2ac
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QApplication.CN.md
@@ -0,0 +1,842 @@
+
+[English doc](QApplication.md)
+
+# class QApplication
+
+QApplication 类管理 GUI 应用程序的控制流和主要设置。
+
+
+# Synopsis
+
+## Properties
+
+- [autoSipEnabled](#property-autosipenabled--bool)
+
+    切换自动 SIP（​​软件输入面板）可见性。
+
+- [cursorFlashTime](#property-cursorflashtime--int)
+
+    文本光标的闪烁时间（以毫秒为单位）。
+
+- [doubleClickInterval](#property-doubleclickinterval--int)
+
+    区分双击和两次连续鼠标单击的时间限制（以毫秒为单位）。
+
+- [keyboardInputInterval](#property-keyboardinputinterval--int)
+
+    区分一次按键和两次连续按键的时间限制（以毫秒为单位）。
+
+- [startDragDistance](#property-startdragdistance--int)
+
+    开始拖放操作所需的最小距离。
+
+- [startDragTime](#property-startdragtime--int)
+
+    开始拖放操作之前必须按住鼠标按钮的时间（以毫秒为单位）。
+
+- [styleSheet](#property-stylesheet--str)
+
+    应用程序样式表。
+
+- [wheelScrollLines](#property-wheelscrolllines--int)
+
+    当鼠标滚轮旋转时，小部件滚动的行数。
+
+
+## Methods
+
+- [def \_\_init__()](#initarg__1)
+
+- [def autoSipEnabled()](#autosipenabled)
+
+- [def exec_()](#exec_)
+
+- [def styleSheet()](#stylesheet)
+
+
+## Slots
+
+- [def setAutoSipEnabled()](#setautosipenabledenabled)
+
+- [def setStyleSheet()](#setstylesheetsheet)
+
+
+## Signals
+
+- [def focusChanged()](#focuschangedold-now)
+
+
+## Static functions
+
+- [def aboutQt()](#static-aboutqt)
+
+- [def activeModalWidget()](#static-activemodalwidget)
+
+- [def activePopupWidget()](#static-activepopupwidget)
+
+- [def activeWindow()](#static-activewindow)
+
+- [def alert()](#static-alertwidget-duration0)
+
+- [def allWidgets()](#static-allwidgets)
+
+- [def beep()](#static-beep)
+
+- [def closeAllWindows()](#static-closeallwindows)
+
+- [def cursorFlashTime()](#static-cursorflashtime)
+
+- [def doubleClickInterval()](#static-doubleclickinterval)
+
+- [def focusWidget()](#static-focuswidget)
+
+- [def font()](#static-fontarg__1)
+
+- [def fontMetrics()](#static-fontmetrics)
+
+- [def isEffectEnabled()](#static-iseffectenabledarg__1)
+
+- [def keyboardInputInterval()](#static-keyboardinputinterval)
+
+- [def palette()](#static-palettearg__1)
+
+- [def setActiveWindow()](#static-setactivewindowact)
+
+- [def setCursorFlashTime()](#static-setcursorflashtimearg__1)
+
+- [def setDoubleClickInterval()](#static-doubleclickinterval)
+
+- [def setEffectEnabled()](#static-seteffectenabledarg__1-enabletrue)
+
+- [def setFont()](#static-setfontarg__1-classnamenone)
+
+- [def setKeyboardInputInterval()](#static-setkeyboardinputintervalarg__1)
+
+- [def setPalette()](#static-setpalettearg__1-classnamenone)
+
+- [def setStartDragDistance()](#static-setstartdragdistancel)
+
+- [def setStartDragTime()](#static-setstartdragtimems)
+
+- [def setStyle()](#static-setstylearg__1)
+
+- [def setWheelScrollLines()](#static-setwheelscrolllinesarg__1)
+
+- [def startDragDistance()](#static-startdragdistance)
+
+- [def startDragTime()](#static-startdragtime)
+
+- [def style()](#static-style)
+
+- [def topLevelAt()](#static-toplevelatx-y)
+
+- [def topLevelWidgets()](#static-toplevelwidgets)
+
+- [def wheelScrollLines()](#static-wheelscrolllines)
+
+- [def widgetAt()](#static-widgetatp)
+
+
+## Detailed Description
+
+QApplication 专门化了 QGuiApplication，并增加了基于 QWidget 的应用程序所需的一些功能。它处理特定于窗口小部件的初始化和结束。
+
+对于使用 Qt 的任何 GUI 应用程序，无论应用程序在任何给定时间拥有 0、1、2 或更多窗口，都只有一个 QApplication 对象。对于不基于 QWidget 的 Qt 应用程序，请改用 QGuiApplication，因为它不依赖于 QtWidgets 库。
+
+一些 GUI 应用程序提供特殊的批处理模式，即提供用于执行任务而无需手动干预的命令行参数。在这种非 GUI 模式下，实例化一个简单的 QCoreApplication 往往就足以避免不必要地初始化图形用户界面所需的资源。以下示例显示了如何动态创建适当类型的应用程序实例：
+
+```python
+QCoreApplication* createApplication(int argc, char *argv[])
+
+    for i in range(1, argc):
+        if not qstrcmp(argv[i], "-no-gui"):
+            return QCoreApplication(argc, argv)
+
+    return QApplication(argc, argv)
+
+if __name__ == "__main__":
+
+app = QScopedPointer(createApplication(argc, argv))
+    if QApplication(app.data()):
+       # start GUI version...
+    else:
+       # start non-GUI version...
+
+    sys.exit(app.exec())
+```
+
+QApplication 对象可通过 instance() 函数访问，该函数返回一个与全局 qApp 指针等效的指针。
+
+QApplication 的主要职责包括：
+
+- 它使用用户的桌面设置（如 palette() 、 font() 和 doubleClickInterval() ）初始化应用程序。它会跟踪这些属性，以防用户全局更改桌面（例如通过某种控制面板）。
+
+- 它执行事件处理，这意味着它从底层窗口系统接收事件并将它们分派到相关小部件。通过使用 sendEvent() 和 postEvent()，您可以将自己的事件发送到小部件。
+
+- 它解析常见的命令行参数并相应地设置其内部状态。有关更多详细信息，请参阅下面的构造函数文档。
+
+- 它定义应用程序的外观，封装在 QStyle 对象中。这可以在运行时使用 setStyle() 进行更改。
+
+- 它通过 Translation() 提供用户可见的字符串的本地化。
+
+- 它提供了一些神奇的对象，如 clipboard()。
+
+- 它了解应用程序的窗口。您可以使用 widgetAt() 询问哪个小部件位于某个位置，获取 topLevelWidgets() 和 closeAllWindows() 的列表等。
+
+- 它管理应用程序的鼠标光标处理，请参阅 setOverrideCursor()
+
+由于 QApplication 对象执行了大量初始化，因此必须在创建与用户界面相关的任何其他对象之前创建它。QApplication 还处理常见的命令行参数。因此，在应用程序本身中对 argv 进行任何解释或修改之前创建它通常是一个好主意。
+
+|                 |          |
+| --------------- | -------- |
+| System settings | desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime() , setCursorFlashTime() , doubleClickInterval() , setDoubleClickInterval() , setKeyboardInputInterval() , wheelScrollLines() , setWheelScrollLines() , palette() , setPalette() , font() , setFont() , fontMetrics(). |
+| Event handling  | exec() , processEvents(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), notify() . |
+| GUI Styles      | style() , setStyle() . |
+| Text handling   | installTranslator(), removeTranslator() translate(). |
+| Widgets         | allWidgets() , topLevelWidgets() , activePopupWidget() , activeModalWidget() , clipboard(), focusWidget() , activeWindow() , widgetAt() . |
+| Advanced cursor handling | overrideCursor(), setOverrideCursor(), restoreOverrideCursor(). |
+| Miscellaneous   | closeAllWindows() , startingUp(), closingDown(). |
+
+
+--------------------------------
+## property autoSipEnabled : bool
+
+此属性用于切换自动 SIP（​​软件输入面板）可见性。
+
+将此属性设置为 true，以在输入接受键盘输入的小部件时自动显示 SIP。此属性仅影响设置了 WA_InputMethodEnabled 属性的小部件，通常用于在按键很少或没有按键的设备上启动虚拟键盘。
+
+此属性仅对使用软件输入面板的平台有效。
+
+默认值取决于平台。
+
+访问函数：
+
+- autoSipEnabled()
+- setAutoSipEnabled()
+
+
+--------------------------------
+## property cursorFlashTime : int
+
+此属性保存文本光标的闪烁时间（以毫秒为单位）。
+
+闪烁时间是显示、反转和恢复插入符号显示所需的时间。通常，文本光标的显示时间为光标闪烁时间的一半，然后隐藏相同的时间，但这可能会有所不同。
+
+X11 上的默认值为 1000 毫秒。在 Windows 上，使用控制面板值，设置此属性会为所有应用程序设置光标闪烁时间。
+
+我们建议小部件不要缓存此值，因为如果用户更改全局桌面设置，该值可能会随时更改。
+
+访问函数：
+
+- cursorFlashTime()
+- setCursorFlashTime()
+
+
+--------------------------------
+## property doubleClickInterval : int
+
+此属性保存区分双击和两次连续鼠标单击的时间限制（以毫秒为单位）。
+
+X11 上的默认值为 400 毫秒。在 Windows 和 Mac OS 上，使用操作系统的值。
+
+访问函数：
+
+- doubleClickInterval()
+- setDoubleClickInterval()
+
+
+--------------------------------
+## property keyboardInputInterval : int
+
+此属性保存区分一次按键和两次连续按键的时间限制（以毫秒为单位）。
+
+X11 上的默认值为 400 毫秒。在 Windows 和 Mac OS 上，使用操作系统的值。
+
+访问函数：
+
+- keyboardInputInterval()
+- setKeyboardInputInterval()
+
+
+--------------------------------
+## property startDragDistance : int
+
+此属性保存拖放操作启动所需的最小距离。
+
+如果您的应用程序支持拖放，并希望在用户按住按钮将光标移动一定距离后启动拖放操作，则应使用此属性的值作为所需的最小距离。
+
+例如，如果单击的鼠标位置存储在startPos中，当前位置（例如在鼠标移动事件中）是currentPos，则可以使用如下代码确定是否应启动拖动：
+
+```python
+if ((startPos - currentPos).manhattanLength() >=
+        QApplication.startDragDistance())
+    startTheDrag()
+```
+
+Qt 在内部使用此值，例如在 QFileDialog 中。
+
+默认值（如果平台未提供其他默认值）为 10 像素。
+
+访问函数：
+
+- startDragDistance()
+- setStartDragDistance()
+
+
+--------------------------------
+## property startDragTime : int
+
+此属性保存在开始拖放操作之前必须按住鼠标按钮的时间（以毫秒为单位）。
+
+如果您的应用程序支持拖放，并且希望在用户按住鼠标按钮一段时间后开始拖放操作，则应使用此属性的值作为延迟。
+
+Qt 也在内部使用此延迟（例如在 QTextEdit 和 QLineEdit 中）来开始拖动。
+
+默认值为 500 毫秒。
+
+访问函数：
+
+- startDragTime()
+- setStartDragTime()
+
+
+--------------------------------
+## property styleSheet : str
+
+此属性保存应用程序样式表。
+
+默认情况下，除非用户在运行应用程序时在命令行上指定 -stylesheet 选项，否则此属性将返回空字符串。
+
+访问函数：
+
+- styleSheet()
+- setStyleSheet()
+
+
+--------------------------------
+## property wheelScrollLines : int
+
+此属性保存鼠标滚轮旋转时小部件要滚动的行数。
+
+如果该值超出小部件的可见行数，小部件应将滚动操作解释为单页向上或向下翻页。如果小部件是项目视图类，则滚动一行的结果取决于小部件的滚动模式的设置。滚动一行可以意味着滚动一个项目或滚动一个像素。
+
+默认情况下，此属性的值为 3。
+
+访问函数：
+
+- wheelScrollLines()
+- setWheelScrollLines()
+
+
+--------------------------------
+## __init__(arg__1)
+
+参数：
+
+- arg__1 – list of strings
+
+__init__()
+
+--------------------------------
+## static aboutQt()
+
+显示有关 Qt 的简单消息框。该消息包括应用程序正在使用的 Qt 的版本号。
+
+这对于包含在应用程序的帮助菜单中很有用，如菜单示例所示。
+
+此函数是 aboutQt() 的便利槽。
+
+
+--------------------------------
+## static activeModalWidget()
+
+返回类型：QWidget
+
+返回活动模式小部件。
+
+模式小部件是一种特殊的顶级小部件，它是 QDialog 的子类，它将构造函数的模式参数指定为 true。用户必须先关闭模式小部件，然后才能继续执行程序的其他部分。
+
+模式小部件组织在堆栈中。此函数返回堆栈顶部的活动模式小部件。
+
+
+--------------------------------
+## static activePopupWidget()
+
+返回类型：QWidget
+
+返回活动的弹出窗口小部件。
+
+弹出窗口小部件是一种特殊的顶级窗口小部件，用于设置 Qt::WType_Popup 窗口小部件标志，例如 QMenu 窗口小部件。当应用程序打开弹出窗口小部件时，所有事件都会发送到弹出窗口。在弹出窗口小部件关闭之前，无法访问普通窗口小部件和模式窗口小部件。
+
+显示弹出窗口小部件时，只能打开其他弹出窗口小部件。弹出窗口小部件组织在一个堆栈中。此函数返回堆栈顶部的活动弹出窗口小部件。
+
+
+--------------------------------
+## static activeWindow()
+
+返回类型：QWidget
+
+返回具有键盘输入焦点的应用程序顶层窗口，如果没有应用程序窗口具有焦点，则返回 None。即使没有 focusWidget() ，也可能存在 activeWindow() ，例如，如果该窗口中没有小部件接受键盘事件。
+
+
+--------------------------------
+## static alert(widget[, duration=0])
+
+参数：
+
+- widget – QWidget
+- duration – int
+
+如果窗口不是活动窗口，则会导致小部件显示警报。警报显示时间为 msec 毫秒。如果 msec 为零（默认值），则警报将无限期显示，直到窗口再次变为活动状态。
+
+目前，此功能在 Qt for Embedded Linux 上不执行任何操作。
+
+在 macOS 上，这更多地在应用程序级别起作用，并将导致应用程序图标在 dock 中弹跳。
+
+在 Windows 上，这会导致窗口的任务栏条目闪烁一段时间。如果 msec 为零，闪烁将停止，任务栏条目将变为不同的颜色（当前为橙色）。
+
+在 X11 上，这将导致窗口被标记为“需要注意”，窗口不能被隐藏（即没有在其上调用 hide()，但以某种方式可见）才能正常工作。
+
+
+--------------------------------
+## static allWidgets()
+
+返回类型：list of QWidget
+
+返回应用程序中所有小部件的列表。
+
+如果没有小部件，则列表为空 (QList::isEmpty())。
+
+示例：
+
+```python
+def updateAllWidgets():
+
+    allWidgets = QApplication.allWidgets()
+    for widget in allWidgets:
+        widget.update()
+```
+
+
+--------------------------------
+## autoSipEnabled()
+
+返回类型：bool
+
+属性 autoSipEnabled 的获取器。
+
+--------------------------------
+## static beep()
+
+使用默认音量和声音发出铃声。此功能在 Qt for Embedded Linux 中不可用。
+
+
+--------------------------------
+## static closeAllWindows()
+
+关闭所有顶层窗口。
+
+此函数对于具有许多顶层窗口的应用程序特别有用。
+
+窗口以随机顺序关闭，直到一个窗口不接受关闭事件。当最后一个窗口成功关闭时，应用程序退出，除非 quitOnLastWindowClosed 设置为 false。要从菜单等触发应用程序终止，请使用 QCoreApplication::quit() 代替此函数。
+
+
+--------------------------------
+## static cursorFlashTime()
+
+返回类型：int
+
+属性 cursorFlashTime 的获取器。
+
+
+--------------------------------
+## static doubleClickInterval()
+
+返回类型：int
+
+属性 doubleClickInterval 的获取器。
+
+
+--------------------------------
+## exec_()
+
+返回类型：int
+
+
+--------------------------------
+## focusChanged(old, now)
+
+参数：
+
+- old – QWidget
+- now – QWidget
+
+当具有键盘焦点的小部件从旧状态变为现在状态时，即由于用户按下 Tab 键、单击小部件或更改活动窗口，将发出此信号。旧状态和现在状态都可以为 None。
+
+在两个小部件都通过 QFocusEvent 收到有关更改的通知后，将发出此信号。
+
+
+--------------------------------
+## static focusWidget()
+
+返回类型：QWidget
+
+返回具有键盘输入焦点的应用程序小部件，如果此应用程序中没有小部件具有焦点，则返回 None。
+
+
+--------------------------------
+## static font(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+返回类型：QFont
+
+这是一个重载函数。
+
+返回小部件的默认字体。如果小部件的类未注册默认字体，则返回其最近的已注册超类的默认字体。
+
+
+--------------------------------
+## static font(className)
+
+参数：
+
+- className – str
+
+返回类型：QFont
+
+这是一个重载函数。
+
+返回给定 className 的小部件的字体。
+
+
+--------------------------------
+## static fontMetrics()
+
+返回类型：QFontMetrics
+
+改用 QFontMetricsF 构造函数。返回应用程序字体的显示（屏幕）字体度量。
+
+
+--------------------------------
+## static isEffectEnabled(arg__1)
+
+参数：
+
+- arg__1 – UIEffect
+
+返回类型：bool
+
+如果启用了效果，则返回 true；否则返回 false。
+
+默认情况下，Qt 将尝试使用桌面设置。为防止这种情况，请调用 setDesktopSettingsAware(false)。
+
+
+--------------------------------
+## static keyboardInputInterval()
+
+返回类型：int
+
+属性 keyboardInputInterval 的获取器。
+
+
+--------------------------------
+## static palette(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+返回类型：QPalette
+
+如果传递了小部件，则返回小部件类的默认调色板。这可能是也可能不是应用程序调色板。在大多数情况下，某些类型的小部件没有特殊调色板，但一个值得注意的例外是 Windows 下的弹出菜单，如果用户在显示设置中为菜单定义了特殊背景颜色。
+
+
+--------------------------------
+## static palette(className)
+
+参数：
+
+- className – str
+
+返回类型：QPalette
+
+这是一个重载函数。
+
+返回给定 className 的小部件的调色板。
+
+
+--------------------------------
+## static setActiveWindow(act)
+
+参数：
+
+- act – QWidget
+
+改用 activateWindow()。
+
+将活动窗口设置为活动小部件以响应系统事件。该函数从特定于平台的事件处理程序调用。
+
+它设置 activeWindow() 和 focusWidget() 属性，并将适当的 WindowActivate/WindowDeactivate 和 FocusIn/FocusOut 事件发送到所有适当的小部件。然后窗口将以活动状态绘制（例如，行编辑中的光标将闪烁），并且将启用工具提示。
+
+
+--------------------------------
+## setAutoSipEnabled(enabled)
+
+参数：
+
+- enabled – bool
+
+属性 autoSipEnabled 的设置者。
+
+
+--------------------------------
+## static setCursorFlashTime(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 cursorFlashTime 的设置方法。
+
+
+--------------------------------
+## static setDoubleClickInterval(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 doubleClickInterval 的设置者。
+
+
+--------------------------------
+## static setEffectEnabled(arg__1[, enable=true])
+
+参数：
+
+- arg__1 – UIEffect
+- enable – bool
+
+如果enable为true则启用UI效果，否则不会使用该效果。
+
+
+--------------------------------
+## static setFont(arg__1[, className=None])
+
+参数：
+
+- arg__1 – QFont
+- className – str
+
+将默认应用程序字体更改为 font。如果传递了 className，则更改仅适用于继承 className 的类（由 QObject::inherits() 报告）。
+
+在应用程序启动时，默认字体取决于窗口系统。它可能因窗口系统版本和语言环境而异。此函数允许您覆盖默认字体；但覆盖可能不是一个好主意，因为例如，某些语言环境需要超大字体来支持其特殊字符。
+
+
+--------------------------------
+## static setKeyboardInputInterval(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 keyboardInputInterval 的设置者。
+
+
+--------------------------------
+## static setPalette(arg__1[, className=None])
+
+参数：
+
+- arg__1 – QPalette
+- className – str
+
+将应用程序调色板更改为 palette。
+
+如果传递了 className，则更改仅适用于继承 className 的小部件（由 QObject::inherits() 报告）。 如果 className 保留为 0，则更改会影响所有小部件，从而覆盖任何先前设置的特定于类的调色板。
+
+可以根据 polish() 中的当前 GUI 样式更改调色板。
+
+
+--------------------------------
+## static setStartDragDistance(l)
+
+参数：
+
+- l – int
+
+属性 startDragDistance 的设置者。
+
+
+--------------------------------
+## static setStartDragTime(ms)
+
+参数：
+
+- ms – int
+
+属性 startDragTime 的设置者。
+
+
+--------------------------------
+## static setStyle(arg__1)
+
+参数：
+
+- arg__1 – QStyle
+
+将应用程序的 GUI 样式设置为 style。样式对象的所有权将转移给 QApplication ，因此 QApplication 将在应用程序退出时或设置新样式且旧样式仍为应用程序对象的父级时删除样式对象。
+
+使用示例：
+
+```python
+QApplication.setStyle(QStyleFactory.create("Fusion"))
+```
+
+切换应用程序样式时，调色板将恢复为初始颜色或系统默认值。这是必要的，因为某些样式必须调整调色板才能完全符合样式指南。
+
+在设置调色板之前（即在创建 QApplication 之前）设置样式将导致应用程序使用 standardPalette() 作为调色板。
+
+
+--------------------------------
+## static setStyle(arg__1)
+
+参数：
+
+- arg__1 – str
+
+返回类型：QStyle
+
+这是一个重载函数。
+
+从 QStyleFactory 请求样式的 QStyle 对象。
+
+字符串必须是 keys() 之一，通常是“windows”、“windowsvista”、“fusion”或“macos”之一。样式名称不区分大小写。
+
+如果传递了未知样式，则返回 None，否则返回的 QStyle 对象将设置为应用程序的 GUI 样式。
+
+
+--------------------------------
+## setStyleSheet(sheet)
+
+参数：
+
+- sheet – str
+
+属性 styleSheet 的设置者。
+
+
+--------------------------------
+## static setWheelScrollLines(arg__1)
+
+参数：
+
+- arg__1 – int
+
+属性 wheelScrollLines 的设置者。
+
+
+--------------------------------
+## static startDragDistance()
+
+返回类型：int
+
+属性 startDragDistance 的获取器。
+
+
+--------------------------------
+## static startDragTime()
+
+返回类型：int
+
+属性 startDragTime 的获取器。
+
+
+--------------------------------
+## static style()
+
+返回类型：QStyle
+
+返回应用程序的样式对象。
+
+
+--------------------------------
+## styleSheet()
+
+返回类型：str
+
+属性 styleSheet 的获取器。
+
+
+--------------------------------
+## static topLevelAt(x, y)
+
+参数：
+
+- x – int
+- y – int
+
+返回类型：QWidget
+
+这是一个重载函数。
+
+返回点 (x, y) 处的顶级小部件；如果不存在这样的小部件，则返回 0。
+
+
+--------------------------------
+## static topLevelWidgets()
+
+返回类型：list of QWidget
+
+返回应用程序中顶级小部件（窗口）的列表。
+
+示例：
+
+```python
+def showAllHiddenTopLevelWidgets():
+
+    topLevelWidgets = QApplication.topLevelWidgets()
+    for widget in topLevelWidgets:
+        if widget.isHidden():
+            widget.show()
+```
+
+
+--------------------------------
+## static wheelScrollLines()
+
+返回类型：int
+
+属性 wheelScrollLines 的获取器。
+
+
+--------------------------------
+## static widgetAt(p)
+
+参数：
+
+- p – QPoint
+
+返回类型：QWidget
+
+返回全局屏幕位置点处的窗口小部件，如果该位置没有 Qt 窗口小部件，则返回 None。
+
+此功能可能很慢。
+
+
+--------------------------------
+## static widgetAt(x, y)
+
+参数：
+
+- x – int
+- y – int
+
+返回类型：QWidget
+
+这是一个重载函数。
+
+返回全局屏幕位置 (x, y) 处的窗口小部件，如果该位置没有 Qt 窗口小部件，则返回 None。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QApplication.md b/Class-3/PyQt6/Class-0/QtWidget/QApplication.md
new file mode 100644
index 0000000..e0c7e64
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QApplication.md
@@ -0,0 +1,842 @@
+
+[Chinese doc](QApplication.CN.md)
+
+# class QApplication
+
+The QApplication class manages the GUI application’s control flow and main settings.
+
+
+# Synopsis
+
+## Properties
+
+- [autoSipEnabled](#property-autosipenabled--bool)
+
+    Toggles automatic SIP (software input panel) visibility.
+
+- [cursorFlashTime](#property-cursorflashtime--int)
+
+    The text cursor’s flash (blink) time in milliseconds.
+
+- [doubleClickInterval](#property-doubleclickinterval--int)
+
+    The time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.
+
+- [keyboardInputInterval](#property-keyboardinputinterval--int)
+
+    The time limit in milliseconds that distinguishes a key press from two consecutive key presses.
+
+- [startDragDistance](#property-startdragdistance--int)
+
+    The minimum distance required for a drag and drop operation to start.
+
+- [startDragTime](#property-startdragtime--int)
+
+    The time in milliseconds that a mouse button must be held down before a drag and drop operation will begin.
+
+- [styleSheet](#property-stylesheet--str)
+
+    The application style sheet.
+
+- [wheelScrollLines](#property-wheelscrolllines--int)
+
+    The number of lines to scroll a widget, when the mouse wheel is rotated.
+
+
+## Methods
+
+- [def \_\_init__()](#initarg__1)
+
+- [def autoSipEnabled()](#autosipenabled)
+
+- [def exec_()](#exec_)
+
+- [def styleSheet()](#stylesheet)
+
+
+## Slots
+
+- [def setAutoSipEnabled()](#setautosipenabledenabled)
+
+- [def setStyleSheet()](#setstylesheetsheet)
+
+
+## Signals
+
+- [def focusChanged()](#focuschangedold-now)
+
+
+## Static functions
+
+- [def aboutQt()](#static-aboutqt)
+
+- [def activeModalWidget()](#static-activemodalwidget)
+
+- [def activePopupWidget()](#static-activepopupwidget)
+
+- [def activeWindow()](#static-activewindow)
+
+- [def alert()](#static-alertwidget-duration0)
+
+- [def allWidgets()](#static-allwidgets)
+
+- [def beep()](#static-beep)
+
+- [def closeAllWindows()](#static-closeallwindows)
+
+- [def cursorFlashTime()](#static-cursorflashtime)
+
+- [def doubleClickInterval()](#static-doubleclickinterval)
+
+- [def focusWidget()](#static-focuswidget)
+
+- [def font()](#static-fontarg__1)
+
+- [def fontMetrics()](#static-fontmetrics)
+
+- [def isEffectEnabled()](#static-iseffectenabledarg__1)
+
+- [def keyboardInputInterval()](#static-keyboardinputinterval)
+
+- [def palette()](#static-palettearg__1)
+
+- [def setActiveWindow()](#static-setactivewindowact)
+
+- [def setCursorFlashTime()](#static-setcursorflashtimearg__1)
+
+- [def setDoubleClickInterval()](#static-doubleclickinterval)
+
+- [def setEffectEnabled()](#static-seteffectenabledarg__1-enabletrue)
+
+- [def setFont()](#static-setfontarg__1-classnamenone)
+
+- [def setKeyboardInputInterval()](#static-setkeyboardinputintervalarg__1)
+
+- [def setPalette()](#static-setpalettearg__1-classnamenone)
+
+- [def setStartDragDistance()](#static-setstartdragdistancel)
+
+- [def setStartDragTime()](#static-setstartdragtimems)
+
+- [def setStyle()](#static-setstylearg__1)
+
+- [def setWheelScrollLines()](#static-setwheelscrolllinesarg__1)
+
+- [def startDragDistance()](#static-startdragdistance)
+
+- [def startDragTime()](#static-startdragtime)
+
+- [def style()](#static-style)
+
+- [def topLevelAt()](#static-toplevelatx-y)
+
+- [def topLevelWidgets()](#static-toplevelwidgets)
+
+- [def wheelScrollLines()](#static-wheelscrolllines)
+
+- [def widgetAt()](#static-widgetatp)
+
+
+## Detailed Description
+
+QApplication specializes QGuiApplication with some functionality needed for QWidget -based applications. It handles widget specific initialization, finalization.
+
+For any GUI application using Qt, there is precisely one QApplication object, no matter whether the application has 0, 1, 2 or more windows at any given time. For non- QWidget based Qt applications, use QGuiApplication instead, as it does not depend on the QtWidgets library.
+
+Some GUI applications provide a special batch mode ie. provide command line arguments for executing tasks without manual intervention. In such non-GUI mode, it is often sufficient to instantiate a plain QCoreApplication to avoid unnecessarily initializing resources needed for a graphical user interface. The following example shows how to dynamically create an appropriate type of application instance:
+
+```python
+QCoreApplication* createApplication(int argc, char *argv[])
+
+    for i in range(1, argc):
+        if not qstrcmp(argv[i], "-no-gui"):
+            return QCoreApplication(argc, argv)
+
+    return QApplication(argc, argv)
+
+if __name__ == "__main__":
+
+app = QScopedPointer(createApplication(argc, argv))
+    if QApplication(app.data()):
+       # start GUI version...
+    else:
+       # start non-GUI version...
+
+    sys.exit(app.exec())
+```
+
+The QApplication object is accessible through the instance() function that returns a pointer equivalent to the global qApp pointer.
+
+QApplication ‘s main areas of responsibility are:
+
+- It initializes the application with the user’s desktop settings such as palette() , font() and doubleClickInterval() . It keeps track of these properties in case the user changes the desktop globally, for example through some kind of control panel.
+
+- It performs event handling, meaning that it receives events from the underlying window system and dispatches them to the relevant widgets. By using sendEvent() and postEvent() you can send your own events to widgets.
+
+- It parses common command line arguments and sets its internal state accordingly. See the constructor documentation below for more details.
+
+- It defines the application’s look and feel, which is encapsulated in a QStyle object. This can be changed at runtime with setStyle() .
+
+- It provides localization of strings that are visible to the user via translate().
+
+- It provides some magical objects like the clipboard().
+
+- It knows about the application’s windows. You can ask which widget is at a certain position using widgetAt() , get a list of topLevelWidgets() and closeAllWindows() , etc.
+
+- It manages the application’s mouse cursor handling, see setOverrideCursor()
+
+Since the QApplication object does so much initialization, it must be created before any other objects related to the user interface are created. QApplication also deals with common command line arguments. Hence, it is usually a good idea to create it before any interpretation or modification of argv is done in the application itself.
+
+|                 |          |
+| --------------- | -------- |
+| System settings | desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime() , setCursorFlashTime() , doubleClickInterval() , setDoubleClickInterval() , setKeyboardInputInterval() , wheelScrollLines() , setWheelScrollLines() , palette() , setPalette() , font() , setFont() , fontMetrics(). |
+| Event handling  | exec() , processEvents(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), notify() . |
+| GUI Styles      | style() , setStyle() . |
+| Text handling   | installTranslator(), removeTranslator() translate(). |
+| Widgets         | allWidgets() , topLevelWidgets() , activePopupWidget() , activeModalWidget() , clipboard(), focusWidget() , activeWindow() , widgetAt() . |
+| Advanced cursor handling | overrideCursor(), setOverrideCursor(), restoreOverrideCursor(). |
+| Miscellaneous   | closeAllWindows() , startingUp(), closingDown(). |
+
+
+--------------------------------
+## property autoSipEnabled : bool
+
+This property holds toggles automatic SIP (software input panel) visibility.
+
+Set this property to true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with the WA_InputMethodEnabled attribute set, and is typically used to launch a virtual keyboard on devices which have very few or no keys.
+
+The property only has an effect on platforms that use software input panels.
+
+The default is platform dependent.
+
+Access functions:
+
+- autoSipEnabled()
+- setAutoSipEnabled()
+
+
+--------------------------------
+## property cursorFlashTime : int
+
+This property holds the text cursor’s flash (blink) time in milliseconds.
+
+The flash time is the time required to display, invert and restore the caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time, but this may vary.
+
+The default value on X11 is 1000 milliseconds. On Windows, the Control Panel value is used and setting this property sets the cursor flash time for all applications.
+
+We recommend that widgets do not cache this value as it may change at any time if the user changes the global desktop settings.
+
+Access functions:
+
+- cursorFlashTime()
+- setCursorFlashTime()
+
+
+--------------------------------
+## property doubleClickInterval : int
+
+This property holds the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.
+
+The default value on X11 is 400 milliseconds. On Windows and Mac OS, the operating system’s value is used.
+
+Access functions:
+
+- doubleClickInterval()
+- setDoubleClickInterval()
+
+
+--------------------------------
+## property keyboardInputInterval : int
+
+This property holds the time limit in milliseconds that distinguishes a key press from two consecutive key presses.
+
+The default value on X11 is 400 milliseconds. On Windows and Mac OS, the operating system’s value is used.
+
+Access functions:
+
+- keyboardInputInterval()
+- setKeyboardInputInterval()
+
+
+--------------------------------
+## property startDragDistance : int
+
+This property holds the minimum distance required for a drag and drop operation to start..
+
+If you support drag and drop in your application, and want to start a drag and drop operation after the user has moved the cursor a certain distance with a button held down, you should use this property’s value as the minimum distance required.
+
+For example, if the mouse position of the click is stored in startPos and the current position (e.g. in the mouse move event) is currentPos, you can find out if a drag should be started with code like this:
+
+```python
+if ((startPos - currentPos).manhattanLength() >=
+        QApplication.startDragDistance())
+    startTheDrag()
+```
+
+Qt uses this value internally, e.g. in QFileDialog .
+
+The default value (if the platform doesn’t provide a different default) is 10 pixels.
+
+Access functions:
+
+- startDragDistance()
+- setStartDragDistance()
+
+
+--------------------------------
+## property startDragTime : int
+
+This property holds the time in milliseconds that a mouse button must be held down before a drag and drop operation will begin.
+
+If you support drag and drop in your application, and want to start a drag and drop operation after the user has held down a mouse button for a certain amount of time, you should use this property’s value as the delay.
+
+Qt also uses this delay internally, e.g. in QTextEdit and QLineEdit , for starting a drag.
+
+The default value is 500 ms.
+
+Access functions:
+
+- startDragTime()
+- setStartDragTime()
+
+
+--------------------------------
+## property styleSheet : str
+
+This property holds the application style sheet.
+
+By default, this property returns an empty string unless the user specifies the -stylesheet option on the command line when running the application.
+
+Access functions:
+
+- styleSheet()
+- setStyleSheet()
+
+
+--------------------------------
+## property wheelScrollLines : int
+
+This property holds the number of lines to scroll a widget, when the mouse wheel is rotated..
+
+If the value exceeds the widget’s number of visible lines, the widget should interpret the scroll operation as a single page up or page down. If the widget is an item view class , then the result of scrolling one line depends on the setting of the widget’s scroll mode . Scroll one line can mean scroll one item or scroll one pixel .
+
+By default, this property has a value of 3.
+
+Access functions:
+
+- wheelScrollLines()
+- setWheelScrollLines()
+
+
+--------------------------------
+## __init__(arg__1)
+
+Parameters:
+
+- arg__1 – list of strings
+
+__init__()
+
+--------------------------------
+## static aboutQt()
+
+Displays a simple message box about Qt. The message includes the version number of Qt being used by the application.
+
+This is useful for inclusion in the Help menu of an application, as shown in the Menus example.
+
+This function is a convenience slot for aboutQt() .
+
+
+--------------------------------
+## static activeModalWidget()
+
+Return type: QWidget
+
+Returns the active modal widget.
+
+A modal widget is a special top-level widget which is a subclass of QDialog that specifies the modal parameter of the constructor as true. A modal widget must be closed before the user can continue with other parts of the program.
+
+Modal widgets are organized in a stack. This function returns the active modal widget at the top of the stack.
+
+
+--------------------------------
+## static activePopupWidget()
+
+Return type: QWidget
+
+Returns the active popup widget.
+
+A popup widget is a special top-level widget that sets the Qt::WType_Popup widget flag, e.g. the QMenu widget. When the application opens a popup widget, all events are sent to the popup. Normal widgets and modal widgets cannot be accessed before the popup widget is closed.
+
+Only other popup widgets may be opened when a popup widget is shown. The popup widgets are organized in a stack. This function returns the active popup widget at the top of the stack.
+
+
+--------------------------------
+## static activeWindow()
+
+Return type: QWidget
+
+Returns the application top-level window that has the keyboard input focus, or None if no application window has the focus. There might be an activeWindow() even if there is no focusWidget() , for example if no widget in that window accepts key events.
+
+
+--------------------------------
+## static alert(widget[, duration=0])
+
+Parameters:
+
+- widget – QWidget
+- duration – int
+
+Causes an alert to be shown for widget if the window is not the active window. The alert is shown for msec milliseconds. If msec is zero (the default), then the alert is shown indefinitely until the window becomes active again.
+
+Currently this function does nothing on Qt for Embedded Linux.
+
+On macOS, this works more at the application level and will cause the application icon to bounce in the dock.
+
+On Windows, this causes the window’s taskbar entry to flash for a time. If msec is zero, the flashing will stop and the taskbar entry will turn a different color (currently orange).
+
+On X11, this will cause the window to be marked as “demands attention”, the window must not be hidden (i.e. not have hide() called on it, but be visible in some sort of way) in order for this to work.
+
+
+--------------------------------
+## static allWidgets()
+
+Return type: list of QWidget
+
+Returns a list of all the widgets in the application.
+
+The list is empty (QList::isEmpty()) if there are no widgets.
+
+Example:
+
+```python
+def updateAllWidgets():
+
+    allWidgets = QApplication.allWidgets()
+    for widget in allWidgets:
+        widget.update()
+```
+
+
+--------------------------------
+## autoSipEnabled()
+
+Return type: bool
+
+Getter of property autoSipEnabled  .
+
+--------------------------------
+## static beep()
+
+Sounds the bell, using the default volume and sound. The function is not available in Qt for Embedded Linux.
+
+
+--------------------------------
+## static closeAllWindows()
+
+Closes all top-level windows.
+
+This function is particularly useful for applications with many top-level windows.
+
+The windows are closed in random order, until one window does not accept the close event. The application quits when the last window was successfully closed, unless quitOnLastWindowClosed is set to false. To trigger application termination from e.g. a menu, use QCoreApplication::quit() instead of this function.
+
+
+--------------------------------
+## static cursorFlashTime()
+
+Return type: int
+
+Getter of property cursorFlashTime  .
+
+
+--------------------------------
+## static doubleClickInterval()
+
+Return type: int
+
+Getter of property doubleClickInterval  .
+
+
+--------------------------------
+## exec_()
+
+Return type: int
+
+
+--------------------------------
+## focusChanged(old, now)
+
+Parameters:
+
+- old – QWidget
+- now – QWidget
+
+This signal is emitted when the widget that has keyboard focus changed from old to now, i.e., because the user pressed the tab-key, clicked into a widget or changed the active window. Both old and now can be None.
+
+The signal is emitted after both widget have been notified about the change through QFocusEvent.
+
+
+--------------------------------
+## static focusWidget()
+
+Return type: QWidget
+
+Returns the application widget that has the keyboard input focus, or None if no widget in this application has the focus.
+
+
+--------------------------------
+## static font(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Return type: QFont
+
+This is an overloaded function.
+
+Returns the default font for the widget. If a default font was not registered for the widget's class, it returns the default font of its nearest registered superclass.
+
+
+--------------------------------
+## static font(className)
+
+Parameters:
+
+- className – str
+
+Return type: QFont
+
+This is an overloaded function.
+
+Returns the font for widgets of the given className.
+
+
+--------------------------------
+## static fontMetrics()
+
+Return type: QFontMetrics
+
+Use the QFontMetricsF constructor instead. Returns display (screen) font metrics for the application font.
+
+
+--------------------------------
+## static isEffectEnabled(arg__1)
+
+Parameters:
+
+- arg__1 – UIEffect
+
+Return type: bool
+
+Returns true if effect is enabled; otherwise returns false.
+
+By default, Qt will try to use the desktop settings. To prevent this, call setDesktopSettingsAware(false).
+
+
+--------------------------------
+## static keyboardInputInterval()
+
+Return type: int
+
+Getter of property keyboardInputInterval  .
+
+
+--------------------------------
+## static palette(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Return type: QPalette
+
+If a widget is passed, the default palette for the widget’s class is returned. This may or may not be the application palette. In most cases there is no special palette for certain types of widgets, but one notable exception is the popup menu under Windows, if the user has defined a special background color for menus in the display settings.
+
+
+--------------------------------
+## static palette(className)
+
+Parameters:
+
+- className – str
+
+Return type: QPalette
+
+This is an overloaded function.
+
+Returns the palette for widgets of the given className.
+
+
+--------------------------------
+## static setActiveWindow(act)
+
+Parameters:
+
+- act – QWidget
+
+Use activateWindow() instead.
+
+Sets the active window to the active widget in response to a system event. The function is called from the platform specific event handlers.
+
+It sets the activeWindow() and focusWidget() attributes and sends proper WindowActivate/WindowDeactivate and FocusIn/FocusOut events to all appropriate widgets. The window will then be painted in active state (e.g. cursors in line edits will blink), and it will have tool tips enabled.
+
+
+--------------------------------
+## setAutoSipEnabled(enabled)
+
+Parameters:
+
+- enabled – bool
+
+Setter of property autoSipEnabled  .
+
+
+--------------------------------
+## static setCursorFlashTime(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property cursorFlashTime  .
+
+
+--------------------------------
+## static setDoubleClickInterval(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property doubleClickInterval  .
+
+
+--------------------------------
+## static setEffectEnabled(arg__1[, enable=true])
+
+Parameters:
+
+- arg__1 – UIEffect
+- enable – bool
+
+Enables the UI effect effect if enable is true, otherwise the effect will not be used.
+
+
+--------------------------------
+## static setFont(arg__1[, className=None])
+
+Parameters:
+
+- arg__1 – QFont
+- className – str
+
+Changes the default application font to font. If className is passed, the change applies only to classes that inherit className (as reported by QObject::inherits()).
+
+On application start-up, the default font depends on the window system. It can vary depending on both the window system version and the locale. This function lets you override the default font; but overriding may be a bad idea because, for example, some locales need extra large fonts to support their special characters.
+
+
+--------------------------------
+## static setKeyboardInputInterval(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property keyboardInputInterval  .
+
+
+--------------------------------
+## static setPalette(arg__1[, className=None])
+
+Parameters:
+
+- arg__1 – QPalette
+- className – str
+
+Changes the application palette to palette.
+
+If className is passed, the change applies only to widgets that inherit className (as reported by QObject::inherits()). If className is left 0, the change affects all widgets, thus overriding any previously set class specific palettes.
+
+The palette may be changed according to the current GUI style in polish() .
+
+
+--------------------------------
+## static setStartDragDistance(l)
+
+Parameters:
+
+- l – int
+
+Setter of property startDragDistance  .
+
+
+--------------------------------
+## static setStartDragTime(ms)
+
+Parameters:
+
+- ms – int
+
+Setter of property startDragTime  .
+
+
+--------------------------------
+## static setStyle(arg__1)
+
+Parameters:
+
+- arg__1 – QStyle
+
+Sets the application’s GUI style to style. Ownership of the style object is transferred to QApplication , so QApplication will delete the style object on application exit or when a new style is set and the old style is still the parent of the application object.
+
+Example usage:
+
+```python
+QApplication.setStyle(QStyleFactory.create("Fusion"))
+```
+
+When switching application styles, the color palette is set back to the initial colors or the system defaults. This is necessary since certain styles have to adapt the color palette to be fully style-guide compliant.
+
+Setting the style before a palette has been set, i.e., before creating QApplication , will cause the application to use standardPalette() for the palette.
+
+
+--------------------------------
+## static setStyle(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Return type: QStyle
+
+This is an overloaded function.
+
+Requests a QStyle object for style from the QStyleFactory .
+
+The string must be one of the keys() , typically one of “windows”, “windowsvista”, “fusion”, or “macos”. Style names are case insensitive.
+
+Returns None if an unknown style is passed, otherwise the QStyle object returned is set as the application’s GUI style.
+
+
+--------------------------------
+## setStyleSheet(sheet)
+
+Parameters:
+
+- sheet – str
+
+Setter of property styleSheet  .
+
+
+--------------------------------
+## static setWheelScrollLines(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Setter of property wheelScrollLines  .
+
+
+--------------------------------
+## static startDragDistance()
+
+Return type: int
+
+Getter of property startDragDistance  .
+
+
+--------------------------------
+## static startDragTime()
+
+Return type: int
+
+Getter of property startDragTime  .
+
+
+--------------------------------
+## static style()
+
+Return type: QStyle
+
+Returns the application’s style object.
+
+
+--------------------------------
+## styleSheet()
+
+Return type: str
+
+Getter of property styleSheet  .
+
+
+--------------------------------
+## static topLevelAt(x, y)
+
+Parameters:
+
+- x – int
+- y – int
+
+Return type: QWidget
+
+This is an overloaded function.
+
+Returns the top-level widget at the point (x, y); returns 0 if there is no such widget.
+
+
+--------------------------------
+## static topLevelWidgets()
+
+Return type: list of QWidget
+
+Returns a list of the top-level widgets (windows) in the application.
+
+Example:
+
+```python
+def showAllHiddenTopLevelWidgets():
+
+    topLevelWidgets = QApplication.topLevelWidgets()
+    for widget in topLevelWidgets:
+        if widget.isHidden():
+            widget.show()
+```
+
+
+--------------------------------
+## static wheelScrollLines()
+
+Return type: int
+
+Getter of property wheelScrollLines  .
+
+
+--------------------------------
+## static widgetAt(p)
+
+Parameters:
+
+- p – QPoint
+
+Return type: QWidget
+
+Returns the widget at global screen position point, or None if there is no Qt widget there.
+
+This function can be slow.
+
+
+--------------------------------
+## static widgetAt(x, y)
+
+Parameters:
+
+- x – int
+- y – int
+
+Return type: QWidget
+
+This is an overloaded function.
+
+Returns the widget at global screen position (x, y), or None if there is no Qt widget there.

From ac07a8aabf62c22f96f94c84fff6400fc8a1d41d Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Wed, 7 Aug 2024 16:06:32 +0800
Subject: [PATCH 31/38] [PyQt] Add QWidget doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QWidget.md | 5282 +++++++++++++++++++++
 1 file changed, 5282 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QWidget.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QWidget.md b/Class-3/PyQt6/Class-0/QtWidget/QWidget.md
new file mode 100644
index 0000000..9432f5f
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QWidget.md
@@ -0,0 +1,5282 @@
+
+[Chinese doc](QWidget.CN.md)
+
+# class QWidget
+
+The QWidget class is the base class of all user interface objects.
+
+
+# Synopsis
+
+## Properties
+
+- [acceptDrops](#property-acceptdrops--bool)
+
+    Whether drop events are enabled for this widget.
+
+- [accessibleDescription](#property-accessibledescription--str)
+
+    The widget’s description as seen by assistive technologies.
+
+- [accessibleName](#property-accessiblename--str)
+
+    The widget’s name as seen by assistive technologies.
+
+- [autoFillBackground](#property-autofillbackground--bool)
+
+    Whether the widget background is filled automatically.
+
+- [baseSize](#property-basesize--qsize)
+
+    The base size of the widget.
+
+- [childrenRect](#property-childrenrect--qrect)
+
+    The bounding rectangle of the widget’s children.
+
+- [childrenRegion](#property-childrenregion--qregion)
+
+    The combined region occupied by the widget’s children.
+
+- [contextMenuPolicy](#property-contextmenupolicy--qtcontextmenupolicy)
+
+    How the widget shows a context menu.
+
+- [cursor](#property-cursor--qcursor)
+
+    The cursor shape for this widget.
+
+- [enabled](#property-enabled--bool)
+
+    Whether the widget is enabled.
+
+- [focus](#property-focus--bool)
+
+    Whether this widget (or its focus proxy) has the keyboard input focus.
+
+- [focusPolicy](#property-focuspolicy--qtfocuspolicy)
+
+    The way the widget accepts keyboard focus.
+
+- [font](#property-font--qfont)
+
+    The font currently set for the widget.
+
+- [frameGeometry](#property-framegeometry--qrect)
+
+    Geometry of the widget relative to its parent including any window frame.
+
+- [frameSize](#property-framesize--qsize)
+
+    The size of the widget including any window frame.
+
+- [fullScreen](#property-fullscreen--bool)
+
+    Whether the widget is shown in full screen mode.
+
+- [geometry](#property-geometry--qrect)
+
+    The geometry of the widget relative to its parent and excluding the window frame.
+
+- [height](#property-height--int)
+
+    The height of the widget excluding any window frame.
+
+- [inputMethodHints](#property-inputmethodhints--combination-of-qtinputmethodhint)
+
+    What input method specific hints the widget has.
+
+- [isActiveWindow](#property-isactivewindow--bool)
+
+    Whether this widget’s window is the active window.
+
+- [layoutDirection](#property-layoutdirection--qtlayoutdirection)
+
+    The layout direction for this widget.
+
+- [locale](#property-locale--qlocale)
+
+    The widget’s locale.
+
+- [maximized](#property-maximized--bool)
+
+    Whether this widget is maximized.
+
+- [maximumHeight](#property-maximumheight--int)
+
+    The widget’s maximum height in pixels.
+
+- [maximumSize](#property-maximumsize--qsize)
+
+    The widget’s maximum size in pixels.
+
+- [maximumWidth](#property-maximumwidth--int)
+
+    The widget’s maximum width in pixels.
+
+- [minimized](#property-minimized--bool)
+
+    Whether this widget is minimized (iconified).
+
+- [minimumHeight](#property-minimumheight--int)
+
+    The widget’s minimum height in pixels.
+
+- [minimumSize](#property-minimumsize--qsize)
+
+    The widget’s minimum size.
+
+- [minimumSizeHint](#property-minimumsizehint--qsize)
+
+    The recommended minimum size for the widget.
+
+- [minimumWidth](#property-minimumwidth--int)
+
+    The widget’s minimum width in pixels.
+
+- [modal](#property-modal--bool)
+
+    Whether the widget is a modal widget.
+
+- [mouseTracking](#property-mousetracking--bool)
+
+    Whether mouse tracking is enabled for the widget.
+
+- [normalGeometry](#property-normalgeometry--qrect)
+
+    The geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget.
+
+- [palette](#property-palette--qpalette)
+
+    The widget’s palette.
+
+- [pos](#property-pos--qpoint)
+
+    The position of the widget within its parent widget.
+
+- [rect](#property-rect--qrect)
+
+    The internal geometry of the widget excluding any window frame.
+
+- [size](#property-size--qsize)
+
+    The size of the widget excluding any window frame.
+
+- [sizeHint](#property-sizehint--qsize)
+
+    The recommended size for the widget.
+
+- [sizeIncrement](#property-sizeincrement--qsize)
+
+    The size increment of the widget.
+
+- [sizePolicy](#property-sizepolicy--qsizepolicy)
+
+    The default layout behavior of the widget.
+
+- [statusTip](#property-statustip--str)
+
+    The widget’s status tip.
+
+- [styleSheet](#property-stylesheet--str)
+
+    The widget’s style sheet.
+
+- [tabletTracking](#property-tablettracking--bool)
+
+    Whether tablet tracking is enabled for the widget.
+
+- [toolTip](#property-tooltip--str)
+
+    The widget’s tooltip.
+
+- [toolTipDuration](#property-tooltipduration--int)
+
+    The widget’s tooltip duration.
+
+- [updatesEnabled](#property-updatesenabled--bool)
+
+    Whether updates are enabled.
+
+- [visible](#property-visible--bool)
+
+    Whether the widget is visible.
+
+- [whatsThis](#property-whatsthis--str)
+
+    The widget’s What’s This help text.
+
+- [width](#property-width--int)
+
+    The width of the widget excluding any window frame.
+
+- [windowFilePath](#property-windowfilepath--str)
+
+    The file path associated with a widget.
+
+- [windowIcon](#property-windowicon--qicon)
+
+    The widget’s icon.
+
+- [windowIconText](#property-windowicontext--str)
+
+    The text to be displayed on the icon of a minimized window.
+
+- [windowModality](#property-windowmodality--qtwindowmodality)
+
+    Which windows are blocked by the modal widget.
+
+- [windowModified](#property-windowmodified--bool)
+
+    Whether the document shown in the window has unsaved changes.
+
+- [windowOpacity](#property-windowopacity--float)
+
+    Level of opacity for the window.
+
+- [windowTitle](#property-windowtitle--str)
+
+    The window title (caption).
+
+- [x](#property-x--int)
+
+    The x coordinate of the widget relative to its parent including any window frame.
+
+- [y](#property-y--int)
+
+    The y coordinate of the widget relative to its parent and including any window frame.
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone-fqtwindowflags)
+
+- [def acceptDrops()](#acceptdrops)
+
+- [def accessibleDescription()](#accessibledescription)
+
+- [def accessibleName()](#accessiblename)
+
+- [def actions()](#actions)
+
+- [def activateWindow()](#activatewindow)
+
+- [def addAction()](#addactionaction)
+
+- [def addActions()](#addactionsactions)
+
+- [def adjustSize()](#adjustsize)
+
+- [def autoFillBackground()](#autofillbackground)
+
+- [def backgroundRole()](#backgroundrole)
+
+- [def backingStore()](#backingstore)
+
+- [def baseSize()](#basesize)
+
+- [def childAt()](#childatp)
+
+- [def childrenRect()](#childrenrect)
+
+- [def childrenRegion()](#childrenregion)
+
+- [def clearFocus()](#clearfocus)
+
+- [def clearMask()](#clearmask)
+
+- [def contentsMargins()](#contentsmargins)
+
+- [def contentsRect()](#contentsrect)
+
+- [def contextMenuPolicy()](#contextmenupolicy)
+
+- [def create()](#createarg__10-initializewindowtrue-destroyoldwindowtrue)
+
+- [def createWinId()](#createwinid)
+
+- [def cursor()](#cursor)
+
+- [def destroy()](#destroydestroywindowtrue-destroysubwindowstrue)
+
+- [def effectiveWinId()](#effectivewinid)
+
+- [def ensurePolished()](#ensurepolished)
+
+- [def focusNextChild()](#focusnextchild)
+
+- [def focusPolicy()](#focuspolicy)
+
+- [def focusPreviousChild()](#focuspreviouschild)
+
+- [def focusProxy()](#focusproxy)
+
+- [def focusWidget()](#focuswidget)
+
+- [def font()](#font)
+
+- [def fontInfo()](#fontinfo)
+
+- [def fontMetrics()](#fontmetrics)
+
+- [def foregroundRole()](#foregroundrole)
+
+- [def frameGeometry()](#framegeometry)
+
+- [def frameSize()](#framesize)
+
+- [def geometry()](#geometry)
+
+- [def grab()](#grabrectangleqrectqpoint0-0-qsize-1--1)
+
+- [def grabGesture()](#grabgesturetype-flagsqtgestureflags)
+
+- [def grabKeyboard()](#grabkeyboard)
+
+- [def grabMouse()](#grabmouse)
+
+- [def grabShortcut()](#grabshortcutkey-contextqtwindowshortcut)
+
+- [def graphicsEffect()](#graphicseffect)
+
+- [def graphicsProxyWidget()](#graphicsproxywidget)
+
+- [def hasFocus()](#hasfocus)
+
+- [def hasMouseTracking()](#hasmousetracking)
+
+- [def hasTabletTracking()](#hastablettracking)
+
+- [def inputMethodHints()](#inputmethodhints)
+
+- [def insertAction()](#insertactionbefore-action)
+
+- [def insertActions()](#insertactionsbefore-actions)
+
+- [def internalWinId()](#internalwinid)
+
+- [def isActiveWindow()](#isactivewindow)
+
+- [def isAncestorOf()](#isancestorofchild)
+
+- [def isEnabled()](#isenabled)
+
+- [def isEnabledTo()](#isenabledtoarg__1)
+
+- [def isFullScreen()](#isfullscreen)
+
+- [def isHidden()](#ishidden)
+
+- [def isLeftToRight()](#islefttoright)
+
+- [def isMaximized()](#ismaximized)
+
+- [def isMinimized()](#isminimized)
+
+- [def isModal()](#ismodal)
+
+- [def isRightToLeft()](#isrighttoleft)
+
+- [def isTopLevel()](#istoplevel)
+
+- [def isVisible()](#isvisible)
+
+- [def isVisibleTo()](#isvisibletoarg__1)
+
+- [def isWindow()](#iswindow)
+
+- [def isWindowModified()](#iswindowmodified)
+
+- [def layout()](#layout)
+
+- [def layoutDirection()](#layoutdirection)
+
+- [def locale()](#locale)
+
+- [def mapFrom()](#mapfromarg__1-arg__2)
+
+- [def mapFromGlobal()](#mapfromglobalarg__1)
+
+- [def mapFromParent()](#mapfromparentarg__1)
+
+- [def mapTo()](#maptoarg__1-arg__2)
+
+- [def mapToGlobal()](#maptoglobalarg__1)
+
+- [def mapToParent()](#maptoparentarg__1)
+
+- [def mask()](#mask)
+
+- [def maximumHeight()](#maximumheight)
+
+- [def maximumSize()](#maximumsize)
+
+- [def maximumWidth()](#maximumwidth)
+
+- [def minimumHeight()](#minimumheight)
+
+- [def minimumSize()](#minimumsize)
+
+- [def minimumWidth()](#minimumwidth)
+
+- [def move()](#movearg__1)
+
+- [def nativeParentWidget()](#nativeparentwidget)
+
+- [def nextInFocusChain()](#nextinfocuschain)
+
+- [def normalGeometry()](#normalgeometry)
+
+- [def overrideWindowFlags()](#overridewindowflagstype)
+
+- [def overrideWindowState()](#overridewindowstatestate)
+
+- [def palette()](#palette)
+
+- [def parentWidget()](#parentwidget)
+
+- [def pos()](#pos)
+
+- [def previousInFocusChain()](#previousinfocuschain)
+
+- [def rect()](#rect)
+
+- [def releaseKeyboard()](#releasekeyboard)
+
+- [def releaseMouse()](#releasemouse)
+
+- [def releaseShortcut()](#releaseshortcutid)
+
+- [def removeAction()](#removeactionaction)
+
+- [def render()](#renderpainter-targetoffset-sourceregionqregion-renderflagsqwidgetrenderflagsqwidgetrenderflagdrawwindowbackground--qwidgetrenderflagdrawchildren)
+
+- [def repaint()](#repaint)
+
+- [def resize()](#resizearg__1)
+
+- [def restoreGeometry()](#restoregeometrygeometry)
+
+- [def saveGeometry()](#savegeometry)
+
+- [def screen()](#screen)
+
+- [def scroll()](#scrolldx-dy)
+
+- [def setAcceptDrops()](#setacceptdropson)
+
+- [def setAccessibleDescription()](#setaccessibledescriptiondescription)
+
+- [def setAccessibleName()](#setaccessiblenamename)
+
+- [def setAttribute()](#setattributearg__1-ontrue)
+
+- [def setAutoFillBackground()](#setautofillbackgroundenabled)
+
+- [def setBackgroundRole()](#setbackgroundrolearg__1)
+
+- [def setBaseSize()](#setbasesizearg__1)
+
+- [def setContentsMargins()](#setcontentsmarginsmargins)
+
+- [def setContextMenuPolicy()](#setcontextmenupolicypolicy)
+
+- [def setCursor()](#setcursorarg__1)
+
+- [def setFixedHeight()](#setfixedheighth)
+
+- [def setFixedSize()](#setfixedsizearg__1)
+
+- [def setFixedWidth()](#setfixedwidthw)
+
+- [def setFocus()](#setfocus)
+
+- [def setFocusPolicy()](#setfocuspolicypolicy)
+
+- [def setFocusProxy()](#setfocusproxyarg__1)
+
+- [def setFont()](#setfontarg__1)
+
+- [def setForegroundRole()](#setforegroundrolearg__1)
+
+- [def setGeometry()](#setgeometryarg__1)
+
+- [def setGraphicsEffect()](#setgraphicseffecteffect)
+
+- [def setInputMethodHints()](#setinputmethodhintshints)
+
+- [def setLayout()](#setlayoutarg__1)
+
+- [def setLayoutDirection()](#setlayoutdirectiondirection)
+
+- [def setLocale()](#setlocalelocale)
+
+- [def setMask()](#setmaskarg__1)
+
+- [def setMaximumHeight()](#setmaximumheightmaxh)
+
+- [def setMaximumSize()](#setmaximumsizearg__1)
+
+- [def setMaximumWidth()](#setmaximumwidthmaxw)
+
+- [def setMinimumHeight()](#setminimumheightminh)
+
+- [def setMinimumSize()](#setminimumsizearg__1)
+
+- [def setMinimumWidth()](#setminimumwidthminw)
+
+- [def setMouseTracking()](#setmousetrackingenable)
+
+- [def setPalette()](#setpalettearg__1)
+
+- [def setParent()](#setparentparent)
+
+- [def setScreen()](#setscreenarg__1)
+
+- [def setShortcutAutoRepeat()](#setshortcutautorepeatid-enabletrue)
+
+- [def setShortcutEnabled()](#setshortcutenabledid-enabletrue)
+
+- [def setSizeIncrement()](#setsizeincrementarg__1)
+
+- [def setSizePolicy()](#setsizepolicyarg__1)
+
+- [def setStatusTip()](#setstatustiparg__1)
+
+- [def setStyle()](#setstylearg__1)
+
+- [def setTabletTracking()](#settablettrackingenable)
+
+- [def setToolTip()](#settooltiparg__1)
+
+- [def setToolTipDuration()](#settooltipdurationmsec)
+
+- [def setUpdatesEnabled()](#setupdatesenabledenable)
+
+- [def setWhatsThis()](#setwhatsthisarg__1)
+
+- [def setWindowFilePath()](#setwindowfilepathfilepath)
+
+- [def setWindowFlag()](#setwindowflagarg__1-ontrue)
+
+- [def setWindowFlags()](#setwindowflagstype)
+
+- [def setWindowIcon()](#setwindowiconicon)
+
+- [def setWindowIconText()](#setwindowicontextarg__1)
+
+- [def setWindowModality()](#setwindowmodalitywindowmodality)
+
+- [def setWindowOpacity()](#setwindowopacitylevel)
+
+- [def setWindowRole()](#setwindowrolearg__1)
+
+- [def setWindowState()](#setwindowstatestate)
+
+- [def size()](#size)
+
+- [def sizeIncrement()](#sizeincrement)
+
+- [def sizePolicy()](#sizepolicy)
+
+- [def stackUnder()](#stackunderarg__1)
+
+- [def statusTip()](#statustip)
+
+- [def style()](#style)
+
+- [def styleSheet()](#stylesheet)
+
+- [def testAttribute()](#testattributearg__1)
+
+- [def toolTip()](#tooltip)
+
+- [def toolTipDuration()](#tooltipduration)
+
+- [def topLevelWidget()](#toplevelwidget)
+
+- [def underMouse()](#undermouse)
+
+- [def ungrabGesture()](#ungrabgesturetype)
+
+- [def unsetCursor()](#unsetcursor)
+
+- [def unsetLayoutDirection()](#unsetlayoutdirection)
+
+- [def unsetLocale()](#unsetlocale)
+
+- [def update()](#update)
+
+- [def updateGeometry()](#updategeometry)
+
+- [def updatesEnabled()](#updatesenabled)
+
+- [def visibleRegion()](#visibleregion)
+
+- [def whatsThis()](#whatsthis)
+
+- [def winId()](#winid)
+
+- [def window()](#window)
+
+- [def windowFilePath()](#windowfilepath)
+
+- [def windowFlags()](#windowflags)
+
+- [def windowHandle()](#windowhandle)
+
+- [def windowIcon()](#windowicon)
+
+- [def windowIconText()](#windowicontext)
+
+- [def windowModality()](#windowmodality)
+
+- [def windowOpacity()](#windowopacity)
+
+- [def windowRole()](#windowrole)
+
+- [def windowState()](#windowstate)
+
+- [def windowTitle()](#windowtitle)
+
+- [def windowType()](#windowtype)
+
+- [def x()](#x)
+
+- [def y()](#y)
+
+
+## Virtual methods
+
+- [def actionEvent()](#actioneventevent)
+
+- [def changeEvent()](#changeeventevent)
+
+- [def closeEvent()](#closeeventevent)
+
+- [def contextMenuEvent()](#contextmenueventevent)
+
+- [def dragEnterEvent()](#dragentereventevent)
+
+- [def dragLeaveEvent()](#dragleaveeventevent)
+
+- [def dragMoveEvent()](#dragmoveeventevent)
+
+- [def dropEvent()](#dropeventevent)
+
+- [def enterEvent()](#entereventevent)
+
+- [def focusInEvent()](#focusineventevent)
+
+- [def focusNextPrevChild()](#focusnextprevchildnext)
+
+- [def focusOutEvent()](#focusouteventevent)
+
+- [def hasHeightForWidth()](#hasheightforwidth)
+
+- [def heightForWidth()](#heightforwidtharg__1)
+
+- [def hideEvent()](#hideeventevent)
+
+- [def inputMethodEvent()](#inputmethodeventevent)
+
+- [def inputMethodQuery()](#inputmethodqueryarg__1)
+
+- [def keyPressEvent()](#keypresseventevent)
+
+- [def keyReleaseEvent()](#keyreleaseeventevent)
+
+- [def leaveEvent()](#leaveeventevent)
+
+- [def minimumSizeHint()](#minimumsizehint)
+
+- [def mouseDoubleClickEvent()](#mousedoubleclickeventevent)
+
+- [def mouseMoveEvent()](#mousemoveeventevent)
+
+- [def mousePressEvent()](#mousepresseventevent)
+
+- [def mouseReleaseEvent()](#mousereleaseeventevent)
+
+- [def moveEvent()](#moveeventevent)
+
+- [def nativeEvent()](#nativeeventeventtype-message)
+
+- [def paintEvent()](#painteventevent)
+
+- [def resizeEvent()](#resizeeventevent)
+
+- [def setVisible()](#setvisiblevisible)
+
+- [def showEvent()](#showeventevent)
+
+- [def sizeHint()](#sizehint)
+
+- [def tabletEvent()](#tableteventevent)
+
+- [def wheelEvent()](#wheeleventevent)
+
+
+## Slots
+
+- [def close()](#close)
+
+- [def hide()](#hide)
+
+- [def lower()](#lower)
+
+- [def raise_()](#raise_)
+
+- [def repaint()](#repaint)
+
+- [def setDisabled()](#setdisabledarg__1)
+
+- [def setEnabled()](#setenabledarg__1)
+
+- [def setFocus()](#setfocus)
+
+- [def setHidden()](#sethiddenhidden)
+
+- [def setStyleSheet()](#setstylesheetstylesheet)
+
+- [def setWindowModified()](#setwindowmodifiedarg__1)
+
+- [def setWindowTitle()](#setwindowtitlearg__1)
+
+- [def show()](#show)
+
+- [def showFullScreen()](#showfullscreen)
+
+- [def showMaximized()](#showmaximized)
+
+- [def showMinimized()](#showminimized)
+
+- [def showNormal()](#shownormal)
+
+- [def update()](#update)
+
+- [def updateMicroFocus()](#updatemicrofocusqueryqtimqueryall)
+
+
+## Signals
+
+- [def customContextMenuRequested()](#customcontextmenurequestedpos)
+
+- [def windowIconChanged()](#windowiconchangedicon)
+
+- [def windowIconTextChanged()](#windowicontextchangedicontext)
+
+- [def windowTitleChanged()](#windowtitlechangedtitle)
+
+
+## Static functions
+
+- [def createWindowContainer()](#static-createwindowcontainerwindow-parentnone-flagsqtwindowflags)
+
+- [def find()](#static-findarg__1)
+
+- [def keyboardGrabber()](#static-keyboardgrabber)
+
+- [def mouseGrabber()](#static-mousegrabber)
+
+- [def setTabOrder()](#static-settaborderarg__1-arg__2)
+
+
+# Detailed Description
+
+The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a Z-order. A widget is clipped by its parent and by the widgets in front of it.
+
+A widget that is not embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable window flags. In Qt, QMainWindow and the various subclasses of QDialog are the most common window types.
+
+Every widget’s constructor accepts one or two standard arguments:
+
+1. QWidget *parent = nullptr is the parent of the new widget. If it is None (the default), the new widget will be a window. If not, it will be a child of parent, and be constrained by parent's geometry (unless you specify Qt::Window as window flag).
+
+2. Qt::WindowFlags f = { } (where available) sets the window flags; the default is suitable for most widgets, but to get, for example, a window without a window system frame, you must use special flags.
+
+QWidget has many member functions, but some of them have little direct functionality; for example, QWidget has a font property, but never uses this itself. There are many subclasses that provide real functionality, such as QLabel , QPushButton , QListWidget , and QTabWidget .
+
+
+## Top-Level and Child Widgets
+
+A widget without a parent widget is always an independent window (top-level widget). For these widgets, setWindowTitle() and setWindowIcon() set the title bar and icon, respectively.
+
+Non-window widgets are child widgets, displayed within their parent widgets. Most widgets in Qt are mainly useful as child widgets. For example, it is possible to display a button as a top-level window, but most people prefer to put their buttons inside other widgets, such as QDialog .
+
+The diagram above shows a QGroupBox widget being used to hold various child widgets in a layout provided by QGridLayout . The QLabel child widgets have been outlined to indicate their full sizes.
+
+If you want to use a QWidget to hold child widgets, you will usually want to add a layout to the parent QWidget . See Layout Management for more information.
+
+
+## Composite Widgets
+
+When a widget is used as a container to group a number of child widgets, it is known as a composite widget. These can be created by constructing a widget with the required visual properties - a QFrame , for example - and adding child widgets to it, usually managed by a layout.
+
+Composite widgets can also be created by subclassing a standard widget, such as QWidget or QFrame , and adding the necessary layout and child widgets in the constructor of the subclass. Many of the examples provided with Qt use this approach, and it is also covered in the Qt Widgets Tutorial .
+
+
+## Custom Widgets and Painting
+
+Since QWidget is a subclass of QPaintDevice, subclasses can be used to display custom content that is composed using a series of painting operations with an instance of the QPainter class. This approach contrasts with the canvas-style approach used by the Graphics View Framework where items are added to a scene by the application and are rendered by the framework itself.
+
+Each widget performs all painting operations from within its paintEvent() function. This is called whenever the widget needs to be redrawn, either because of some external change or when requested by the application.
+
+The Analog Clock example shows how a simple widget can handle paint events.
+
+
+## Size Hints and Size Policies
+
+When implementing a new widget, it is almost always useful to reimplement sizeHint() to provide a reasonable default size for the widget and to set the correct size policy with setSizePolicy() .
+
+By default, composite widgets that do not provide a size hint will be sized according to the space requirements of their child widgets.
+
+The size policy lets you supply good default behavior for the layout management system, so that other widgets can contain and manage yours easily. The default size policy indicates that the size hint represents the preferred size of the widget, and this is often good enough for many widgets.
+
+
+## Events
+
+Widgets respond to events that are typically caused by user actions. Qt delivers events to widgets by calling specific event handler functions with instances of QEvent subclasses containing information about each event.
+
+If your widget only contains child widgets, you probably don’t need to implement any event handlers. If you want to detect a mouse click in a child widget, call the child’s underMouse() function inside the widget’s mousePressEvent() .
+
+The Scribble example implements a wider set of events to handle mouse movement, button presses, and window resizing.
+
+You will need to supply the behavior and content for your own widgets, but here is a brief overview of the events that are relevant to QWidget , starting with the most common ones:
+
+- paintEvent() is called whenever the widget needs to be repainted. Every widget displaying custom content must implement it. Painting using a QPainter can only take place in a paintEvent() or a function called by a paintEvent() .
+
+- resizeEvent() is called when the widget has been resized.
+
+- mousePressEvent() is called when a mouse button is pressed while the mouse cursor is inside the widget, or when the widget has grabbed the mouse using grabMouse() . Pressing the mouse without releasing it is effectively the same as calling grabMouse() .
+
+- mouseReleaseEvent() is called when a mouse button is released. A widget receives mouse release events when it has received the corresponding mouse press event. This means that if the user presses the mouse inside your widget, then drags the mouse somewhere else before releasing the mouse button, your widget receives the release event. There is one exception: if a popup menu appears while the mouse button is held down, this popup immediately steals the mouse events.
+
+- mouseDoubleClickEvent() is called when the user double-clicks in the widget. If the user double-clicks, the widget receives a mouse press event, a mouse release event, (a mouse click event,) a second mouse press, this event and finally a second mouse release event. (Some mouse move events may also be received if the mouse is not held steady during this operation.) It is not possible to distinguish a click from a double-click until the second click arrives. (This is one reason why most GUI books recommend that double-clicks be an extension of single-clicks, rather than trigger a different action.)
+
+Widgets that accept keyboard input need to reimplement a few more event handlers:
+
+- keyPressEvent() is called whenever a key is pressed, and again when a key has been held down long enough for it to auto-repeat. The Tab and Shift+Tab keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement event() .
+
+- focusInEvent() is called when the widget gains keyboard focus (assuming you have called setFocusPolicy() ). Well-behaved widgets indicate that they own the keyboard focus in a clear but discreet way.
+
+- focusOutEvent() is called when the widget loses keyboard focus.
+
+You may be required to also reimplement some of the less common event handlers:
+
+- mouseMoveEvent() is called whenever the mouse moves while a mouse button is held down. This can be useful during drag and drop operations. If you call setMouseTracking (true), you get mouse move events even when no buttons are held down. (See also the Drag and Drop guide.)
+
+- keyReleaseEvent() is called whenever a key is released and while it is held down (if the key is auto-repeating). In that case, the widget will receive a pair of key release and key press event for every repeat. The Tab and Shift+Tab keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement event() .
+
+- wheelEvent() is called whenever the user turns the mouse wheel while the widget has the focus.
+
+- enterEvent() is called when the mouse enters the widget’s screen space. (This excludes screen space owned by any of the widget’s children.)
+
+- leaveEvent() is called when the mouse leaves the widget’s screen space. If the mouse enters a child widget, it will not cause a leaveEvent() .
+
+- moveEvent() is called when the widget has been moved relative to its parent.
+
+- closeEvent() is called when the user closes the widget (or when close() is called).
+
+There are also some rather obscure events described in the documentation for QEvent::Type. To handle these events, you need to reimplement event() directly.
+
+The default implementation of event() handles Tab and Shift+Tab (to move the keyboard focus), and passes on most of the other events to one of the more specialized handlers above.
+
+Events and the mechanism used to deliver them are covered in The Event System.
+
+
+## Groups of Functions and Properties
+
+| Context           | Functions and Properties |
+| ----------------- | ------------------------ |
+| Window functions  | show() , hide() , raise() , lower() , close() . |
+| Top-level windows | windowModified , windowTitle , windowIcon , isActiveWindow , activateWindow() , minimized , showMinimized() , maximized , showMaximized() , fullScreen , showFullScreen() , showNormal() . |
+| Window contents   | update() , repaint() , scroll() . |
+| Geometry          | pos , x() , y() , rect , size , width() , height() , move() , resize() , sizePolicy , sizeHint() , minimumSizeHint() , updateGeometry() , layout() , frameGeometry , geometry , childrenRect , childrenRegion , adjustSize() , mapFromGlobal() , mapToGlobal() , mapFromParent() , mapToParent() , maximumSize , minimumSize , sizeIncrement , baseSize , setFixedSize() |
+| Mode              | visible , isVisibleTo() , enabled , isEnabledTo() , modal , isWindow() , mouseTracking , updatesEnabled , visibleRegion() . |
+| Look and feel     | style() , setStyle() , styleSheet , cursor , font , palette , backgroundRole() , setBackgroundRole() , fontInfo() , fontMetrics() . |
+| Keyboard focus functions | focus , focusPolicy , setFocus() , clearFocus() , setTabOrder() , setFocusProxy() , focusNextChild() , focusPreviousChild() . |
+| Mouse and keyboard grabbing | grabMouse() , releaseMouse() , grabKeyboard() , releaseKeyboard() , mouseGrabber() , keyboardGrabber() . |
+| Event handlers    | event() , mousePressEvent() , mouseReleaseEvent() , mouseDoubleClickEvent() , mouseMoveEvent() , keyPressEvent() , keyReleaseEvent() , focusInEvent() , focusOutEvent() , wheelEvent() , enterEvent() , leaveEvent() , paintEvent() , moveEvent() , resizeEvent() , closeEvent() , dragEnterEvent() , dragMoveEvent() , dragLeaveEvent() , dropEvent() , childEvent(), showEvent() , hideEvent() , customEvent(). changeEvent() , |
+| System functions  | parentWidget() , window() , setParent() , winId() , find() , metric() . |
+| Context menu      | contextMenuPolicy , contextMenuEvent() , customContextMenuRequested() , actions() |
+| Interactive help  | setToolTip() , setWhatsThis() |
+
+
+## Widget Style Sheets
+
+In addition to the standard widget styles for each platform, widgets can also be styled according to rules specified in a style sheet . This feature enables you to customize the appearance of specific widgets to provide visual cues to users about their purpose. For example, a button could be styled in a particular way to indicate that it performs a destructive action.
+
+The use of widget style sheets is described in more detail in the Qt Style Sheets document.
+
+
+## Transparency and Double Buffering
+
+QWidget automatically double-buffers its painting, so there is no need to write double-buffering code in paintEvent() to avoid flicker.
+
+The contents of parent widgets are propagated by default to each of their children as long as Qt::WA_PaintOnScreen is not set. Custom widgets can be written to take advantage of this feature by updating irregular regions (to create non-rectangular child widgets), or painting with colors that have less than full alpha component. The following diagram shows how attributes and properties of a custom widget can be fine-tuned to achieve different effects.
+
+In the above diagram, a semi-transparent rectangular child widget with an area removed is constructed and added to a parent widget (a QLabel showing a pixmap). Then, different properties and widget attributes are set to achieve different effects:
+
+- The left widget has no additional properties or widget attributes set. This default state suits most custom widgets that have transparency, are irregularly-shaped, or do not paint over their entire area with an opaque brush.
+
+- The center widget has the autoFillBackground property set. This property is used with custom widgets that rely on the widget to supply a default background, and do not paint over their entire area with an opaque brush.
+
+- The right widget has the Qt::WA_OpaquePaintEvent widget attribute set. This indicates that the widget will paint over its entire area with opaque colors. The widget’s area will initially be uninitialized, represented in the diagram with a red diagonal grid pattern that shines through the overpainted area.
+
+To rapidly update custom widgets with simple background colors, such as real-time plotting or graphing widgets, it is better to define a suitable background color (using setBackgroundRole() with the QPalette::Window role), set the autoFillBackground property, and only implement the necessary drawing functionality in the widget’s paintEvent() .
+
+To rapidly update custom widgets that constantly paint over their entire areas with opaque content, for example, video streaming widgets, it is better to set the widget’s Qt::WA_OpaquePaintEvent, avoiding any unnecessary overhead associated with repainting the widget’s background.
+
+If a widget has both the Qt::WA_OpaquePaintEvent widget attribute and the autoFillBackground property set, the Qt::WA_OpaquePaintEvent attribute takes precedence. Depending on your requirements, you should choose either one of them.
+
+The contents of parent widgets are also propagated to standard Qt widgets. This can lead to some unexpected results if the parent widget is decorated in a non-standard way, as shown in the diagram below.
+
+The scope for customizing the painting behavior of standard Qt widgets, without resorting to subclassing, is slightly less than that possible for custom widgets. Usually, the desired appearance of a standard widget can be achieved by setting its autoFillBackground property.
+
+
+## Creating Translucent Windows
+
+You can create windows with translucent regions on window systems that support compositing.
+
+To enable this feature in a top-level widget, set its Qt::WA_TranslucentBackground attribute with setAttribute() and ensure that its background is painted with non-opaque colors in the regions you want to be partially transparent.
+
+Platform notes:
+
+- X11: This feature relies on the use of an X server that supports ARGB visuals and a compositing window manager.
+
+- Windows: The widget needs to have the Qt::FramelessWindowHint window flag set for the translucency to work.
+
+- macOS: The widget needs to have the Qt::FramelessWindowHint window flag set for the translucency to work.
+
+
+## Native Widgets vs Alien Widgets
+
+Alien widgets are widgets unknown to the windowing system. They do not have a native window handle associated with them. This feature significantly speeds up widget painting, resizing, and removes flicker.
+
+Should you require the old behavior with native windows, choose one of the following options:
+
+1. Use the QT_USE_NATIVE_WINDOWS=1 in your environment.
+
+2. Set the Qt::AA_NativeWindows attribute on your application. All widgets will be native widgets.
+
+3. Set the Qt::WA_NativeWindow attribute on widgets: The widget itself and all its ancestors will become native (unless Qt::WA_DontCreateNativeAncestors is set).
+
+4. Call winId to enforce a native window (this implies 3).
+
+5. Set the Qt::WA_PaintOnScreen attribute to enforce a native window (this implies 3).
+
+
+--------------------------------
+## class RenderFlag
+
+(inherits enum.Flag) This enum describes how to render the widget when calling render() .
+
+| Constant                     | Description |
+| ---------------------------- | ----------- |
+| QWidget.DrawWindowBackground | If you enable this option, the widget’s background is rendered into the target even if autoFillBackground is not set. By default, this option is enabled. |
+| QWidget.DrawChildren         | If you enable this option, the widget’s children are rendered recursively into the target. By default, this option is enabled. |
+| QWidget.IgnoreMask           | If you enable this option, the widget’s mask() is ignored when rendering into the target. By default, this option is disabled. |
+
+
+--------------------------------
+## property acceptDrops : bool
+
+This property holds whether drop events are enabled for this widget.
+
+Setting this property to true announces to the system that this widget may be able to accept drop events.
+
+If the widget is the desktop ( windowType() == Qt::Desktop), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.
+
+By default, this property is false.
+
+Access functions:
+
+- acceptDrops()
+- setAcceptDrops()
+
+
+--------------------------------
+## property accessibleDescription : str
+
+This property holds the widget’s description as seen by assistive technologies.
+
+The accessible description of a widget should convey what a widget does. While the accessibleName should be a short and concise string (e.g. Save), the description should give more context, such as Saves the current document.
+
+This property has to be localized.
+
+By default, this property contains an empty string and Qt falls back to using the tool tip to provide this information.
+
+Access functions:
+
+- accessibleDescription()
+- setAccessibleDescription()
+
+
+--------------------------------
+## property accessibleName : str
+
+This property holds the widget’s name as seen by assistive technologies.
+
+This is the primary name by which assistive technology such as screen readers announce this widget. For most widgets setting this property is not required. For example for QPushButton the button’s text will be used.
+
+It is important to set this property when the widget does not provide any text. For example a button that only contains an icon needs to set this property to work with screen readers. The name should be short and equivalent to the visual information conveyed by the widget.
+
+This property has to be localized.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- accessibleName()
+- setAccessibleName()
+
+
+--------------------------------
+## property autoFillBackground : bool
+
+This property holds whether the widget background is filled automatically.
+
+If enabled, this property will cause Qt to fill the background of the widget before invoking the paint event. The color used is defined by the QPalette::Window color role from the widget’s palette.
+
+In addition, Windows are always filled with QPalette::Window, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.
+
+This property cannot be turned off (i.e., set to false) if a widget’s parent has a static gradient for its background.
+
+By default, this property is false.
+
+Access functions:
+
+- autoFillBackground()
+- setAutoFillBackground()
+
+
+--------------------------------
+## property baseSize : QSize
+
+This property holds the base size of the widget.
+
+The base size is used to calculate a proper widget size if the widget defines sizeIncrement() .
+
+By default, for a newly-created widget, this property contains a size with zero width and height.
+
+Access functions:
+
+- baseSize()
+- setBaseSize()
+
+
+--------------------------------
+## property childrenRect : QRect
+
+This property holds the bounding rectangle of the widget’s children.
+
+Hidden children are excluded.
+
+By default, for a widget with no children, this property contains a rectangle with zero width and height located at the origin.
+
+Access functions:
+
+- childrenRect()
+
+
+--------------------------------
+## property childrenRegion : QRegion
+
+This property holds the combined region occupied by the widget’s children.
+
+Hidden children are excluded.
+
+By default, for a widget with no children, this property contains an empty region.
+
+Access functions:
+
+- childrenRegion()
+
+
+--------------------------------
+## property contextMenuPolicy : Qt.ContextMenuPolicy
+
+This property holds how the widget shows a context menu.
+
+The default value of this property is Qt::DefaultContextMenu, which means the contextMenuEvent() handler is called. Other values are Qt::NoContextMenu, Qt::PreventContextMenu, Qt::ActionsContextMenu, and Qt::CustomContextMenu. With Qt::CustomContextMenu, the signal customContextMenuRequested() is emitted.
+
+Access functions:
+
+- contextMenuPolicy()
+- setContextMenuPolicy()
+
+
+--------------------------------
+## property cursor : QCursor
+
+This property holds the cursor shape for this widget.
+
+The mouse cursor will assume this shape when it’s over this widget. See the list of predefined cursor objects for a range of useful shapes.
+
+An editor widget might use an I-beam cursor:
+
+```python
+setCursor(Qt.IBeamCursor)
+```
+
+If no cursor has been set, or after a call to unsetCursor(), the parent’s cursor is used.
+
+By default, this property contains a cursor with the Qt::ArrowCursor shape.
+
+Some underlying window implementations will reset the cursor if it leaves a widget even if the mouse is grabbed. If you want to have a cursor set for all widgets, even when outside the window, consider QGuiApplication::setOverrideCursor().
+
+Access functions:
+
+- cursor()
+- setCursor()
+- unsetCursor()
+
+
+--------------------------------
+## property enabled : bool
+
+This property holds whether the widget is enabled.
+
+In general an enabled widget handles keyboard and mouse events; a disabled widget does not. An exception is made with QAbstractButton .
+
+Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can use the changeEvent() with type QEvent::EnabledChange.
+
+Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled. It it not possible to explicitly enable a child widget which is not a window while its parent widget remains disabled.
+
+By default, this property is true.
+
+Access functions:
+
+- isEnabled()
+- setEnabled()
+
+
+--------------------------------
+## property focus : bool
+
+This property holds whether this widget (or its focus proxy) has the keyboard input focus.
+
+By default, this property is false.
+
+Access functions:
+
+- hasFocus()
+
+
+--------------------------------
+## property focusPolicy : Qt.FocusPolicy
+
+This property holds the way the widget accepts keyboard focus.
+
+The policy is Qt::TabFocus if the widget accepts keyboard focus by tabbing, Qt::ClickFocus if the widget accepts focus by clicking, Qt::StrongFocus if it accepts both, and Qt::NoFocus (the default) if it does not accept focus at all.
+
+You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget’s constructor. For instance, the QLineEdit constructor calls setFocusPolicy(Qt::StrongFocus).
+
+If the widget has a focus proxy, then the focus policy will be propagated to it.
+
+Access functions:
+
+- focusPolicy()
+- setFocusPolicy()
+
+
+--------------------------------
+## property font : QFont
+
+This property holds the font currently set for the widget.
+
+This property describes the widget’s requested font. The font is used by the widget’s style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform’s look and feel. It’s common that different platforms, or different styles, define different fonts for an application.
+
+When you assign a new font to a widget, the properties from this font are combined with the widget’s default font to form the widget’s final font. You can call fontInfo() to get a copy of the widget’s final font. The final font is also used to initialize QPainter’s font.
+
+The default depends on the system environment. QApplication maintains a system/theme font which serves as a default for all widgets. There may also be special font defaults for certain types of widgets. You can also define default fonts for widgets yourself by passing a custom font and the name of a widget to setFont() . Finally, the font is matched against Qt’s font database to find the best match.
+
+QWidget propagates explicit font properties from parent to child. If you change a specific property on a font and assign that font to a widget, that property will propagate to all the widget’s children, overriding any system defaults for that property. Note that fonts by default don’t propagate to windows (see isWindow() ) unless the Qt::WA_WindowPropagation attribute is enabled.
+
+QWidget ‘s font propagation is similar to its palette propagation.
+
+The current style, which is used to render the content of all standard Qt widgets, is free to choose to use the widget font, or in some cases, to ignore it (partially, or completely). In particular, certain styles like GTK style, Mac style, and Windows Vista style, apply special modifications to the widget font to match the platform’s native look and feel. Because of this, assigning properties to a widget’s font is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a styleSheet .
+
+Access functions:
+
+- font()
+- setFont()
+
+
+--------------------------------
+## property frameGeometry : QRect
+
+This property holds geometry of the widget relative to its parent including any window frame.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+- frameGeometry()
+
+
+--------------------------------
+## property frameSize : QSize
+
+This property holds the size of the widget including any window frame.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+- frameSize()
+
+
+--------------------------------
+## property fullScreen : bool
+
+This property holds whether the widget is shown in full screen mode.
+
+A widget in full screen mode occupies the whole screen area and does not display window decorations, such as a title bar.
+
+By default, this property is false.
+
+Access functions:
+
+- isFullScreen()
+
+
+--------------------------------
+## property geometry : QRect
+
+This property holds the geometry of the widget relative to its parent and excluding the window frame.
+
+When changing the geometry, the widget, if visible, receives a move event ( moveEvent() ) and/or a resize event ( resizeEvent() ) immediately. If the widget is not currently visible, it is guaranteed to receive appropriate events before it is shown.
+
+The size component is adjusted if it lies outside the range defined by minimumSize() and maximumSize() .
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+- geometry()
+- setGeometry()
+
+
+--------------------------------
+## property height : int
+
+This property holds the height of the widget excluding any window frame.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+
+--------------------------------
+## property inputMethodHints : Combination of Qt.InputMethodHint
+
+This property holds What input method specific hints the widget has..
+
+This is only relevant for input widgets. It is used by the input method to retrieve hints as to how the input method should operate. For example, if the Qt::ImhFormattedNumbersOnly flag is set, the input method may change its visual components to reflect that only numbers can be entered.
+
+
+--------------------------------
+## The default value is Qt::ImhNone.
+
+Access functions:
+
+- inputMethodHints()
+- setInputMethodHints()
+
+
+--------------------------------
+## property isActiveWindow : bool
+
+This property holds whether this widget’s window is the active window.
+
+The active window is the window that contains the widget that has keyboard focus (The window may still have focus if it has no widgets or none of its widgets accepts keyboard focus).
+
+When popup windows are visible, this property is true for both the active window and for the popup.
+
+By default, this property is false.
+
+Access functions:
+
+- isActiveWindow()
+
+
+--------------------------------
+## property layoutDirection : Qt.LayoutDirection
+
+This property holds the layout direction for this widget..
+
+By default, this property is set to Qt::LeftToRight.
+
+When the layout direction is set on a widget, it will propagate to the widget’s children, but not to a child that is a window and not to a child for which setLayoutDirection() has been explicitly called. Also, child widgets added after setLayoutDirection() has been called for the parent do not inherit the parent’s layout direction.
+
+Access functions:
+
+- layoutDirection()
+- setLayoutDirection()
+- unsetLayoutDirection()
+
+
+--------------------------------
+## property locale : QLocale
+
+This property holds the widget’s locale.
+
+As long as no special locale has been set, this is either the parent’s locale or (if this widget is a top level widget), the default locale.
+
+If the widget displays dates or numbers, these should be formatted using the widget’s locale.
+
+Access functions:
+
+- locale()
+- setLocale()
+- unsetLocale()
+
+
+--------------------------------
+## property maximized : bool
+
+This property holds whether this widget is maximized.
+
+This property is only relevant for windows.
+
+By default, this property is false.
+
+Access functions:
+
+- isMaximized()
+
+
+--------------------------------
+## property maximumHeight : int
+
+This property holds the widget’s maximum height in pixels.
+
+This property corresponds to the height held by the maximumSize property.
+
+By default, this property contains a value of 16777215.
+
+Access functions:
+
+- maximumHeight()
+- setMaximumHeight()
+
+
+--------------------------------
+## property maximumSize : QSize
+
+This property holds the widget’s maximum size in pixels.
+
+The widget cannot be resized to a larger size than the maximum widget size.
+
+By default, this property contains a size in which both width and height have values of 16777215.
+
+Access functions:
+
+- maximumSize()
+- setMaximumSize()
+
+
+--------------------------------
+## property maximumWidth : int
+
+This property holds the widget’s maximum width in pixels.
+
+This property corresponds to the width held by the maximumSize property.
+
+By default, this property contains a value of 16777215.
+
+Access functions:
+
+- maximumWidth()
+- setMaximumWidth()
+
+
+--------------------------------
+## property minimized : bool
+
+This property holds whether this widget is minimized (iconified).
+
+This property is only relevant for windows.
+
+By default, this property is false.
+
+Access functions:
+
+- isMinimized()
+
+
+--------------------------------
+## property minimumHeight : int
+
+This property holds the widget’s minimum height in pixels.
+
+This property corresponds to the height held by the minimumSize property.
+
+By default, this property has a value of 0.
+
+Access functions:
+
+- minimumHeight()
+- setMinimumHeight()
+
+
+--------------------------------
+## property minimumSize : QSize
+
+This property holds the widget’s minimum size.
+
+The widget cannot be resized to a smaller size than the minimum widget size. The widget’s size is forced to the minimum size if the current size is smaller.
+
+The minimum size set by this function will override the minimum size defined by QLayout . To unset the minimum size, use a value of QSize(0, 0).
+
+By default, this property contains a size with zero width and height.
+
+Access functions:
+
+- minimumSize()
+- setMinimumSize()
+
+
+--------------------------------
+## property minimumSizeHint : QSize
+
+This property holds the recommended minimum size for the widget.
+
+If the value of this property is an invalid size, no minimum size is recommended.
+
+The default implementation of minimumSizeHint() returns an invalid size if there is no layout for this widget, and returns the layout’s minimum size otherwise. Most built-in widgets reimplement minimumSizeHint().
+
+QLayout will never resize a widget to a size smaller than the minimum size hint unless minimumSize() is set or the size policy is set to QSizePolicy::Ignore. If minimumSize() is set, the minimum size hint will be ignored.
+
+Access functions:
+
+- minimumSizeHint()
+
+
+--------------------------------
+## property minimumWidth : int
+
+This property holds the widget’s minimum width in pixels.
+
+This property corresponds to the width held by the minimumSize property.
+
+By default, this property has a value of 0.
+
+Access functions:
+
+- minimumWidth()
+- setMinimumWidth()
+
+
+--------------------------------
+## property modal : bool
+
+This property holds whether the widget is a modal widget.
+
+This property only makes sense for windows. A modal widget prevents widgets in all other windows from getting any input.
+
+By default, this property is false.
+
+Access functions:
+
+- isModal()
+
+
+--------------------------------
+## property mouseTracking : bool
+
+This property holds whether mouse tracking is enabled for the widget.
+
+If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.
+
+If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.
+
+Access functions:
+
+- hasMouseTracking()
+- setMouseTracking()
+
+
+--------------------------------
+## property normalGeometry : QRect
+
+This property holds the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget.
+
+If the widget is already in this state the normal geometry will reflect the widget’s current geometry() .
+
+For child widgets this property always holds an empty rectangle.
+
+By default, this property contains an empty rectangle.
+
+Access functions:
+
+- normalGeometry()
+
+
+--------------------------------
+## property palette : QPalette
+
+This property holds the widget’s palette.
+
+This property describes the widget’s palette. The palette is used by the widget’s style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform’s look and feel. It’s common that different platforms, or different styles, have different palettes.
+
+When you assign a new palette to a widget, the color roles from this palette are combined with the widget’s default palette to form the widget’s final palette. The palette entry for the widget’s background role is used to fill the widget’s background (see autoFillBackground ), and the foreground role initializes QPainter’s pen.
+
+The default depends on the system environment. QApplication maintains a system/theme palette which serves as a default for all widgets. There may also be special palette defaults for certain types of widgets (e.g., on Windows Vista, all classes that derive from QMenuBar have a special default palette). You can also define default palettes for widgets yourself by passing a custom palette and the name of a widget to setPalette() . Finally, the style always has the option of polishing the palette as it’s assigned (see polish() ).
+
+QWidget propagates explicit palette roles from parent to child. If you assign a brush or color to a specific role on a palette and assign that palette to a widget, that role will propagate to all the widget’s children, overriding any system defaults for that role. Note that palettes by default don’t propagate to windows (see isWindow() ) unless the Qt::WA_WindowPropagation attribute is enabled.
+
+QWidget ‘s palette propagation is similar to its font propagation.
+
+The current style, which is used to render the content of all standard Qt widgets, is free to choose colors and brushes from the widget palette, or, in some cases, to ignore the palette (partially, or completely). In particular, certain styles like GTK style, Mac style, and Windows Vista style, depend on third party APIs to render the content of widgets, and these styles typically do not follow the palette. Because of this, assigning roles to a widget’s palette is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a styleSheet .
+
+Access functions:
+
+- palette()
+- setPalette()
+
+
+--------------------------------
+## property pos : QPoint
+
+This property holds the position of the widget within its parent widget.
+
+If the widget is a window, the position is that of the widget on the desktop, including its frame.
+
+When changing the position, the widget, if visible, receives a move event ( moveEvent() ) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.
+
+By default, this property contains a position that refers to the origin.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+Access functions:
+
+- pos()
+- move()
+
+
+--------------------------------
+## property rect : QRect
+
+This property holds the internal geometry of the widget excluding any window frame.
+
+The rect property equals QRect(0, 0, width() , height() ).
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+- rect()
+
+
+--------------------------------
+## property size : QSize
+
+This property holds the size of the widget excluding any window frame.
+
+If the widget is visible when it is being resized, it receives a resize event ( resizeEvent() ) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.
+
+The size is adjusted if it lies outside the range defined by minimumSize() and maximumSize() .
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+- size()
+- resize()
+
+
+--------------------------------
+## property sizeHint : QSize
+
+This property holds the recommended size for the widget.
+
+If the value of this property is an invalid size, no size is recommended.
+
+The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout’s preferred size otherwise.
+
+Access functions:
+
+- sizeHint()
+
+
+--------------------------------
+## property sizeIncrement : QSize
+
+This property holds the size increment of the widget.
+
+When the user resizes the window, the size will move in steps of sizeIncrement(). width() pixels horizontally and sizeIncrement. height() pixels vertically, with baseSize() as the basis. Preferred widget sizes are for non-negative integers i and j:
+
+width = baseSize().width() + i * sizeIncrement().width()
+height = baseSize().height() + j * sizeIncrement().height()
+Note that while you can set the size increment for all widgets, it only affects windows.
+
+By default, this property contains a size with zero width and height.
+
+Access functions:
+
+- sizeIncrement()
+- setSizeIncrement()
+
+
+--------------------------------
+## property sizePolicy : QSizePolicy
+
+This property holds the default layout behavior of the widget.
+
+If there is a QLayout that manages this widget’s children, the size policy specified by that layout is used. If there is no such QLayout , the result of this function is used.
+
+The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size sizeHint() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as QLineEdit , QSpinBox or an editable QComboBox ) and other horizontally orientated widgets (such as QProgressBar ). QToolButton ‘s are normally square, so they allow growth in both directions. Widgets that support different directions (such as QSlider , QScrollBar or QHeader) specify stretching in the respective direction only. Widgets that can provide scroll bars (usually subclasses of QScrollArea ) tend to specify that they can use additional space, and that they can make do with less than sizeHint() .
+
+Access functions:
+
+- sizePolicy()
+- setSizePolicy()
+
+
+--------------------------------
+## property statusTip : str
+
+This property holds the widget’s status tip.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- statusTip()
+- setStatusTip()
+
+
+--------------------------------
+## property styleSheet : str
+
+This property holds the widget’s style sheet.
+
+The style sheet contains a textual description of customizations to the widget’s style, as described in the Qt Style Sheets document.
+
+Since Qt 4.5, Qt style sheets fully supports macOS.
+
+Access functions:
+
+- styleSheet()
+- setStyleSheet()
+
+
+--------------------------------
+## property tabletTracking : bool
+
+This property holds whether tablet tracking is enabled for the widget.
+
+If tablet tracking is disabled (the default), the widget only receives tablet move events when the stylus is in contact with the tablet, or at least one stylus button is pressed, while the stylus is being moved.
+
+If tablet tracking is enabled, the widget receives tablet move events even while hovering in proximity. This is useful for monitoring position as well as the auxiliary properties such as rotation and tilt, and providing feedback in the UI.
+
+Access functions:
+
+- hasTabletTracking()
+- setTabletTracking()
+
+
+--------------------------------
+## property toolTip : str
+
+This property holds the widget’s tooltip.
+
+Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
+
+If you want to control a tooltip’s behavior, you can intercept the event() function and catch the QEvent::ToolTip event (e.g., if you want to customize the area for which the tooltip should be shown).
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- toolTip()
+- setToolTip()
+
+
+--------------------------------
+## property toolTipDuration : int
+
+This property holds the widget’s tooltip duration.
+
+Specifies how long time the tooltip will be displayed, in milliseconds. If the value is -1 (default) the duration is calculated depending on the length of the tooltip.
+
+Access functions:
+
+- toolTipDuration()
+- setToolTipDuration()
+
+
+--------------------------------
+## property updatesEnabled : bool
+
+This property holds whether updates are enabled.
+
+An updates enabled widget receives paint events and has a system background; a disabled widget does not. This also implies that calling update() and repaint() has no effect if updates are disabled.
+
+By default, this property is true.
+
+setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes. In Qt, widgets normally do not generate screen flicker, but on X11 the server might erase regions on the screen when widgets get hidden before they can be replaced by other widgets. Disabling updates solves this.
+
+Example:
+
+```bash
+setUpdatesEnabled(False)
+bigVisualChanges()
+setUpdatesEnabled(True)
+```
+
+Disabling a widget implicitly disables all its children. Enabling a widget enables all child widgets except top-level widgets or those that have been explicitly disabled. Re-enabling updates implicitly calls update() on the widget.
+
+Access functions:
+
+- updatesEnabled()
+- setUpdatesEnabled()
+
+
+--------------------------------
+## property visible : bool
+
+This property holds whether the widget is visible.
+
+Calling setVisible(true) or show() sets the widget to visible status if all its parent widgets up to the window are visible. If an ancestor is not visible, the widget won’t become visible until all its ancestors are shown. If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown. If the widget has not been resized yet, Qt will adjust the widget’s size to a useful default using adjustSize() .
+
+Calling setVisible(false) or hide() hides a widget explicitly. An explicitly hidden widget will never become visible, even if all its ancestors become visible, unless you show it.
+
+A widget receives show and hide events when its visibility status changes. Between a hide and a show event, there is no need to waste CPU cycles preparing or displaying information to the user. A video application, for example, might simply stop generating new frames.
+
+A widget that happens to be obscured by other windows on the screen is considered to be visible. The same applies to iconified windows and windows that exist on another virtual desktop (on platforms that support this concept). A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again.
+
+You seldom have to reimplement the setVisible() function. If you need to change some settings before a widget is shown, use showEvent() instead. If you need to do some delayed initialization use the Polish event delivered to the event() function.
+
+Access functions:
+
+- isVisible()
+- setVisible()
+
+
+--------------------------------
+## property whatsThis : str
+
+This property holds the widget’s What’s This help text..
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- whatsThis()
+- setWhatsThis()
+
+
+--------------------------------
+## property width : int
+
+This property holds the width of the widget excluding any window frame.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property contains a value that depends on the user’s platform and screen geometry.
+
+Access functions:
+
+
+--------------------------------
+## property windowFilePath : str
+
+This property holds the file path associated with a widget.
+
+This property only makes sense for windows. It associates a file path with a window. If you set the file path, but have not set the window title, Qt sets the window title to the file name of the specified path, obtained using QFileInfo::fileName().
+
+If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string.
+
+Additionally, on macOS, this has an added benefit that it sets the proxy icon for the window, assuming that the file path exists.
+
+If no file path is set, this property contains an empty string.
+
+By default, this property contains an empty string.
+
+Access functions:
+
+- windowFilePath()
+- setWindowFilePath()
+
+
+--------------------------------
+## property windowIcon : QIcon
+
+This property holds the widget’s icon.
+
+This property only makes sense for windows. If no icon has been set, windowIcon() returns the application icon (QApplication::windowIcon()).
+
+Access functions:
+
+- windowIcon()
+- setWindowIcon()
+- Signal windowIconChanged()
+
+
+--------------------------------
+## property windowIconText : str
+
+This property holds the text to be displayed on the icon of a minimized window.
+
+This property only makes sense for windows. If no icon text has been set, this accessor returns an empty string. It is only implemented on the X11 platform, and only certain window managers use this window property.
+
+This property is deprecated.
+
+Access functions:
+
+- windowIconText()
+- setWindowIconText()
+- Signal windowIconTextChanged()
+
+
+--------------------------------
+## property windowModality : Qt.WindowModality
+
+This property holds which windows are blocked by the modal widget.
+
+This property only makes sense for windows. A modal widget prevents widgets in other windows from getting input. The value of this property controls which windows are blocked when the widget is visible. Changing this property while the window is visible has no effect; you must hide() the widget first, then show() it again.
+
+By default, this property is Qt::NonModal.
+
+Access functions:
+
+- windowModality()
+- setWindowModality()
+
+
+--------------------------------
+## property windowModified : bool
+
+This property holds whether the document shown in the window has unsaved changes.
+
+A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects varied by the platform. On macOS the close button will have a modified look; on other platforms, the window title will have an ‘*’ (asterisk).
+
+The window title must contain a “[*]” placeholder, which indicates where the ‘*’ should appear. Normally, it should appear right after the file name (e.g., “document1.txt[*] - Text Editor”). If the window isn’t modified, the placeholder is simply removed.
+
+Note that if a widget is set as modified, all its ancestors will also be set as modified. However, if you call setWindowModified(false) on a widget, this will not propagate to its parent because other children of the parent might have been modified.
+
+Access functions:
+
+- isWindowModified()
+- setWindowModified()
+
+
+--------------------------------
+## property windowOpacity : float
+
+This property holds The level of opacity for the window..
+
+The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).
+
+By default the value of this property is 1.0.
+
+This feature is available on Embedded Linux, macOS, Windows, and X11 platforms that support the Composite extension.
+
+Access functions:
+
+- windowOpacity()
+- setWindowOpacity()
+
+
+--------------------------------
+## property windowTitle : str
+
+This property holds the window title (caption).
+
+This property only makes sense for top-level widgets, such as windows and dialogs. If no caption has been set, the title is based of the windowFilePath . If neither of these is set, then the title is an empty string.
+
+If you use the windowModified mechanism, the window title must contain a “[*]” placeholder, which indicates where the ‘*’ should appear. Normally, it should appear right after the file name (e.g., “document1.txt[*] - Text Editor”). If the windowModified property is false (the default), the placeholder is simply removed.
+
+On some desktop platforms (including Windows and Unix), the application name (from QGuiApplication::applicationDisplayName) is added at the end of the window title, if set. This is done by the QPA plugin, so it is shown to the user, but isn’t part of the windowTitle string.
+
+Access functions:
+
+- windowTitle()
+- setWindowTitle()
+- Signal windowTitleChanged()
+
+
+--------------------------------
+## property x : int
+
+This property holds the x coordinate of the widget relative to its parent including any window frame.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property has a value of 0.
+
+Access functions:
+
+- x()
+
+
+--------------------------------
+## property y : int
+
+This property holds the y coordinate of the widget relative to its parent and including any window frame.
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+By default, this property has a value of 0.
+
+Access functions:
+
+- y()
+
+
+--------------------------------
+## __init__([parent=None[, f=Qt.WindowFlags()]])
+
+Parameters:
+
+- parent – QWidget
+- f – Combination of WindowType
+
+Constructs a widget which is a child of parent, with widget flags set to f.
+
+If parent is None, the new widget becomes a window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.
+
+The widget flags argument, f, is normally 0, but it can be set to customize the frame of a window (i.e. parent must be None). To customize the frame, use a value composed from the bitwise OR of any of the window flags.
+
+If you add a child widget to an already visible widget you must explicitly show the child to make it visible.
+
+Note that the X11 version of Qt may not be able to deliver all combinations of style flags on all systems. This is because on X11, Qt can only ask the window manager, and the window manager can override the application’s settings. On Windows, Qt can set whatever flags you want.
+
+
+--------------------------------
+## acceptDrops()
+
+Return type: bool
+
+Getter of property acceptDrops  .
+
+
+--------------------------------
+## accessibleDescription()
+
+Return type: str
+
+Getter of property accessibleDescription  .
+
+
+--------------------------------
+## accessibleName()
+
+Return type: str
+
+Getter of property accessibleName  .
+
+
+--------------------------------
+## actionEvent(event)
+
+Parameters:
+
+- event – QActionEvent
+
+This event handler is called with the given event whenever the widget’s actions are changed.
+
+
+--------------------------------
+## actions()
+
+Return type: list of QAction
+
+Returns the (possibly empty) list of this widget’s actions.
+
+
+--------------------------------
+## activateWindow()
+
+Sets the top-level widget containing this widget to be the active window.
+
+An active window is a visible top-level window that has the keyboard input focus.
+
+This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call raise() . Note that the window must be visible, otherwise activateWindow() has no effect.
+
+On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.
+
+
+--------------------------------
+## addAction(icon, text, receiver, member[, type=Qt.AutoConnection])
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+Return type: QAction
+
+
+--------------------------------
+addAction(text, receiver, member[, type=Qt.AutoConnection])
+
+Parameters:
+
+- text – str
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(text, shortcut, receiver, member[, type=Qt.AutoConnection])
+
+Parameters:
+
+- text – str
+- shortcut – QKeySequence
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(text, shortcut)
+
+Parameters:
+
+- text – str
+- shortcut – QKeySequence
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(text)
+
+Parameters:
+
+- text – str
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut, receiver, member[, type=Qt.AutoConnection])
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut)
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(icon, text)
+
+Parameters:
+
+- icon – QIcon
+- text – str
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(text, shortcut, callable)
+
+Parameters:
+
+- text – str
+- shortcut – QKeySequence
+- callable – object
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(text, callable)
+
+Parameters:
+
+- text – str
+- callable – object
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut, callable)
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+- callable – object
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(icon, text, callable)
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- callable – object
+
+Return type: QAction
+
+
+--------------------------------
+## addAction(action)
+
+Parameters:
+
+- action – QAction
+
+Appends the action action to this widget’s list of actions.
+
+All QWidgets have a list of QActions. However, they can be represented graphically in many different ways. The default use of the QAction list (as returned by actions() ) is to create a context QMenu .
+
+A QWidget should only have one of each action and adding an action it already has will not cause the same action to be in the widget twice.
+
+The ownership of action is not transferred to this QWidget .
+
+
+--------------------------------
+## addActions(actions)
+
+Parameters:
+
+- actions – list of QAction
+
+Appends the actions actions to this widget’s list of actions.
+
+
+--------------------------------
+## adjustSize()
+
+Adjusts the size of the widget to fit its contents.
+
+This function uses sizeHint() if it is valid, i.e., the size hint’s width and height are >= 0. Otherwise, it sets the size to the children rectangle that covers all child widgets (the union of all child widget rectangles).
+
+For windows, the screen size is also taken into account. If the sizeHint() is less than (200, 100) and the size policy is expanding , the window will be at least (200, 100). The maximum size of a window is 2/3 of the screen’s width and height.
+
+
+--------------------------------
+## autoFillBackground()
+
+Return type: bool
+
+Getter of property autoFillBackground  .
+
+
+--------------------------------
+## backgroundRole()
+
+Return type: ColorRole
+
+Returns the background role of the widget.
+
+The background role defines the brush from the widget’s palette that is used to render the background.
+
+If no explicit background role is set, the widget inherits its parent widget’s background role.
+
+
+--------------------------------
+## backingStore()
+
+Return type: QBackingStore
+
+Returns the QBackingStore this widget will be drawn into.
+
+
+--------------------------------
+## baseSize()
+
+Return type: QSize
+
+Getter of property baseSize  .
+
+
+--------------------------------
+## changeEvent(event)
+
+Parameters:
+
+- event – QEvent
+
+This event handler can be reimplemented to handle state changes.
+
+The state being changed in this event can be retrieved through the event supplied.
+
+Change events include: QEvent::ToolBarChange, QEvent::ActivationChange, QEvent::EnabledChange, QEvent::FontChange, QEvent::StyleChange, QEvent::PaletteChange, QEvent::WindowTitleChange, QEvent::IconTextChange, QEvent::ModifiedChange, QEvent::MouseTrackingChange, QEvent::ParentChange, QEvent::WindowStateChange, QEvent::LanguageChange, QEvent::LocaleChange, QEvent::LayoutDirectionChange, QEvent::ReadOnlyChange.
+
+
+--------------------------------
+## childAt(p)
+
+Parameters:
+
+- p – QPoint
+
+Return type: QWidget
+
+This is an overloaded function.
+
+Returns the visible child widget at point p in the widget’s own coordinate system.
+
+
+--------------------------------
+## childAt(x, y)
+
+Parameters:
+
+- x – int
+- y – int
+
+Return type: QWidget
+
+Returns the visible child widget at the position (x, y) in the widget’s coordinate system. If there is no visible child widget at the specified position, the function returns None.
+
+
+--------------------------------
+## childrenRect()
+
+Return type: QRect
+
+Getter of property childrenRect  .
+
+
+--------------------------------
+## childrenRegion()
+
+Return type: QRegion
+
+Getter of property childrenRegion  .
+
+
+--------------------------------
+## clearFocus()
+
+Takes keyboard input focus from the widget.
+
+If the widget has active focus, a focus out event is sent to this widget to tell it that it has lost the focus.
+
+This widget must enable focus setting to get the keyboard input focus; that is, it must call setFocusPolicy() .
+
+
+--------------------------------
+## clearMask()
+
+Removes any mask set by setMask() .
+
+
+--------------------------------
+## close()
+
+Return type: bool
+
+Closes this widget. Returns true if the widget was closed; otherwise returns false.
+
+First it sends the widget a QCloseEvent. The widget is hidden if it accepts the close event. If it ignores the event, nothing happens. The default implementation of closeEvent() accepts the close event.
+
+If the widget has the Qt::WA_DeleteOnClose flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.
+
+The QGuiApplication::lastWindowClosed() signal is emitted when the last visible primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose attribute set is closed. By default this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus.
+
+
+--------------------------------
+## closeEvent(event)
+
+Parameters:
+
+- event – QCloseEvent
+
+This event handler is called with the given event when Qt receives a window close request for a top-level widget from the window system.
+
+By default, the event is accepted and the widget is closed. You can reimplement this function to change the way the widget responds to window close requests. For example, you can prevent the window from closing by calling ignore() on all events.
+
+Main window applications typically use reimplementations of this function to check whether the user’s work has been saved and ask for permission before closing.
+
+
+--------------------------------
+## contentsMargins()
+
+Return type:
+
+- QMargins
+
+The contentsMargins function returns the widget’s contents margins.
+
+
+--------------------------------
+## contentsRect()
+
+Return type: QRect
+
+Returns the area inside the widget’s margins.
+
+
+--------------------------------
+## contextMenuEvent(event)
+
+Parameters:
+
+- event – QContextMenuEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive widget context menu events.
+
+The handler is called when the widget’s contextMenuPolicy is Qt::DefaultContextMenu.
+
+The default implementation ignores the context event. See the QContextMenuEvent documentation for more details.
+
+
+--------------------------------
+## contextMenuPolicy()
+
+Return type: ContextMenuPolicy
+
+Getter of property contextMenuPolicy  .
+
+
+--------------------------------
+## create([arg__1=0[, initializeWindow=true[, destroyOldWindow=true]]])
+
+Parameters:
+
+- arg__1 – WId
+- initializeWindow – bool
+- destroyOldWindow – bool
+
+Creates a new widget window.
+
+The parameters window, initializeWindow, and destroyOldWindow are ignored in Qt 5. Please use QWindow::fromWinId() to create a QWindow wrapping a foreign window and pass it to createWindowContainer() instead.
+
+
+--------------------------------
+## createWinId()
+## static createWindowContainer(window[, parent=None[, flags=Qt.WindowFlags()]])
+
+Parameters:
+
+- window – QWindow
+- parent – QWidget
+- flags – Combination of WindowType
+
+Return type: QWidget
+
+Creates a QWidget that makes it possible to embed window into a QWidget -based application.
+
+The window container is created as a child of parent and with window flags flags.
+
+Once the window has been embedded into the container, the container will control the window’s geometry and visibility. Explicit calls to QWindow::setGeometry(), QWindow::show() or QWindow::hide() on an embedded window is not recommended.
+
+The container takes over ownership of window. The window can be removed from the window container with a call to QWindow::setParent().
+
+The window container is attached as a native child window to the toplevel window it is a child of. When a window container is used as a child of a QAbstractScrollArea or QMdiArea , it will create a native window for every widget in its parent chain to allow for proper stacking and clipping in this use case. Creating a native window for the window container also allows for proper stacking and clipping. This must be done before showing the window container. Applications with many native child windows may suffer from performance issues.
+
+The window container has a number of known limitations:
+
+Stacking order; The embedded window will stack on top of the widget hierarchy as an opaque box. The stacking order of multiple overlapping window container instances is undefined.
+
+Rendering Integration; The window container does not interoperate with QGraphicsProxyWidget , render() or similar functionality.
+
+Focus Handling; It is possible to let the window container instance have any focus policy and it will delegate focus to the window via a call to QWindow::requestActivate(). However, returning to the normal focus chain from the QWindow instance will be up to the QWindow instance implementation itself. For instance, when entering a Qt Quick based window with tab focus, it is quite likely that further tab presses will only cycle inside the QML application. Also, whether QWindow::requestActivate() actually gives the window focus, is platform dependent.
+
+Using many window container instances in a QWidget -based application can greatly hurt the overall performance of the application.
+
+Since 6.7, if window belongs to a widget (that is, window was received from calling windowHandle() ), no container will be created. Instead, this function will return the widget itself, after being reparented to parent. Since no container will be created, flags will be ignored. In other words, if window belongs to a widget, consider just reparenting that widget to parent instead of using this function.
+
+
+--------------------------------
+## cursor()
+
+Return type: QCursor
+
+Getter of property cursor  .
+
+
+--------------------------------
+## customContextMenuRequested(pos)
+
+Parameters:
+
+- pos – QPoint
+
+This signal is emitted when the widget’s contextMenuPolicy is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position pos is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is QAbstractScrollArea and its subclasses that map the context menu event to coordinates of the viewport() .
+
+
+--------------------------------
+## destroy([destroyWindow=true[, destroySubWindows=true]])
+
+Parameters:
+
+- destroyWindow – bool
+- destroySubWindows – bool
+
+Frees up window system resources. Destroys the widget window if destroyWindow is true.
+
+destroy() calls itself recursively for all the child widgets, passing destroySubWindows for the destroyWindow parameter. To have more control over destruction of subwidgets, destroy subwidgets selectively first.
+
+This function is usually called from the QWidget destructor.
+
+
+--------------------------------
+## dragEnterEvent(event)
+
+Parameters:
+
+- event – QDragEnterEvent
+
+This event handler is called when a drag is in progress and the mouse enters this widget. The event is passed in the event parameter.
+
+If the event is ignored, the widget won’t receive any drag move events .
+
+See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
+
+
+--------------------------------
+## dragLeaveEvent(event)
+
+Parameters:
+
+- event – QDragLeaveEvent
+
+This event handler is called when a drag is in progress and the mouse leaves this widget. The event is passed in the event parameter.
+
+See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
+
+
+--------------------------------
+## dragMoveEvent(event)
+
+Parameters:
+
+- event – QDragMoveEvent
+
+This event handler is called if a drag is in progress, and when any of the following conditions occur: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus. The event is passed in the event parameter.
+
+See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
+
+
+--------------------------------
+## dropEvent(event)
+
+Parameters:
+
+- event – QDropEvent
+
+This event handler is called when the drag is dropped on this widget. The event is passed in the event parameter.
+
+See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
+
+
+--------------------------------
+## effectiveWinId()
+
+Return type: WId
+
+Returns the effective window system identifier of the widget, i.e. the native parent’s window system identifier.
+
+If the widget is native, this function returns the native widget ID. Otherwise, the window ID of the first native parent widget, i.e., the top-level widget that contains this widget, is returned.
+
+
+--------------------------------
+## ensurePolished()
+
+Ensures that the widget and its children have been polished by QStyle (i.e., have a proper font and palette).
+
+QWidget calls this function after it has been fully constructed but before it is shown the very first time. You can call this function if you want to ensure that the widget is polished before doing an operation, e.g., the correct font size might be needed in the widget’s sizeHint() reimplementation. Note that this function is called from the default implementation of sizeHint() .
+
+Polishing is useful for final initialization that must happen after all constructors (from base classes as well as from subclasses) have been called.
+
+If you need to change some settings when a widget is polished, reimplement event() and handle the QEvent::Polish event type.
+
+
+--------------------------------
+## enterEvent(event)
+
+Parameters:
+
+- event – QEnterEvent
+
+This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the event parameter.
+
+An event is sent to the widget when the mouse cursor enters the widget.
+
+
+--------------------------------
+## static find(arg__1)
+
+Parameters:
+
+- arg__1 – WId
+
+Return type: QWidget
+
+Returns a pointer to the widget with window identifier/handle id.
+
+The window identifier type depends on the underlying window system, see qwindowdefs.h for the actual definition. If there is no widget with this identifier, None is returned.
+
+
+--------------------------------
+## focusInEvent(event)
+
+Parameters:
+
+- event – QFocusEvent
+
+This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget. The event is passed in the event parameter
+
+A widget normally must setFocusPolicy() to something other than Qt::NoFocus to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)
+
+The default implementation updates the widget (except for windows that do not specify a focusPolicy() ).
+
+
+--------------------------------
+## focusNextChild()
+
+Return type: bool
+
+Finds a new widget to give the keyboard focus to, as appropriate for Tab, and returns true if it can find a new widget, or false if it can’t.
+
+
+--------------------------------
+## focusNextPrevChild(next)
+
+Parameters:
+
+- next – bool
+
+Return type: bool
+
+Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can’t.
+
+If next is true, this function searches forward, if next is false, it searches backward.
+
+Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its “current active link” forward or backward, and call focusNextPrevChild() only when it reaches the last or first link on the “page”.
+
+Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you thus gain control of focus traversal for all child widgets.
+
+
+--------------------------------
+## focusOutEvent(event)
+
+Parameters:
+
+- event – QFocusEvent
+
+This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. The events is passed in the event parameter.
+
+A widget normally must setFocusPolicy() to something other than Qt::NoFocus to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)
+
+The default implementation updates the widget (except for windows that do not specify a focusPolicy() ).
+
+
+--------------------------------
+## focusPolicy()
+
+Return type: FocusPolicy
+
+Getter of property focusPolicy  .
+
+
+--------------------------------
+## focusPreviousChild()
+
+Return type: bool
+
+Finds a new widget to give the keyboard focus to, as appropriate for Shift+Tab, and returns true if it can find a new widget, or false if it can’t.
+
+
+--------------------------------
+## focusProxy()
+
+Return type: QWidget
+
+Returns the focus proxy, or None if there is no focus proxy.
+
+
+--------------------------------
+## focusWidget()
+
+Return type: QWidget
+
+Returns the last child of this widget that setFocus had been called on. For top level widgets this is the widget that will get focus in case this window gets activated
+
+This is not the same as focusWidget() , which returns the focus widget in the currently active window.
+
+
+--------------------------------
+## font()
+
+Return type: QFont
+
+Getter of property font  .
+
+
+--------------------------------
+## fontInfo()
+
+Return type: QFontInfo
+
+Returns the font info for the widget’s current font. Equivalent to QFontInfo(widget->font()).
+
+
+--------------------------------
+## fontMetrics()
+
+Return type: QFontMetrics
+
+Returns the font metrics for the widget’s current font. Equivalent to QFontMetrics(widget->font()).
+
+
+--------------------------------
+## foregroundRole()
+
+Return type: ColorRole
+
+Returns the foreground role.
+
+The foreground role defines the color from the widget’s palette that is used to draw the foreground.
+
+If no explicit foreground role is set, the function returns a role that contrasts with the background role.
+
+
+--------------------------------
+## frameGeometry()
+
+Return type: QRect
+
+Getter of property frameGeometry  .
+
+
+--------------------------------
+## frameSize()
+
+Return type: QSize
+
+Getter of property frameSize  .
+
+
+--------------------------------
+## geometry()
+
+Return type: QRect
+
+Getter of property geometry  .
+
+
+--------------------------------
+## grab([rectangle=QRect(QPoint(0, 0), QSize(-1, -1))])
+
+Parameters:
+
+- rectangle – QRect
+
+Return type: QPixmap
+
+Renders the widget into a pixmap restricted by the given rectangle. If the widget has any children, then they are also painted in the appropriate positions.
+
+If a rectangle with an invalid size is specified (the default), the entire widget is painted.
+
+
+--------------------------------
+## grabGesture(type[, flags=Qt.GestureFlags()])
+
+Parameters:
+
+- type – GestureType
+- flags – Combination of GestureFlag
+
+Subscribes the widget to a given gesture with specific flags.
+
+
+--------------------------------
+## grabKeyboard()
+
+Grabs the keyboard input.
+
+This widget receives all keyboard events until releaseKeyboard() is called; other widgets get no keyboard events at all. Mouse events are not affected. Use grabMouse() if you want to grab that.
+
+The focus widget is not affected, except that it doesn’t receive any keyboard events. setFocus() moves the focus as usual, but the new focus widget receives keyboard events only after releaseKeyboard() is called.
+
+If a different widget is currently grabbing keyboard input, that widget’s grab is released first.
+
+
+--------------------------------
+## grabMouse()
+
+Grabs the mouse input.
+
+This widget receives all mouse events until releaseMouse() is called; other widgets get no mouse events at all. Keyboard events are not affected. Use grabKeyboard() if you want to grab that.
+
+It is seldom necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released.
+
+
+--------------------------------
+## grabMouse(arg__1)
+
+Parameters:
+
+- arg__1 – QCursor
+
+This function overloads grabMouse() .
+
+Grabs the mouse input and changes the cursor shape.
+
+The cursor will assume shape cursor (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until releaseMouse() is called().
+
+
+--------------------------------
+## grabShortcut(key[, context=Qt.WindowShortcut])
+
+Parameters:
+
+- key – QKeySequence
+- context – ShortcutContext
+
+Return type: int
+
+Adds a shortcut to Qt’s shortcut system that watches for the given key sequence in the given context. If the context is Qt::ApplicationShortcut, the shortcut applies to the application as a whole. Otherwise, it is either local to this widget, Qt::WidgetShortcut, or to the window itself, Qt::WindowShortcut.
+
+If the same key sequence has been grabbed by several widgets, when the key sequence occurs a QEvent::Shortcut event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous’’ flag set to true.
+
+
+--------------------------------
+## graphicsEffect()
+
+Return type: QGraphicsEffect
+
+The graphicsEffect function returns a pointer to the widget’s graphics effect.
+
+If the widget has no graphics effect, None is returned.
+
+
+--------------------------------
+## graphicsProxyWidget()
+
+Return type: QGraphicsProxyWidget
+
+Returns the proxy widget for the corresponding embedded widget in a graphics view; otherwise returns None.
+
+
+--------------------------------
+## hasFocus()
+
+Return type: bool
+
+Getter of property focus  .
+
+
+--------------------------------
+## hasHeightForWidth()
+
+Return type: bool
+
+Returns true if the widget’s preferred height depends on its width; otherwise returns false.
+
+
+--------------------------------
+## hasMouseTracking()
+
+Return type: bool
+
+Getter of property mouseTracking  .
+
+
+--------------------------------
+## hasTabletTracking()
+
+Return type: bool
+
+Getter of property tabletTracking  .
+
+
+--------------------------------
+## heightForWidth(arg__1)
+
+Parameters:
+
+- arg__1 – int
+
+Return type: int
+
+Returns the preferred height for this widget, given the width w.
+
+If this widget has a layout, the default implementation returns the layout’s preferred height. if there is no layout, the default implementation returns -1 indicating that the preferred height does not depend on the width.
+
+
+--------------------------------
+## hide()
+
+Hides the widget. This function is equivalent to setVisible (false).
+
+
+--------------------------------
+## hideEvent(event)
+
+Parameters:
+
+- event – QHideEvent
+
+This event handler can be reimplemented in a subclass to receive widget hide events. The event is passed in the event parameter.
+
+Hide events are sent to widgets immediately after they have been hidden.
+
+
+--------------------------------
+## inputMethodEvent(event)
+
+Parameters:
+
+- event – QInputMethodEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the state of the input method changes.
+
+Note that when creating custom text editing widgets, the Qt::WA_InputMethodEnabled window attribute must be set explicitly (using the setAttribute() function) in order to receive input method events.
+
+The default implementation calls event->ignore(), which rejects the Input Method event. See the QInputMethodEvent documentation for more details.
+
+
+--------------------------------
+## inputMethodHints()
+
+Return type: Combination of InputMethodHint
+
+Getter of property inputMethodHints  .
+
+
+--------------------------------
+## inputMethodQuery(arg__1)
+
+Parameters:
+
+- arg__1 – InputMethodQuery
+
+Return type: object
+
+This method is only relevant for input widgets. It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.
+
+query specifies which property is queried.
+
+
+--------------------------------
+## insertAction(before, action)
+
+Parameters:
+
+- before – QAction
+- action – QAction
+
+Inserts the action action to this widget’s list of actions, before the action before. It appends the action if before is None or before is not a valid action for this widget.
+
+A QWidget should only have one of each action.
+
+
+--------------------------------
+## insertActions(before, actions)
+
+Parameters:
+
+- before – QAction
+- actions – .list of QAction
+
+Inserts the actions actions to this widget’s list of actions, before the action before. It appends the action if before is None or before is not a valid action for this widget.
+
+A QWidget can have at most one of each action.
+
+
+--------------------------------
+## internalWinId()
+
+Return type: WId
+
+
+--------------------------------
+## isActiveWindow()
+
+Return type: bool
+
+Getter of property isActiveWindow  .
+
+
+--------------------------------
+## isAncestorOf(child)
+
+Parameters:
+
+- child – QWidget
+
+Return type: bool
+
+Returns true if this widget is a parent, (or grandparent and so on to any level), of the given child, and both widgets are within the same window; otherwise returns false.
+
+
+--------------------------------
+## isEnabled()
+
+Return type: bool
+
+Getter of property enabled  .
+
+
+--------------------------------
+## isEnabledTo(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Return type: bool
+
+Returns true if this widget would become enabled if ancestor is enabled; otherwise returns false.
+
+This is the case if neither the widget itself nor every parent up to but excluding ancestor has been explicitly disabled.
+
+isEnabledTo(0) returns false if this widget or any if its ancestors was explicitly disabled.
+
+The word ancestor here means a parent widget within the same window.
+
+Therefore isEnabledTo(0) stops at this widget’s window, unlike isEnabled() which also takes parent windows into considerations.
+
+
+--------------------------------
+## isFullScreen()
+
+Return type: bool
+
+Getter of property fullScreen  .
+
+
+--------------------------------
+## isHidden()
+
+Return type: bool
+
+Returns true if the widget is hidden, otherwise returns false.
+
+A hidden widget will only become visible when show() is called on it. It will not be automatically shown when the parent is shown.
+
+To check visibility, use ! isVisible() instead (notice the exclamation mark).
+
+isHidden() implies ! isVisible() , but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.
+
+Widgets are hidden if:
+
+- they were created as independent windows,
+- they were created as children of visible widgets,
+- hide() or setVisible (false) was called.
+
+
+--------------------------------
+## isLeftToRight()
+
+Return type: bool
+
+
+--------------------------------
+##  isMaximized()
+
+Return type: bool
+
+Getter of property maximized  .
+
+
+--------------------------------
+## isMinimized()
+
+Return type: bool
+
+Getter of property minimized  .
+
+
+--------------------------------
+## isModal()
+
+Return type: bool
+
+Getter of property modal  .
+
+
+--------------------------------
+## isRightToLeft()
+
+Return type: bool
+
+
+--------------------------------
+## isTopLevel()
+
+Return type: bool
+
+Use isWindow() instead.
+
+
+--------------------------------
+## isVisible()
+
+Return type: bool
+
+Getter of property visible  .
+
+
+--------------------------------
+## isVisibleTo(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Return type: bool
+
+Returns true if this widget would become visible if ancestor is shown; otherwise returns false.
+
+The true case occurs if neither the widget itself nor any parent up to but excluding ancestor has been explicitly hidden.
+
+This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.
+
+isVisibleTo(0) is identical to isVisible() .
+
+
+--------------------------------
+## isWindow()
+
+Return type: bool
+
+Returns true if the widget is an independent window, otherwise returns false.
+
+A window is a widget that isn’t visually the child of any other widget and that usually has a frame and a window title .
+
+A window can have a parent widget . It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.
+
+QDialog and QMainWindow widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the Qt::Window flag.
+
+
+--------------------------------
+## isWindowModified()
+
+Return type: bool
+
+Getter of property windowModified  .
+
+
+--------------------------------
+## keyPressEvent(event)
+
+Parameters:
+
+- event – QKeyEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive key press events for the widget.
+
+A widget must call setFocusPolicy() to accept focus initially and have focus in order to receive a key press event.
+
+If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.
+
+The default implementation closes popup widgets if the user presses the key sequence for QKeySequence::Cancel (typically the Escape key). Otherwise the event is ignored, so that the widget’s parent can interpret it.
+
+Note that QKeyEvent starts with isAccepted() == true, so you do not need to call QKeyEvent::accept() - just do not call the base class implementation if you act upon the key.
+
+
+--------------------------------
+## keyReleaseEvent(event)
+
+Parameters:
+
+- event – QKeyEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive key release events for the widget.
+
+A widget must accept focus initially and have focus in order to receive a key release event.
+
+If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.
+
+The default implementation ignores the event, so that the widget’s parent can interpret it.
+
+Note that QKeyEvent starts with isAccepted() == true, so you do not need to call QKeyEvent::accept() - just do not call the base class implementation if you act upon the key.
+
+
+--------------------------------
+## static keyboardGrabber()
+
+Return type: QWidget
+
+Returns the widget that is currently grabbing the keyboard input.
+
+If no widget in this application is currently grabbing the keyboard, None is returned.
+
+
+--------------------------------
+## layout()
+
+Return type: QLayout
+
+Returns the layout manager that is installed on this widget, or None if no layout manager is installed.
+
+The layout manager sets the geometry of the widget’s children that have been added to the layout.
+
+
+--------------------------------
+## layoutDirection()
+
+Return type: LayoutDirection
+
+Getter of property layoutDirection  .
+
+
+--------------------------------
+## leaveEvent(event)
+
+Parameters:
+
+- event – QEvent
+
+This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the event parameter.
+
+A leave event is sent to the widget when the mouse cursor leaves the widget.
+
+
+--------------------------------
+## locale()
+
+Return type: QLocale
+
+Getter of property locale  .
+
+
+--------------------------------
+## lower()
+
+Lowers the widget to the bottom of the parent widget’s stack.
+
+After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.
+
+
+--------------------------------
+## mapFrom(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – QWidget
+- arg__2 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mapFrom(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – QWidget
+- arg__2 – QPointF
+
+Return type: QPointF
+
+Translates the widget coordinate pos from the coordinate system of parent to this widget’s coordinate system. The parent must not be None and must be a parent of the calling widget.
+
+
+--------------------------------
+## mapFromGlobal(arg__1)
+
+Parameters:
+
+- arg__1 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mapFromGlobal(arg__1)
+
+Parameters:
+
+- arg__1 – QPointF
+
+Return type: QPointF
+
+Translates the global screen coordinate pos to widget coordinates.
+
+
+--------------------------------
+## mapFromParent(arg__1)
+
+Parameters:
+
+- arg__1 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mapFromParent(arg__1)
+
+Parameters:
+
+- arg__1 – QPointF
+
+Return type: QPointF
+
+Translates the parent widget coordinate pos to widget coordinates.
+
+Same as mapFromGlobal() if the widget has no parent.
+
+
+--------------------------------
+## mapTo(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – QWidget
+- arg__2 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mapTo(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – QWidget
+- arg__2 – QPointF
+
+Return type: QPointF
+
+Translates the widget coordinate pos to the coordinate system of parent. The parent must not be None and must be a parent of the calling widget.
+
+
+--------------------------------
+## mapToGlobal(arg__1)
+
+Parameters:
+
+- arg__1 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mapToGlobal(arg__1)
+
+Parameters:
+
+- arg__1 – QPointF
+
+Return type: QPointF
+
+Translates the widget coordinate pos to global screen coordinates. For example, mapToGlobal(QPointF(0,0)) would give the global coordinates of the top-left pixel of the widget.
+
+
+--------------------------------
+## mapToParent(arg__1)
+
+Parameters:
+
+- arg__1 – QPointF
+
+Return type: QPointF
+
+Translates the widget coordinate pos to a coordinate in the parent widget.
+
+Same as mapToGlobal() if the widget has no parent.
+
+
+--------------------------------
+## mapToParent(arg__1)
+
+Parameters:
+
+- arg__1 – QPoint
+
+Return type: QPoint
+
+This is an overloaded function.
+
+
+--------------------------------
+## mask()
+
+Return type: QRegion
+
+Returns the mask currently set on a widget. If no mask is set the return value will be an empty region.
+
+
+--------------------------------
+## maximumHeight()
+
+Return type: int
+
+Getter of property maximumHeight  .
+
+
+--------------------------------
+## maximumSize()
+
+Return type: QSize
+
+Getter of property maximumSize  .
+
+
+--------------------------------
+## maximumWidth()
+
+Return type: int
+
+Getter of property maximumWidth  .
+
+
+--------------------------------
+## minimumHeight()
+
+Return type: int
+
+Getter of property minimumHeight  .
+
+
+--------------------------------
+## minimumSize()
+
+Return type: QSize
+
+Getter of property minimumSize  .
+
+
+--------------------------------
+## minimumSizeHint()
+
+Return type: QSize
+
+Getter of property minimumSizeHint  .
+
+
+--------------------------------
+## minimumWidth()
+
+Return type: int
+
+Getter of property minimumWidth  .
+
+
+--------------------------------
+## mouseDoubleClickEvent(event)
+
+Parameters:
+
+- event – QMouseEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive mouse double click events for the widget.
+
+The default implementation calls mousePressEvent() .
+
+
+--------------------------------
+## static mouseGrabber()
+
+Return type: QWidget
+
+Returns the widget that is currently grabbing the mouse input.
+
+If no widget in this application is currently grabbing the mouse, None is returned.
+
+
+--------------------------------
+## mouseMoveEvent(event)
+
+Parameters:
+
+- event – QMouseEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive mouse move events for the widget.
+
+If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.
+
+QMouseEvent::pos() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user’s hand shakes. This is a feature of the underlying window system, not Qt.
+
+If you want to show a tooltip immediately, while the mouse is moving (e.g., to get the mouse coordinates with QMouseEvent::pos() and show them as a tooltip), you must first enable mouse tracking as described above. Then, to ensure that the tooltip is updated immediately, you must call showText() instead of setToolTip() in your implementation of mouseMoveEvent().
+
+
+--------------------------------
+## mousePressEvent(event)
+
+Parameters:
+
+- event – QMouseEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive mouse press events for the widget.
+
+If you create new widgets in the mousePressEvent() the mouseReleaseEvent() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets’ location and maybe more.
+
+The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.
+
+
+--------------------------------
+## mouseReleaseEvent(event)
+
+Parameters:
+
+- event – QMouseEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive mouse release events for the widget.
+
+
+--------------------------------
+## move(arg__1)
+
+Parameters:
+
+- arg__1 – QPoint
+
+Setter of property pos  .
+
+
+--------------------------------
+## move(x, y)
+
+Parameters:
+
+- x – int
+- y – int
+
+This is an overloaded function.
+
+This corresponds to move(QPoint(x, y)).
+
+
+--------------------------------
+## moveEvent(event)
+
+Parameters:
+
+- event – QMoveEvent
+
+This event handler can be reimplemented in a subclass to receive widget move events which are passed in the event parameter. When the widget receives this event, it is already at the new position.
+
+The old position is accessible through QMoveEvent::oldPos().
+
+
+--------------------------------
+## nativeEvent(eventType, message)
+
+Parameters:
+
+- eventType – QByteArray
+- message – void
+
+Return type: PyObject
+
+This special event handler can be reimplemented in a subclass to receive native platform events identified by eventType which are passed in the message parameter.
+
+In your reimplementation of this function, if you want to stop the event being handled by Qt, return true and set result. The result parameter has meaning only on Windows. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.
+
+| Platform | Event Type Identifier | Message Type | Result Type |
+| -------- | --------------------- | ------------ | ----------- |
+| Windows  | “windows_generic_MSG” | MSG *        | LRESULT     |
+| macOS    | “NSEvent”             | NSEvent *    |             |
+| XCB      | “xcb_generic_event_t” | xcb_generic_event_t * |    |
+
+
+--------------------------------
+## nativeParentWidget()
+
+Return type: QWidget
+
+Returns the native parent for this widget, i.e. the next ancestor widget that has a system identifier, or None if it does not have any native parent.
+
+
+--------------------------------
+## nextInFocusChain()
+
+Return type: QWidget
+
+Returns the next widget in this widget’s focus chain.
+
+
+--------------------------------
+## normalGeometry()
+
+Return type: QRect
+
+Getter of property normalGeometry  .
+
+
+--------------------------------
+## overrideWindowFlags(type)
+
+Parameters:
+
+- type – Combination of WindowType
+
+Sets the window flags for the widget to flags, without telling the window system.
+
+
+--------------------------------
+## overrideWindowState(state)
+
+Parameters:
+
+- state – Combination of WindowState
+
+
+--------------------------------
+## paintEvent(event)
+
+Parameters:
+
+- event – QPaintEvent
+
+This event handler can be reimplemented in a subclass to receive paint events passed in event.
+
+A paint event is a request to repaint all or part of a widget. It can happen for one of the following reasons:
+
+repaint() or update() was invoked,
+
+the widget was obscured and has now been uncovered, or
+
+many other reasons.
+
+Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: QPaintEvent::region(). This speed optimization does not change the result, as painting is clipped to that region during event processing. QListView and QTableView do this, for example.
+
+Qt also tries to speed up painting by merging multiple paint events into one. When update() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see QRegion::united()). The repaint() function does not permit this optimization, so we suggest using update() whenever possible.
+
+When the paint event occurs, the update region has normally been erased, so you are painting on the widget’s background.
+
+The background can be set using setBackgroundRole() and setPalette() .
+
+Since Qt 4.0, QWidget automatically double-buffers its painting, so there is no need to write double-buffering code in paintEvent() to avoid flicker.
+
+
+--------------------------------
+## palette()
+
+Return type: QPalette
+
+Getter of property palette  .
+
+
+--------------------------------
+## parentWidget()
+
+Return type: QWidget
+
+Returns the parent of this widget, or None if it does not have any parent widget.
+
+
+--------------------------------
+## pos()
+
+Return type: QPoint
+
+Getter of property pos  .
+
+
+--------------------------------
+## previousInFocusChain()
+
+Return type: QWidget
+
+The previousInFocusChain function returns the previous widget in this widget’s focus chain.
+
+
+--------------------------------
+## raise_()
+## rect()
+
+Return type: QRect
+
+Getter of property rect  .
+
+
+--------------------------------
+## releaseKeyboard()
+
+Releases the keyboard grab.
+
+
+--------------------------------
+## releaseMouse()
+
+Releases the mouse grab.
+
+
+--------------------------------
+## releaseShortcut(id)
+
+Parameters:
+
+- id – int
+
+Removes the shortcut with the given id from Qt’s shortcut system. The widget will no longer receive QEvent::Shortcut events for the shortcut’s key sequence (unless it has other shortcuts with the same key sequence).
+
+
+--------------------------------
+## removeAction(action)
+
+Parameters:
+
+- action – QAction
+
+Removes the action action from this widget’s list of actions.
+
+
+--------------------------------
+## render(target[, targetOffset=QPoint()[, sourceRegion=QRegion()[, renderFlags=QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)]]])
+
+Parameters:
+
+- target – QPaintDevice
+- targetOffset – QPoint
+- sourceRegion – QRegion
+- renderFlags – Combination of RenderFlag
+
+
+Renders the sourceRegion of this widget into the target using renderFlags to determine how to render. Rendering starts at targetOffset in the target. For example:
+
+```python
+pixmap = QPixmap(widget.size())
+widget.render(pixmap)
+```
+
+If sourceRegion is a null region, this function will use rect() as the region, i.e. the entire widget.
+
+Ensure that you call QPainter::end() for the target device’s active painter (if any) before rendering. For example:
+
+```python
+painter = QPainter(self)
+...
+painter.end()
+myWidget.render(self)
+```
+
+
+--------------------------------
+## render(painter, targetOffset[, sourceRegion=QRegion()[, renderFlags=QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)]])
+
+Parameters:
+
+- painter – QPainter
+- targetOffset – QPoint
+- sourceRegion – QRegion
+- renderFlags – Combination of RenderFlag
+
+This is an overloaded function.
+
+Renders the widget into the painter's QPainter::device().
+
+Transformations and settings applied to the painter will be used when rendering.
+
+
+--------------------------------
+## repaint()
+
+Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden.
+
+We suggest only using repaint() if you need an immediate repaint, for example during animation. In most circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker.
+
+
+--------------------------------
+## repaint(arg__1)
+
+Parameters:
+
+- arg__1 – QRect
+
+This is an overloaded function.
+
+This version repaints a rectangle rect inside the widget.
+
+
+--------------------------------
+## repaint(arg__1)
+
+Parameters:
+
+- arg__1 – QRegion
+
+This is an overloaded function.
+
+This version repaints a region rgn inside the widget.
+
+
+--------------------------------
+## repaint(x, y, w, h)
+
+Parameters:
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+This is an overloaded function.
+
+This version repaints a rectangle (x, y, w, h) inside the widget.
+
+If w is negative, it is replaced with width() - x, and if h is negative, it is replaced width height() - y.
+
+
+--------------------------------
+## resize(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Setter of property size  .
+
+
+--------------------------------
+## resize(w, h)
+
+Parameters:
+
+- w – int
+- h – int
+
+This is an overloaded function.
+
+This corresponds to resize(QSize(w, h)).
+
+
+--------------------------------
+## resizeEvent(event)
+
+Parameters:
+
+- event – QResizeEvent
+
+This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the event parameter. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through QResizeEvent::oldSize().
+
+The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.
+
+
+--------------------------------
+## restoreGeometry(geometry)
+
+Parameters:
+
+- geometry – QByteArray
+
+Return type: bool
+
+Restores the geometry and state of top-level widgets stored in the byte array geometry. Returns true on success; otherwise returns false.
+
+If the restored geometry is off-screen, it will be modified to be inside the available screen geometry.
+
+To restore geometry saved using QSettings, you can use code like this:
+
+```python
+settings = QSettings("MyCompany", "MyApp")
+myWidget.restoreGeometry(settings.value("myWidget/geometry").toByteArray())
+```
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+Use restoreState() to restore the geometry and the state of toolbars and dock widgets.
+
+
+--------------------------------
+## saveGeometry()
+
+Return type: QByteArray
+
+Saves the current geometry and state for top-level widgets.
+
+To save the geometry when the window closes, you can implement a close event like this:
+
+```python
+def closeEvent(self, event):
+
+    settings = QSettings("MyCompany", "MyApp")
+    settings.setValue("geometry", saveGeometry())
+    QWidget.closeEvent(event)
+```
+
+See the Window Geometry documentation for an overview of geometry issues with windows.
+
+Use saveState() to save the geometry and the state of toolbars and dock widgets.
+
+
+--------------------------------
+## screen()
+
+Return type: QScreen
+
+Returns the screen the widget is on.
+
+
+--------------------------------
+## scroll(dx, dy, arg__3)
+
+Parameters:
+
+- dx – int
+- dy – int
+- arg__3 – QRect
+
+This is an overloaded function.
+
+This version only scrolls r and does not move the children of the widget.
+
+If r is empty or invalid, the result is undefined.
+
+
+--------------------------------
+## scroll(dx, dy)
+
+Parameters:
+
+- dx – int
+- dy – int
+
+Scrolls the widget including its children dx pixels to the right and dy downward. Both dx and dy may be negative.
+
+After scrolling, the widgets will receive paint events for the areas that need to be repainted. For widgets that Qt knows to be opaque, this is only the newly exposed parts. For example, if an opaque widget is scrolled 8 pixels to the left, only an 8-pixel wide stripe at the right edge needs updating.
+
+Since widgets propagate the contents of their parents by default, you need to set the autoFillBackground property, or use setAttribute() to set the Qt::WA_OpaquePaintEvent attribute, to make a widget opaque.
+
+For widgets that use contents propagation, a scroll will cause an update of the entire scroll area.
+
+
+--------------------------------
+## setAcceptDrops(on)
+
+Parameters:
+
+- on – bool
+
+Setter of property acceptDrops  .
+
+
+--------------------------------
+## setAccessibleDescription(description)
+
+Parameters:
+
+- description – str
+
+Setter of property accessibleDescription  .
+
+
+--------------------------------
+## setAccessibleName(name)
+
+Parameters:
+
+- name – str
+
+Setter of property accessibleName  .
+
+
+--------------------------------
+## setAttribute(arg__1[, on=true])
+
+Parameters:
+
+- arg__1 – WidgetAttribute
+- on – bool
+
+Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
+
+
+--------------------------------
+## setAutoFillBackground(enabled)
+
+Parameters:
+
+- enabled – bool
+
+Setter of property autoFillBackground  .
+
+
+--------------------------------
+## setBackgroundRole(arg__1)
+
+Parameters:
+
+- arg__1 – ColorRole
+
+Sets the background role of the widget to role.
+
+The background role defines the brush from the widget’s palette that is used to render the background.
+
+If role is QPalette::NoRole, then the widget inherits its parent’s background role.
+
+Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don’t achieve the result you want with setBackgroundRole().
+
+
+--------------------------------
+## setBaseSize(basew, baseh)
+
+Parameters:
+
+- basew – int
+- baseh – int
+
+This is an overloaded function.
+
+This corresponds to setBaseSize (QSize(basew, baseh)). Sets the widgets base size to width basew and height baseh.
+
+
+--------------------------------
+## setBaseSize(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Setter of property baseSize  .
+
+
+--------------------------------
+## setContentsMargins(margins)
+
+Parameters:
+
+- margins – QMargins
+
+This is an overloaded function.
+
+The setContentsMargins function sets the margins around the widget’s contents.
+
+Sets the margins around the contents of the widget to have the sizes determined by margins. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
+
+Changing the margins will trigger a resizeEvent() .
+
+
+--------------------------------
+## setContentsMargins(left, top, right, bottom)
+
+Parameters:
+
+- left – int
+- top – int
+- right – int
+- bottom – int
+
+Sets the margins around the contents of the widget to have the sizes left, top, right, and bottom. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
+
+Changing the margins will trigger a resizeEvent() .
+
+
+--------------------------------
+## setContextMenuPolicy(policy)
+
+Parameters:
+
+- policy – ContextMenuPolicy
+
+Setter of property contextMenuPolicy  .
+
+
+--------------------------------
+## setCursor(arg__1)
+
+Parameters:
+
+- arg__1 – QCursor
+
+Setter of property cursor  .
+
+
+--------------------------------
+## setDisabled(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Disables widget input events if disable is true; otherwise enables input events.
+
+See the enabled documentation for more information.
+
+
+--------------------------------
+## setEnabled(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property enabled  .
+
+
+--------------------------------
+## setFixedHeight(h)
+
+Parameters:
+
+- h – int
+
+Sets both the minimum and maximum heights of the widget to h without changing the widths. Provided for convenience.
+
+
+--------------------------------
+## setFixedSize(w, h)
+
+Parameters:
+
+- w – int
+- h – int
+
+This is an overloaded function.
+
+Sets the width of the widget to w and the height to h.
+
+
+--------------------------------
+## setFixedSize(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking.
+
+This will override the default size constraints set by QLayout .
+
+To remove constraints, set the size to QWIDGETSIZE_MAX .
+
+Alternatively, if you want the widget to have a fixed size based on its contents, you can call setSizeConstraint ( SetFixedSize );
+
+
+--------------------------------
+## setFixedWidth(w)
+
+Parameters:
+
+- w – int
+
+Sets both the minimum and maximum width of the widget to w without changing the heights. Provided for convenience.
+
+
+--------------------------------
+## setFocus(reason)
+
+Parameters:
+
+- reason – FocusReason
+
+Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window . The reason argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus. If the window is not active, the widget will be given the focus when the window becomes active.
+
+First, a focus about to change event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then focus is changed, a focus out event is sent to the previous focus item and a focus in event is sent to the new item to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)
+
+
+setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see grabKeyboard() ).
+
+Be aware that if the widget is hidden, it will not accept focus until it is shown.
+
+
+--------------------------------
+## setFocus()
+
+This is an overloaded function.
+
+Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window .
+
+
+--------------------------------
+## setFocusPolicy(policy)
+
+Parameters:
+
+- policy – FocusPolicy
+
+Setter of property focusPolicy  .
+
+
+--------------------------------
+## setFocusProxy(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Sets the widget’s focus proxy to widget w. If w is None, the function resets this widget to have no focus proxy.
+
+Some widgets can “have focus”, but create a child widget, such as QLineEdit , to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.
+
+setFocusProxy() sets the widget which will actually get focus when “this widget” gets it. If there is a focus proxy, setFocus() and hasFocus() operate on the focus proxy. If “this widget” is the focus widget, then setFocusProxy() moves focus to the new focus proxy.
+
+
+--------------------------------
+## setFont(arg__1)
+
+Parameters:
+
+- arg__1 – QFont
+
+Setter of property font  .
+
+
+--------------------------------
+## setForegroundRole(arg__1)
+
+Parameters:
+
+- arg__1 – ColorRole
+
+Sets the foreground role of the widget to role.
+
+The foreground role defines the color from the widget’s palette that is used to draw the foreground.
+
+If role is QPalette::NoRole, the widget uses a foreground role that contrasts with the background role.
+
+Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don’t achieve the result you want with setForegroundRole().
+
+
+--------------------------------
+## setGeometry(arg__1)
+
+Parameters:
+
+- arg__1 – QRect
+
+Setter of property geometry  .
+
+
+--------------------------------
+## setGeometry(x, y, w, h)
+
+Parameters:
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+This is an overloaded function.
+
+This corresponds to setGeometry (QRect(x, y, w, h)).
+
+
+--------------------------------
+## setGraphicsEffect(effect)
+
+Parameters:
+
+- effect – QGraphicsEffect
+
+The setGraphicsEffect function is for setting the widget’s graphics effect.
+
+Sets effect as the widget’s effect. If there already is an effect installed on this widget, QWidget will delete the existing effect before installing the new effect.
+
+If effect is the installed effect on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget.
+
+QWidget takes ownership of effect.
+
+
+--------------------------------
+## setHidden(hidden)
+
+Parameters:
+
+- hidden – bool
+
+Convenience function, equivalent to setVisible (!``hidden``).
+
+
+--------------------------------
+## setInputMethodHints(hints)
+
+Parameters:
+
+- hints – Combination of InputMethodHint
+
+Setter of property inputMethodHints  .
+
+
+--------------------------------
+## setLayout(arg__1)
+
+Parameters:
+
+- arg__1 – QLayout
+
+
+Sets the layout manager for this widget to layout.
+
+If there already is a layout manager installed on this widget, QWidget won’t let you install another. You must first delete the existing layout manager (returned by layout() ) before you can call setLayout() with the new layout.
+
+If layout is the layout manager on a different widget, setLayout() will reparent the layout and make it the layout manager for this widget.
+
+Example:
+
+```python
+layout = QVBoxLayout()
+layout.addWidget(formWidget)
+setLayout(layout)
+```
+
+An alternative to calling this function is to pass this widget to the layout’s constructor.
+
+The QWidget will take ownership of layout.
+
+
+--------------------------------
+## setLayoutDirection(direction)
+
+Parameters:
+
+- direction – LayoutDirection
+
+Setter of property layoutDirection  .
+
+
+--------------------------------
+## setLocale(locale)
+
+Parameters:
+
+- locale – QLocale
+
+Setter of property locale  .
+
+
+--------------------------------
+## setMask(arg__1)
+
+Parameters:
+
+- arg__1 – QBitmap
+
+Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible. If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
+
+Note that this effect can be slow if the region is particularly complex.
+
+The following code shows how an image with an alpha channel can be used to generate a mask for a widget:
+
+```python
+topLevelLabel = QLabel()
+pixmap = QPixmap(":/images/tux.png")
+topLevelLabel.setPixmap(pixmap)
+topLevelLabel.setMask(pixmap.mask())
+```
+
+The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.
+
+Masked widgets receive mouse events only on their visible portions.
+
+
+--------------------------------
+## setMask(arg__1)
+
+Parameters:
+
+- arg__1 – QRegion
+
+This is an overloaded function.
+
+Causes only the parts of the widget which overlap region to be visible. If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
+
+Since QRegion allows arbitrarily complex regions to be created, widget masks can be made to suit the most unconventionally-shaped windows, and even allow widgets to be displayed with holes in them. Note that this effect can be slow if the region is particularly complex.
+
+Widget masks are used to hint to the window system that the application does not want mouse events for areas outside the mask. On most systems, they also result in coarse visual clipping. To get smooth window edges, use translucent background and anti-aliased painting instead, as shown in the Translucent Background example.
+
+
+--------------------------------
+## setMaximumHeight(maxh)
+
+Parameters:
+
+- maxh – int
+
+Setter of property maximumHeight  .
+
+
+--------------------------------
+## setMaximumSize(maxw, maxh)
+
+Parameters:
+
+- maxw – int
+- maxh – int
+
+This is an overloaded function.
+
+This function corresponds to setMaximumSize (QSize(maxw, maxh)). Sets the maximum width to maxw and the maximum height to maxh.
+
+
+--------------------------------
+## setMaximumSize(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Setter of property maximumSize  .
+
+
+--------------------------------
+## setMaximumWidth(maxw)
+
+Parameters:
+
+- maxw – int
+
+Setter of property maximumWidth  .
+
+
+--------------------------------
+## setMinimumHeight(minh)
+
+Parameters:
+
+- minh – int
+
+Setter of property minimumHeight  .
+
+
+--------------------------------
+## setMinimumSize(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Setter of property minimumSize  .
+
+
+--------------------------------
+## setMinimumSize(minw, minh)
+
+Parameters:
+
+- minw – int
+- minh – int
+
+This is an overloaded function.
+
+This function corresponds to setMinimumSize (QSize(minw, minh)). Sets the minimum width to minw and the minimum height to minh.
+
+
+--------------------------------
+## setMinimumWidth(minw)
+
+Parameters:
+
+- minw – int
+
+Setter of property minimumWidth  .
+
+
+--------------------------------
+## setMouseTracking(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property mouseTracking  .
+
+
+--------------------------------
+## setPalette(arg__1)
+
+Parameters:
+
+- arg__1 – QPalette
+
+Setter of property palette  .
+
+
+--------------------------------
+## setParent(parent)
+
+Parameters:
+
+- parent – QWidget
+
+Sets the parent of the widget to parent, and resets the window flags. The widget is moved to position (0, 0) in its new parent.
+
+If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the tab chain of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls clearFocus() for that widget.
+
+If the new parent widget is in the same window as the old parent, setting the parent doesn’t change the tab order or keyboard focus.
+
+If the “new” parent widget is the old parent widget, this function does nothing.
+
+
+--------------------------------
+## setParent(parent, f)
+
+Parameters:
+
+- parent – QWidget
+- f – Combination of WindowType
+
+This is an overloaded function.
+
+This function also takes widget flags, f as an argument.
+
+
+--------------------------------
+## setScreen(arg__1)
+
+Parameters:
+
+- arg__1 – QScreen
+
+Sets the screen on which the widget should be shown to screen.
+
+Setting the screen only makes sense for windows. If necessary, the widget’s window will get recreated on screen.
+
+
+--------------------------------
+## setShortcutAutoRepeat(id[, enable=true])
+
+Parameters:
+
+- id – int
+- enable – bool
+
+If enable is true, auto repeat of the shortcut with the given id is enabled; otherwise it is disabled.
+
+
+--------------------------------
+## setShortcutEnabled(id[, enable=true])
+
+Parameters:
+
+- id – int
+- enable – bool
+
+If enable is true, the shortcut with the given id is enabled; otherwise the shortcut is disabled.
+
+
+--------------------------------
+## setSizeIncrement(arg__1)
+
+Parameters:
+
+- arg__1 – QSize
+
+Setter of property sizeIncrement  .
+
+
+--------------------------------
+## setSizeIncrement(w, h)
+
+Parameters:
+
+- w – int
+- h – int
+
+This is an overloaded function.
+
+Sets the x (width) size increment to w and the y (height) size increment to h.
+
+
+--------------------------------
+## setSizePolicy(horizontal, vertical)
+
+Parameters:
+
+- horizontal – Policy
+- vertical – Policy
+
+This is an overloaded function.
+
+Sets the size policy of the widget to horizontal and vertical, with standard stretch and no height-for-width.
+
+
+--------------------------------
+## setSizePolicy(arg__1)
+
+Parameters:
+
+- arg__1 – QSizePolicy
+
+Setter of property sizePolicy  .
+
+
+--------------------------------
+## setStatusTip(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property statusTip  .
+
+
+--------------------------------
+## setStyle(arg__1)
+
+Parameters:
+
+- arg__1 – QStyle
+
+Sets the widget’s GUI style to style. The ownership of the style object is not transferred.
+
+If no style is set, the widget uses the application’s style, style() instead.
+
+Setting a widget’s style has no effect on existing or future child widgets.
+
+
+--------------------------------
+## setStyleSheet(styleSheet)
+
+Parameters:
+
+- styleSheet – str
+
+Setter of property styleSheet  .
+
+
+--------------------------------
+## static setTabOrder(arg__1, arg__2)
+
+Parameters:
+
+- arg__1 – QWidget
+- arg__2 – QWidget
+
+
+Puts the second widget after the first widget in the focus order.
+
+It effectively removes the second widget from its focus chain and inserts it after the first widget.
+
+Note that since the tab order of the second widget is changed, you should order a chain like this:
+
+```python
+setTabOrder(a, b) # a to b
+setTabOrder(b, c) # a to b to c
+setTabOrder(c, d) # a to b to c to d
+```
+
+not like this:
+
+```python
+# WRONG
+setTabOrder(c, d) # c to d
+setTabOrder(a, b) # a to b AND c to d
+setTabOrder(b, c) # a to b to c, but not c to d
+```
+
+If first or second has a focus proxy, setTabOrder() correctly substitutes the proxy.
+
+
+--------------------------------
+## setTabletTracking(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property tabletTracking  .
+
+
+--------------------------------
+## setToolTip(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property toolTip  .
+
+
+--------------------------------
+## setToolTipDuration(msec)
+
+Parameters:
+
+- msec – int
+
+Setter of property toolTipDuration  .
+
+
+--------------------------------
+## setUpdatesEnabled(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property updatesEnabled  .
+
+
+--------------------------------
+## setVisible(visible)
+
+Parameters:
+
+- visible – bool
+
+Setter of property visible  .
+
+
+--------------------------------
+## setWhatsThis(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property whatsThis  .
+
+
+--------------------------------
+## setWindowFilePath(filePath)
+
+Parameters:
+
+- filePath – str
+
+Setter of property windowFilePath  .
+
+
+--------------------------------
+## setWindowFlag(arg__1[, on=true])
+
+Parameters:
+
+- arg__1 – WindowType
+- on – bool
+
+Sets the window flag flag on this widget if on is true; otherwise clears the flag.
+
+
+--------------------------------
+## setWindowFlags(type)
+
+Parameters:
+
+- type – Combination of WindowType
+
+
+--------------------------------
+## setWindowIcon(icon)
+
+Parameters:
+
+- icon – QIcon
+
+Setter of property windowIcon  .
+
+
+--------------------------------
+## setWindowIconText(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property windowIconText  .
+
+
+--------------------------------
+## setWindowModality(windowModality)
+
+Parameters:
+
+- windowModality – WindowModality
+
+Setter of property windowModality  .
+
+
+--------------------------------
+## setWindowModified(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property windowModified  .
+
+
+--------------------------------
+## setWindowOpacity(level)
+
+Parameters:
+
+- level – float
+
+
+--------------------------------
+## setWindowRole(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Sets the window’s role to role. This only makes sense for windows on X11.
+
+
+--------------------------------
+## setWindowState(state)
+
+Parameters:
+
+- state – Combination of WindowState
+
+
+Sets the window state to windowState. The window state is a OR’ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen, and Qt::WindowActive.
+
+If the window is not visible (i.e. isVisible() returns false), the window state will take effect when show() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and normal mode, use the following code:
+
+```python
+w.setWindowState(w.windowState() ^ Qt.WindowFullScreen)
+```
+
+To restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:
+
+```python
+w.setWindowState((w.windowState()  ~Qt.WindowMinimized) | Qt.WindowActive)
+```
+
+Calling this function will hide the widget. You must call show() to make the widget visible again.
+
+When the window state changes, the widget receives a changeEvent() of type QEvent::WindowStateChange.
+
+
+--------------------------------
+## setWindowTitle(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+Setter of property windowTitle  .
+
+
+--------------------------------
+## show()
+
+Shows the widget and its child widgets.
+
+For child windows, this is equivalent to calling setVisible (true). Otherwise, it is equivalent to calling showFullScreen() , showMaximized() , or setVisible (true), depending on the platform’s default behavior for the window flags.
+
+
+--------------------------------
+## showEvent(event)
+
+Parameters:
+
+- event – QShowEvent
+
+This event handler can be reimplemented in a subclass to receive widget show events which are passed in the event parameter.
+
+Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.
+
+
+--------------------------------
+## showFullScreen()
+
+Shows the widget in full-screen mode.
+
+Calling this function only affects windows .
+
+To return from full-screen mode, call showNormal() or close() .
+
+An alternative would be to bypass the window manager entirely and create a window with the Qt::X11BypassWindowManagerHint flag. This has other severe problems though, like broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.
+
+X11 window managers that follow modern post-ICCCM specifications support full-screen mode properly.
+
+On macOS, showing a window full screen puts the entire application in full-screen mode, providing it with a dedicated desktop. Showing another window while the application runs in full-screen mode might automatically make that window full screen as well. To prevent that, exit full-screen mode by calling showNormal() or by close() on the full screen window before showing another window.
+
+
+--------------------------------
+## showMaximized()
+
+Shows the widget maximized.
+
+Calling this function only affects windows .
+
+On X11, this function may not work properly with certain window managers. See the Window Geometry documentation for an explanation.
+
+
+--------------------------------
+## showMinimized()
+
+Shows the widget minimized, as an icon.
+
+Calling this function only affects windows .
+
+
+--------------------------------
+## showNormal()
+
+Restores the widget after it has been maximized or minimized.
+
+Calling this function only affects windows .
+
+
+--------------------------------
+## size()
+
+Return type: QSize
+
+Getter of property size  .
+
+
+--------------------------------
+## sizeHint()
+
+Return type: QSize
+
+Getter of property sizeHint  .
+
+
+--------------------------------
+## sizeIncrement()
+
+Return type: QSize
+
+Getter of property sizeIncrement  .
+
+
+--------------------------------
+## sizePolicy()
+
+Return type: QSizePolicy
+
+Getter of property sizePolicy  .
+
+
+--------------------------------
+## stackUnder(arg__1)
+
+Parameters:
+
+- arg__1 – QWidget
+
+Places the widget under w in the parent widget’s stack.
+
+To make this work, the widget itself and w must be siblings.
+
+
+--------------------------------
+## statusTip()
+
+Return type: str
+
+Getter of property statusTip  .
+
+
+--------------------------------
+## style()
+
+Return type: QStyle
+
+
+--------------------------------
+## styleSheet()
+
+Return type: str
+
+Getter of property styleSheet  .
+
+
+--------------------------------
+## tabletEvent(event)
+
+Parameters:
+
+- event – QTabletEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive tablet events for the widget.
+
+If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget’s parent can interpret it.
+
+The default implementation ignores the event.
+
+If tablet tracking is switched off, tablet move events only occur if the stylus is in contact with the tablet, or at least one stylus button is pressed, while the stylus is being moved. If tablet tracking is switched on, tablet move events occur even while the stylus is hovering in proximity of the tablet, with no buttons pressed.
+
+
+--------------------------------
+## testAttribute(arg__1)
+
+Parameters:
+
+- arg__1 – WidgetAttribute
+
+Return type: bool
+
+Returns true if attribute attribute is set on this widget; otherwise returns false.
+
+
+--------------------------------
+## toolTip()
+
+Return type: str
+
+Getter of property toolTip  .
+
+
+--------------------------------
+## toolTipDuration()
+
+Return type: int
+
+Getter of property toolTipDuration  .
+
+
+--------------------------------
+## topLevelWidget()
+
+Return type: QWidget
+
+Use window() instead.
+
+
+--------------------------------
+## underMouse()
+
+Return type: bool
+
+Returns true if the widget is under the mouse cursor; otherwise returns false.
+
+This value is not updated properly during drag and drop operations.
+
+
+--------------------------------
+## ungrabGesture(type)
+
+Parameters:
+
+- type – GestureType
+
+Unsubscribes the widget from a given gesture type
+
+
+--------------------------------
+## unsetCursor()
+
+Reset function of property cursor  .
+
+
+--------------------------------
+## unsetLayoutDirection()
+
+Reset function of property layoutDirection  .
+
+
+--------------------------------
+## unsetLocale()
+
+Reset function of property locale  .
+
+
+--------------------------------
+## update(arg__1)
+
+Parameters:
+
+- arg__1 – QRegion
+
+This is an overloaded function.
+
+This version repaints a region rgn inside the widget.
+
+
+--------------------------------
+## update(x, y, w, h)
+
+Parameters:
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+This is an overloaded function.
+
+This version updates a rectangle (x, y, w, h) inside the widget.
+
+
+--------------------------------
+## update(arg__1)
+
+Parameters:
+
+- arg__1 – QRect
+
+This is an overloaded function.
+
+This version updates a rectangle rect inside the widget.
+
+
+--------------------------------
+## update()
+
+Updates the widget unless updates are disabled or the widget is hidden.
+
+This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to repaint() does.
+
+Calling update() several times normally results in just one paintEvent() call.
+
+Qt normally erases the widget’s area before the paintEvent() call. If the Qt::WA_OpaquePaintEvent widget attribute is set, the widget is responsible for painting all its pixels with an opaque color.
+
+
+--------------------------------
+## updateGeometry()
+
+Notifies the layout system that this widget has changed and may need to change geometry.
+
+Call this function if the sizeHint() or sizePolicy() have changed.
+
+For explicitly hidden widgets, updateGeometry() is a no-op. The layout system will be notified as soon as the widget is shown.
+
+
+--------------------------------
+## updateMicroFocus([query=Qt.ImQueryAll])
+
+Parameters:
+
+- query – InputMethodQuery
+
+Updates the widget’s micro focus and informs input methods that the state specified by query has changed.
+
+
+--------------------------------
+## updatesEnabled()
+
+Return type: bool
+
+Getter of property updatesEnabled  .
+
+
+--------------------------------
+## visibleRegion()
+
+Return type: QRegion
+
+Returns the unobscured region where paint events can occur.
+
+For visible widgets, this is an approximation of the area not covered by other widgets; otherwise, this is an empty region.
+
+The repaint() function calls this function if necessary, so in general you do not need to call it.
+
+
+--------------------------------
+## whatsThis()
+
+Return type: str
+
+Getter of property whatsThis  .
+
+
+--------------------------------
+## wheelEvent(event)
+
+Parameters:
+
+- event – QWheelEvent
+
+This event handler, for event event, can be reimplemented in a subclass to receive wheel events for the widget.
+
+If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget’s parent can interpret it.
+
+The default implementation ignores the event.
+
+
+--------------------------------
+## winId()
+
+Return type: WId
+
+Returns the window system identifier of the widget.
+
+Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.
+
+If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle.
+
+This value may change at run-time. An event with type QEvent::WinIdChange will be sent to the widget following a change in window system identifier.
+
+
+--------------------------------
+## window()
+
+Return type: QWidget
+
+Returns the window for this widget, i.e. the next ancestor widget that has (or could have) a window-system frame.
+
+If the widget is a window, the widget itself is returned.
+
+Typical usage is changing the window title:
+
+```python
+aWidget.window().setWindowTitle("New Window Title")
+```
+
+
+--------------------------------
+## windowFilePath()
+
+Return type: str
+
+Getter of property windowFilePath  .
+
+
+--------------------------------
+## windowFlags()
+
+Return type: Combination of WindowType
+
+
+--------------------------------
+## windowHandle()
+
+Return type: QWindow
+
+If this is a native widget, return the associated QWindow. Otherwise return null.
+
+Native widgets include toplevel widgets, QGLWidget, and child widgets on which winId() was called.
+
+
+--------------------------------
+## windowIcon()
+
+Return type: QIcon
+
+Getter of property windowIcon  .
+
+
+--------------------------------
+## windowIconChanged(icon)
+
+Parameters:
+
+- icon – QIcon
+
+This signal is emitted when the window’s icon has changed, with the new icon as an argument.
+
+Notification signal of property windowIcon  .
+
+
+--------------------------------
+## windowIconText()
+
+Return type: str
+
+Getter of property windowIconText  .
+
+
+--------------------------------
+## windowIconTextChanged(iconText)
+
+Parameters:
+
+- iconText – str
+
+This signal is emitted when the window’s icon text has changed, with the new iconText as an argument.
+
+This signal is deprecated.
+
+Notification signal of property windowIconText  .
+
+
+--------------------------------
+## windowModality()
+
+Return type: WindowModality
+
+Getter of property windowModality  .
+
+
+--------------------------------
+## windowOpacity()
+
+Return type: float
+
+
+--------------------------------
+## windowRole()
+
+Return type: str
+
+Returns the window’s role, or an empty string.
+
+
+--------------------------------
+## windowState()
+
+Return type: Combination of WindowState
+
+Returns the current window state. The window state is a OR’ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen, and Qt::WindowActive.
+
+
+--------------------------------
+## windowTitle()
+
+Return type: str
+
+Getter of property windowTitle  .
+
+
+--------------------------------
+## windowTitleChanged(title)
+
+Parameters:
+
+- title – str
+
+This signal is emitted when the window’s title has changed, with the new title as an argument.
+
+Notification signal of property windowTitle  .
+
+
+--------------------------------
+## windowType()
+
+Return type: WindowType
+
+Returns the window type of this widget. This is identical to windowFlags() & Qt::WindowType_Mask.
+
+
+--------------------------------
+## x()
+
+Return type: int
+
+Getter of property x  .
+
+
+--------------------------------
+## y()
+
+Return type: int
+
+Getter of property y  .

From 21bfe5d86af20eb622671c0072d62bfc3a1abc8a Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Wed, 7 Aug 2024 18:07:13 +0800
Subject: [PATCH 32/38] [PyQt] Add QWidget Chinese doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QWidget.CN.md | 5276 ++++++++++++++++++
 1 file changed, 5276 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QWidget.CN.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QWidget.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QWidget.CN.md
new file mode 100644
index 0000000..5012506
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QWidget.CN.md
@@ -0,0 +1,5276 @@
+
+[English doc](QWidget.md)
+
+# class QWidget
+
+QWidget 类是所有用户界面对象的基类。
+
+
+# Synopsis
+
+## Properties
+
+- [acceptDrops](#property-acceptdrops--bool)
+
+    是否为此小部件启用放置事件。
+
+- [accessibleDescription](#property-accessibledescription--str)
+
+    辅助技术所见的小部件描述。
+
+- [accessibleName](#property-accessiblename--str)
+
+    辅助技术所见的小部件名称。
+
+- [autoFillBackground](#property-autofillbackground--bool)
+
+    小部件背景是否自动填充。
+
+- [baseSize](#property-basesize--qsize)
+
+    小部件的基本尺寸。
+
+- [childrenRect](#property-childrenrect--qrect)
+
+    小部件子项的边界矩形。
+
+- [childrenRegion](#property-childrenregion--qregion)
+
+    小部件的子部件所占据的组合区域。
+
+- [contextMenuPolicy](#property-contextmenupolicy--qtcontextmenupolicy)
+
+    小部件如何显示上下文菜单。
+
+- [cursor](#property-cursor--qcursor)
+
+    此小部件的光标形状。
+
+- [enabled](#property-enabled--bool)
+
+    小部件是否已启用。
+
+- [focus](#property-focus--bool)
+
+    此小部件（或其焦点代理）是否具有键盘输入焦点。
+
+- [focusPolicy](#property-focuspolicy--qtfocuspolicy)
+
+    小部件接受键盘焦点的方式。
+
+- [font](#property-font--qfont)
+
+    当前为小部件设置的字体。
+
+- [frameGeometry](#property-framegeometry--qrect)
+
+    小部件相对于其父级（包括任何窗口框架）的几何形状。
+
+- [frameSize](#property-framesize--qsize)
+
+    小部件的大小（包括任何窗口框架）
+
+- [fullScreen](#property-fullscreen--bool)
+
+    小部件是否以全屏模式显示。
+
+- [geometry](#property-geometry--qrect)
+
+    小部件相对于其父级的几何形状，不包括窗口框架。
+
+- [height](#property-height--int)
+
+    不包括任何窗口框架的小部件的高度。
+
+- [inputMethodHints](#property-inputmethodhints--combination-of-qtinputmethodhint)
+
+    小部件具有哪些输入法特定提示。
+
+- [isActiveWindow](#property-isactivewindow--bool)
+
+    此小部件的窗口是否为活动窗口。
+
+- [layoutDirection](#property-layoutdirection--qtlayoutdirection)
+
+    此小部件的布局方向。
+
+- [locale](#property-locale--qlocale)
+
+    小部件的语言环境。
+
+- [maximized](#property-maximized--bool)
+
+    此小部件是否最大化。
+
+- [maximumHeight](#property-maximumheight--int)
+
+    小部件的最大高度（以像素为单位）。
+
+- [maximumSize](#property-maximumsize--qsize)
+
+    小部件的最大尺寸（以像素为单位）。
+
+- [maximumWidth](#property-maximumwidth--int)
+
+    小部件的最大宽度（以像素为单位）。
+
+- [minimized](#property-minimized--bool)
+
+    此小部件是否最小化（图标化）。
+
+- [minimumHeight](#property-minimumheight--int)
+
+    小部件的最小高度（以像素为单位）。
+
+- [minimumSize](#property-minimumsize--qsize)
+
+    小部件的最小尺寸。
+
+- [minimumSizeHint](#property-minimumsizehint--qsize)
+
+    建议的小部件的最小尺寸。
+
+- [minimumWidth](#property-minimumwidth--int)
+
+    小部件的最小宽度（以像素为单位）。
+
+- [modal](#property-modal--bool)
+
+    该小部件是否是模态小部件。
+
+- [mouseTracking](#property-mousetracking--bool)
+
+    是否为小部件启用鼠标跟踪。
+
+- [normalGeometry](#property-normalgeometry--qrect)
+
+    当窗口小部件显示为正常（非最大化或全屏）顶层窗口小部件时，其几何形状将会出现。
+
+- [palette](#property-palette--qpalette)
+
+    小部件的调色板。
+
+- [pos](#property-pos--qpoint)
+
+    小部件在其父小部件中的位置。
+
+- [rect](#property-rect--qrect)
+
+    窗口小部件的内部几何形状（不包括任何窗口框架）。
+
+- [size](#property-size--qsize)
+
+    不包括任何窗口框架的小部件的大小。
+
+- [sizeHint](#property-sizehint--qsize)
+
+    小部件的推荐尺寸。
+
+- [sizeIncrement](#property-sizeincrement--qsize)
+
+    小部件的尺寸增量。
+
+- [sizePolicy](#property-sizepolicy--qsizepolicy)
+
+    小部件的默认布局行为。
+
+- [statusTip](#property-statustip--str)
+
+    小部件的状态提示。
+
+- [styleSheet](#property-stylesheet--str)
+
+    小部件的样式表。
+
+- [tabletTracking](#property-tablettracking--bool)
+
+    是否为小部件启用平板电脑跟踪。
+
+- [toolTip](#property-tooltip--str)
+
+    小部件的工具提示。
+
+- [toolTipDuration](#property-tooltipduration--int)
+
+    小部件的工具提示持续时间。
+
+- [updatesEnabled](#property-updatesenabled--bool)
+
+    是否启用更新。
+
+- [visible](#property-visible--bool)
+
+    小部件是否可见。
+
+- [whatsThis](#property-whatsthis--str)
+
+    小部件的“这是什么”帮助文本。
+
+- [width](#property-width--int)
+
+    不包括任何窗口框架的小部件的宽度。
+
+- [windowFilePath](#property-windowfilepath--str)
+
+    与小部件关联的文件路径。
+
+- [windowIcon](#property-windowicon--qicon)
+
+    小部件的图标。
+
+- [windowIconText](#property-windowicontext--str)
+
+    最小化窗口图标上显示的文本。
+
+- [windowModality](#property-windowmodality--qtwindowmodality)
+
+    哪些窗口被模态窗口小部件阻挡。
+
+- [windowModified](#property-windowmodified--bool)
+
+    窗口中显示的文档是否有未保存的更改。
+
+- [windowOpacity](#property-windowopacity--float)
+
+    窗口的不透明度。
+
+- [windowTitle](#property-windowtitle--str)
+
+    窗口标题（cap）。
+
+- [x](#property-x--int)
+
+    小部件相对于其父级（包括任何窗口框架）的 x 坐标。
+
+- [y](#property-y--int)
+
+    小部件相对于其父级的 y 坐标，包括任何窗口框架。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone-fqtwindowflags)
+
+- [def acceptDrops()](#acceptdrops)
+
+- [def accessibleDescription()](#accessibledescription)
+
+- [def accessibleName()](#accessiblename)
+
+- [def actions()](#actions)
+
+- [def activateWindow()](#activatewindow)
+
+- [def addAction()](#addactionaction)
+
+- [def addActions()](#addactionsactions)
+
+- [def adjustSize()](#adjustsize)
+
+- [def autoFillBackground()](#autofillbackground)
+
+- [def backgroundRole()](#backgroundrole)
+
+- [def backingStore()](#backingstore)
+
+- [def baseSize()](#basesize)
+
+- [def childAt()](#childatp)
+
+- [def childrenRect()](#childrenrect)
+
+- [def childrenRegion()](#childrenregion)
+
+- [def clearFocus()](#clearfocus)
+
+- [def clearMask()](#clearmask)
+
+- [def contentsMargins()](#contentsmargins)
+
+- [def contentsRect()](#contentsrect)
+
+- [def contextMenuPolicy()](#contextmenupolicy)
+
+- [def create()](#createarg__10-initializewindowtrue-destroyoldwindowtrue)
+
+- [def createWinId()](#createwinid)
+
+- [def cursor()](#cursor)
+
+- [def destroy()](#destroydestroywindowtrue-destroysubwindowstrue)
+
+- [def effectiveWinId()](#effectivewinid)
+
+- [def ensurePolished()](#ensurepolished)
+
+- [def focusNextChild()](#focusnextchild)
+
+- [def focusPolicy()](#focuspolicy)
+
+- [def focusPreviousChild()](#focuspreviouschild)
+
+- [def focusProxy()](#focusproxy)
+
+- [def focusWidget()](#focuswidget)
+
+- [def font()](#font)
+
+- [def fontInfo()](#fontinfo)
+
+- [def fontMetrics()](#fontmetrics)
+
+- [def foregroundRole()](#foregroundrole)
+
+- [def frameGeometry()](#framegeometry)
+
+- [def frameSize()](#framesize)
+
+- [def geometry()](#geometry)
+
+- [def grab()](#grabrectangleqrectqpoint0-0-qsize-1--1)
+
+- [def grabGesture()](#grabgesturetype-flagsqtgestureflags)
+
+- [def grabKeyboard()](#grabkeyboard)
+
+- [def grabMouse()](#grabmouse)
+
+- [def grabShortcut()](#grabshortcutkey-contextqtwindowshortcut)
+
+- [def graphicsEffect()](#graphicseffect)
+
+- [def graphicsProxyWidget()](#graphicsproxywidget)
+
+- [def hasFocus()](#hasfocus)
+
+- [def hasMouseTracking()](#hasmousetracking)
+
+- [def hasTabletTracking()](#hastablettracking)
+
+- [def inputMethodHints()](#inputmethodhints)
+
+- [def insertAction()](#insertactionbefore-action)
+
+- [def insertActions()](#insertactionsbefore-actions)
+
+- [def internalWinId()](#internalwinid)
+
+- [def isActiveWindow()](#isactivewindow)
+
+- [def isAncestorOf()](#isancestorofchild)
+
+- [def isEnabled()](#isenabled)
+
+- [def isEnabledTo()](#isenabledtoarg__1)
+
+- [def isFullScreen()](#isfullscreen)
+
+- [def isHidden()](#ishidden)
+
+- [def isLeftToRight()](#islefttoright)
+
+- [def isMaximized()](#ismaximized)
+
+- [def isMinimized()](#isminimized)
+
+- [def isModal()](#ismodal)
+
+- [def isRightToLeft()](#isrighttoleft)
+
+- [def isTopLevel()](#istoplevel)
+
+- [def isVisible()](#isvisible)
+
+- [def isVisibleTo()](#isvisibletoarg__1)
+
+- [def isWindow()](#iswindow)
+
+- [def isWindowModified()](#iswindowmodified)
+
+- [def layout()](#layout)
+
+- [def layoutDirection()](#layoutdirection)
+
+- [def locale()](#locale)
+
+- [def mapFrom()](#mapfromarg__1-arg__2)
+
+- [def mapFromGlobal()](#mapfromglobalarg__1)
+
+- [def mapFromParent()](#mapfromparentarg__1)
+
+- [def mapTo()](#maptoarg__1-arg__2)
+
+- [def mapToGlobal()](#maptoglobalarg__1)
+
+- [def mapToParent()](#maptoparentarg__1)
+
+- [def mask()](#mask)
+
+- [def maximumHeight()](#maximumheight)
+
+- [def maximumSize()](#maximumsize)
+
+- [def maximumWidth()](#maximumwidth)
+
+- [def minimumHeight()](#minimumheight)
+
+- [def minimumSize()](#minimumsize)
+
+- [def minimumWidth()](#minimumwidth)
+
+- [def move()](#movearg__1)
+
+- [def nativeParentWidget()](#nativeparentwidget)
+
+- [def nextInFocusChain()](#nextinfocuschain)
+
+- [def normalGeometry()](#normalgeometry)
+
+- [def overrideWindowFlags()](#overridewindowflagstype)
+
+- [def overrideWindowState()](#overridewindowstatestate)
+
+- [def palette()](#palette)
+
+- [def parentWidget()](#parentwidget)
+
+- [def pos()](#pos)
+
+- [def previousInFocusChain()](#previousinfocuschain)
+
+- [def rect()](#rect)
+
+- [def releaseKeyboard()](#releasekeyboard)
+
+- [def releaseMouse()](#releasemouse)
+
+- [def releaseShortcut()](#releaseshortcutid)
+
+- [def removeAction()](#removeactionaction)
+
+- [def render()](#renderpainter-targetoffset-sourceregionqregion-renderflagsqwidgetrenderflagsqwidgetrenderflagdrawwindowbackground--qwidgetrenderflagdrawchildren)
+
+- [def repaint()](#repaint)
+
+- [def resize()](#resizearg__1)
+
+- [def restoreGeometry()](#restoregeometrygeometry)
+
+- [def saveGeometry()](#savegeometry)
+
+- [def screen()](#screen)
+
+- [def scroll()](#scrolldx-dy)
+
+- [def setAcceptDrops()](#setacceptdropson)
+
+- [def setAccessibleDescription()](#setaccessibledescriptiondescription)
+
+- [def setAccessibleName()](#setaccessiblenamename)
+
+- [def setAttribute()](#setattributearg__1-ontrue)
+
+- [def setAutoFillBackground()](#setautofillbackgroundenabled)
+
+- [def setBackgroundRole()](#setbackgroundrolearg__1)
+
+- [def setBaseSize()](#setbasesizearg__1)
+
+- [def setContentsMargins()](#setcontentsmarginsmargins)
+
+- [def setContextMenuPolicy()](#setcontextmenupolicypolicy)
+
+- [def setCursor()](#setcursorarg__1)
+
+- [def setFixedHeight()](#setfixedheighth)
+
+- [def setFixedSize()](#setfixedsizearg__1)
+
+- [def setFixedWidth()](#setfixedwidthw)
+
+- [def setFocus()](#setfocus)
+
+- [def setFocusPolicy()](#setfocuspolicypolicy)
+
+- [def setFocusProxy()](#setfocusproxyarg__1)
+
+- [def setFont()](#setfontarg__1)
+
+- [def setForegroundRole()](#setforegroundrolearg__1)
+
+- [def setGeometry()](#setgeometryarg__1)
+
+- [def setGraphicsEffect()](#setgraphicseffecteffect)
+
+- [def setInputMethodHints()](#setinputmethodhintshints)
+
+- [def setLayout()](#setlayoutarg__1)
+
+- [def setLayoutDirection()](#setlayoutdirectiondirection)
+
+- [def setLocale()](#setlocalelocale)
+
+- [def setMask()](#setmaskarg__1)
+
+- [def setMaximumHeight()](#setmaximumheightmaxh)
+
+- [def setMaximumSize()](#setmaximumsizearg__1)
+
+- [def setMaximumWidth()](#setmaximumwidthmaxw)
+
+- [def setMinimumHeight()](#setminimumheightminh)
+
+- [def setMinimumSize()](#setminimumsizearg__1)
+
+- [def setMinimumWidth()](#setminimumwidthminw)
+
+- [def setMouseTracking()](#setmousetrackingenable)
+
+- [def setPalette()](#setpalettearg__1)
+
+- [def setParent()](#setparentparent)
+
+- [def setScreen()](#setscreenarg__1)
+
+- [def setShortcutAutoRepeat()](#setshortcutautorepeatid-enabletrue)
+
+- [def setShortcutEnabled()](#setshortcutenabledid-enabletrue)
+
+- [def setSizeIncrement()](#setsizeincrementarg__1)
+
+- [def setSizePolicy()](#setsizepolicyarg__1)
+
+- [def setStatusTip()](#setstatustiparg__1)
+
+- [def setStyle()](#setstylearg__1)
+
+- [def setTabletTracking()](#settablettrackingenable)
+
+- [def setToolTip()](#settooltiparg__1)
+
+- [def setToolTipDuration()](#settooltipdurationmsec)
+
+- [def setUpdatesEnabled()](#setupdatesenabledenable)
+
+- [def setWhatsThis()](#setwhatsthisarg__1)
+
+- [def setWindowFilePath()](#setwindowfilepathfilepath)
+
+- [def setWindowFlag()](#setwindowflagarg__1-ontrue)
+
+- [def setWindowFlags()](#setwindowflagstype)
+
+- [def setWindowIcon()](#setwindowiconicon)
+
+- [def setWindowIconText()](#setwindowicontextarg__1)
+
+- [def setWindowModality()](#setwindowmodalitywindowmodality)
+
+- [def setWindowOpacity()](#setwindowopacitylevel)
+
+- [def setWindowRole()](#setwindowrolearg__1)
+
+- [def setWindowState()](#setwindowstatestate)
+
+- [def size()](#size)
+
+- [def sizeIncrement()](#sizeincrement)
+
+- [def sizePolicy()](#sizepolicy)
+
+- [def stackUnder()](#stackunderarg__1)
+
+- [def statusTip()](#statustip)
+
+- [def style()](#style)
+
+- [def styleSheet()](#stylesheet)
+
+- [def testAttribute()](#testattributearg__1)
+
+- [def toolTip()](#tooltip)
+
+- [def toolTipDuration()](#tooltipduration)
+
+- [def topLevelWidget()](#toplevelwidget)
+
+- [def underMouse()](#undermouse)
+
+- [def ungrabGesture()](#ungrabgesturetype)
+
+- [def unsetCursor()](#unsetcursor)
+
+- [def unsetLayoutDirection()](#unsetlayoutdirection)
+
+- [def unsetLocale()](#unsetlocale)
+
+- [def update()](#update)
+
+- [def updateGeometry()](#updategeometry)
+
+- [def updatesEnabled()](#updatesenabled)
+
+- [def visibleRegion()](#visibleregion)
+
+- [def whatsThis()](#whatsthis)
+
+- [def winId()](#winid)
+
+- [def window()](#window)
+
+- [def windowFilePath()](#windowfilepath)
+
+- [def windowFlags()](#windowflags)
+
+- [def windowHandle()](#windowhandle)
+
+- [def windowIcon()](#windowicon)
+
+- [def windowIconText()](#windowicontext)
+
+- [def windowModality()](#windowmodality)
+
+- [def windowOpacity()](#windowopacity)
+
+- [def windowRole()](#windowrole)
+
+- [def windowState()](#windowstate)
+
+- [def windowTitle()](#windowtitle)
+
+- [def windowType()](#windowtype)
+
+- [def x()](#x)
+
+- [def y()](#y)
+
+
+## Virtual methods
+
+- [def actionEvent()](#actioneventevent)
+
+- [def changeEvent()](#changeeventevent)
+
+- [def closeEvent()](#closeeventevent)
+
+- [def contextMenuEvent()](#contextmenueventevent)
+
+- [def dragEnterEvent()](#dragentereventevent)
+
+- [def dragLeaveEvent()](#dragleaveeventevent)
+
+- [def dragMoveEvent()](#dragmoveeventevent)
+
+- [def dropEvent()](#dropeventevent)
+
+- [def enterEvent()](#entereventevent)
+
+- [def focusInEvent()](#focusineventevent)
+
+- [def focusNextPrevChild()](#focusnextprevchildnext)
+
+- [def focusOutEvent()](#focusouteventevent)
+
+- [def hasHeightForWidth()](#hasheightforwidth)
+
+- [def heightForWidth()](#heightforwidtharg__1)
+
+- [def hideEvent()](#hideeventevent)
+
+- [def inputMethodEvent()](#inputmethodeventevent)
+
+- [def inputMethodQuery()](#inputmethodqueryarg__1)
+
+- [def keyPressEvent()](#keypresseventevent)
+
+- [def keyReleaseEvent()](#keyreleaseeventevent)
+
+- [def leaveEvent()](#leaveeventevent)
+
+- [def minimumSizeHint()](#minimumsizehint)
+
+- [def mouseDoubleClickEvent()](#mousedoubleclickeventevent)
+
+- [def mouseMoveEvent()](#mousemoveeventevent)
+
+- [def mousePressEvent()](#mousepresseventevent)
+
+- [def mouseReleaseEvent()](#mousereleaseeventevent)
+
+- [def moveEvent()](#moveeventevent)
+
+- [def nativeEvent()](#nativeeventeventtype-message)
+
+- [def paintEvent()](#painteventevent)
+
+- [def resizeEvent()](#resizeeventevent)
+
+- [def setVisible()](#setvisiblevisible)
+
+- [def showEvent()](#showeventevent)
+
+- [def sizeHint()](#sizehint)
+
+- [def tabletEvent()](#tableteventevent)
+
+- [def wheelEvent()](#wheeleventevent)
+
+
+## Slots
+
+- [def close()](#close)
+
+- [def hide()](#hide)
+
+- [def lower()](#lower)
+
+- [def raise_()](#raise_)
+
+- [def repaint()](#repaint)
+
+- [def setDisabled()](#setdisabledarg__1)
+
+- [def setEnabled()](#setenabledarg__1)
+
+- [def setFocus()](#setfocus)
+
+- [def setHidden()](#sethiddenhidden)
+
+- [def setStyleSheet()](#setstylesheetstylesheet)
+
+- [def setWindowModified()](#setwindowmodifiedarg__1)
+
+- [def setWindowTitle()](#setwindowtitlearg__1)
+
+- [def show()](#show)
+
+- [def showFullScreen()](#showfullscreen)
+
+- [def showMaximized()](#showmaximized)
+
+- [def showMinimized()](#showminimized)
+
+- [def showNormal()](#shownormal)
+
+- [def update()](#update)
+
+- [def updateMicroFocus()](#updatemicrofocusqueryqtimqueryall)
+
+
+## Signals
+
+- [def customContextMenuRequested()](#customcontextmenurequestedpos)
+
+- [def windowIconChanged()](#windowiconchangedicon)
+
+- [def windowIconTextChanged()](#windowicontextchangedicontext)
+
+- [def windowTitleChanged()](#windowtitlechangedtitle)
+
+
+## Static functions
+
+- [def createWindowContainer()](#static-createwindowcontainerwindow-parentnone-flagsqtwindowflags)
+
+- [def find()](#static-findarg__1)
+
+- [def keyboardGrabber()](#static-keyboardgrabber)
+
+- [def mouseGrabber()](#static-mousegrabber)
+
+- [def setTabOrder()](#static-settaborderarg__1-arg__2)
+
+
+# Detailed Description
+
+小部件是用户界面的原子：它从窗口系统接收鼠标、键盘和其他事件，并在屏幕上绘制自己的表示。每个小部件都是矩形的，它们按 Z 顺序排序。小部件由其父部件和其前面的小部件裁剪。
+
+未嵌入父部件的小部件称为窗口。通常，窗口有一个框架和一个标题栏，但也可以使用合适的窗口标志创建没有这种装饰的窗口。在 Qt 中，QMainWindow 和 QDialog 的各种子类是最常见的窗口类型。
+
+每个小部件的构造函数都接受一个或两个标准参数：
+
+1. QWidget *parent = nullptr 是新小部件的父部件。如果它是 None（默认值），则新小部件将是一个窗口。如果不是，它将是父部件的子部件，并受父部件的几何形状约束（除非您将 Qt::Window 指定为窗口标志）。
+
+2. Qt::WindowFlags f = { }（如果可用）设置窗口标志；默认值适用于大多数窗口小部件，但要获取（例如）没有窗口系统框架的窗口，则必须使用特殊标志。
+
+QWidget 有许多成员函数，但其​​中一些几乎没有直接功能；例如，QWidget 有一个字体属性，但它本身从不使用它。有许多子类提供真正的功能，例如 QLabel 、 QPushButton 、 QListWidget 和 QTabWidget 。
+
+
+## Top-Level and Child Widgets
+
+没有父窗口小部件的窗口小部件始终是独立窗口（顶级窗口小部件）。对于这些窗口小部件，setWindowTitle() 和 setWindowIcon() 分别设置标题栏和图标。
+
+非窗口窗口小部件是子窗口小部件，显示在其父窗口小部件内。Qt 中的大多数窗口小部件主要用作子窗口小部件。例如，可以将按钮显示为顶级窗口，但大多数人更喜欢将按钮放在其他窗口小部件中，例如 QDialog 。
+
+上图显示了 QGroupBox 小部件，用于在 QGridLayout 提供的布局中容纳各种子窗口小部件。QLabel 子窗口小部件已被勾勒出来以指示其完整尺寸。
+
+如果您想使用 QWidget 来容纳子窗口小部件，通常需要向父 QWidget 添加布局。有关更多信息，请参阅布局管理。
+
+
+## Composite Widgets
+
+当小部件用作容器来对多个子小部件进行分组时，它被称为复合小部件。可以通过构造具有所需视觉属性的小部件（例如 QFrame ）并向其添加子小部件（通常由布局管理）来创建这些小部件。
+
+还可以通过对标准小部件（例如 QWidget 或 QFrame ）进行子类化并在子类的构造函数中添加必要的布局和子小部件来创建复合小部件。Qt 提供的许多示例都使用这种方法，Qt Widgets 教程中也介绍了这种方法。
+
+
+## Custom Widgets and Painting
+
+由于 QWidget 是 QPaintDevice 的子类，因此可以使用子类来显示自定义内容，这些内容由 QPainter 类的实例通过一系列绘制操作组成。这种方法与图形视图框架使用的画布样式方法形成对比，在画布样式方法中，项目由应用程序添加到场景中，并由框架本身进行渲染。
+
+每个小部件都在其 paintEvent() 函数中执行所有绘制操作。每当小部件需要重新绘制时，都会调用此函数，无论是由于某些外部更改还是应用程序请求。
+
+模拟时钟示例展示了一个简单的小部件如何处理绘制事件。
+
+
+## Size Hints and Size Policies
+
+在实现新的小部件时，重新实现 sizeHint() 以提供小部件的合理默认大小并使用 setSizePolicy() 设置正确的大小策略几乎总是有用的。
+
+默认情况下，不提供大小提示的复合小部件将根据其子小部件的空间要求进行大小调整。
+
+大小策略允许您为布局管理系统提供良好的默认行为，以便其他小部件可以轻松包含和管理您的小部件。默认大小策略表示大小提示代表小部件的首选大小，这通常对许多小部件来说已经足够好了。
+
+
+## Events
+
+小部件响应通常由用户操作引起的事件。Qt 通过调用特定的事件处理程序函数（其中包含有关每个事件的信息的 QEvent 子类实例）将事件传递给小部件。
+
+如果您的小部件仅包含子小部件，则可能不需要实现任何事件处理程序。如果您想检测子小部件中的鼠标单击，请在小部件的 mousePressEvent() 中调用子部件的 underMouse() 函数。
+
+Scribble 示例实现了一组更广泛的事件来处理鼠标移动、按钮按下和窗口大小调整。
+
+您需要为自己的窗口小部件提供行为和内容，但这里简要概述了与 QWidget 相关的事件，从最常见的事件开始：
+
+- 每当需要重新绘制小部件时，都会调用 paintEvent()。每个显示自定义内容的小部件都必须实现它。使用 QPainter 进行绘制只能在 paintEvent() 或由 paintEvent() 调用的函数中进行。
+
+- 调整小部件大小后会调用 resizeEvent()。
+
+- 当鼠标光标位于窗口小部件内时按下鼠标按钮，或当窗口小部件使用 grabMouse() 抓取鼠标时，将调用 mousePressEvent() 。按下鼠标而不释放它实际上与调用 grabMouse() 相同。
+
+- 当释放鼠标按钮时，将调用 mouseReleaseEvent() 。窗口小部件在收到相应的鼠标按下事件时会接收鼠标释放事件。这意味着，如果用户在窗口小部件内按下鼠标，然后在释放鼠标按钮之前将鼠标拖到其他地方，则窗口小部件会收到释放事件。有一个例外：如果在按住鼠标按钮时出现弹出菜单，则此弹出菜单会立即窃取鼠标事件。
+
+- 当用户在窗口小部件中双击时，将调用 mouseDoubleClickEvent() 。如果用户双击，则窗口小部件会收到鼠标按下事件、鼠标释放事件、（鼠标单击事件）、第二次鼠标按下、此事件以及最后的第二次鼠标释放事件。 （如果在此操作期间鼠标没有保持稳定，也可能会收到一些鼠标移动事件。）在第二次单击到来之前，无法区分单击和双击。（这就是为什么大多数 GUI 书籍建议将双击作为单击的扩展，而不是触发不同的操作的原因之一。）
+
+接受键盘输入的小部件需要重新实现几个事件处理程序：
+
+- 每次按下某个键时都会调用 keyPressEvent()，并且当某个键被按住足够长的时间以使其自动重复时，也会再次调用。只有当焦点更改机制未使用 Tab 和 Shift+Tab 键时，才会将它们传递给小部件。要强制小部件处理这些键，您必须重新实现 event() 。
+
+- 当小部件获得键盘焦点时（假设您已调用 setFocusPolicy() ），会调用 focusInEvent() 。行为良好的小部件会以清晰但谨慎的方式表明它们拥有键盘焦点。
+
+- 当小部件失去键盘焦点时，将调用 focusOutEvent()。
+
+您可能还需要重新实现一些不太常见的事件处理程序：
+
+- 鼠标在按住鼠标按钮的情况下移动时，将调用 mouseMoveEvent()。这在拖放操作期间很有用。如果您调用 setMouseTracking (true)，即使没有按下任何按钮，您也会收到鼠标移动事件。（另请参阅拖放指南。）
+
+- 每当释放按键并按住按键时（如果按键是自动重复的），将调用 keyReleaseEvent()。在这种情况下，小部件将在每次重复时收到一对按键释放和按键按下事件。只有当焦点更改机制未使用 Tab 和 Shift+Tab 键时，它们才会传递给小部件。要强制小部件处理这些键，您必须重新实现 event()。
+
+- 每当用户在小部件具有焦点的情况下转动鼠标滚轮时，将调用 wheelEvent()。
+
+- 当鼠标进入小部件的屏幕空间时，将调用 enterEvent()。 （这不包括小部件的任何子部件所拥有的屏幕空间。）
+
+- 当鼠标离开小部件的屏幕空间时，将调用 leaveEvent()。如果鼠标进入子小部件，则不会引起 leaveEvent()。
+
+- 当小部件相对于其父部件移动时，将调用 moveEvent()。
+
+- 当用户关闭小部件时（或调用 close() 时），将调用 closeEvent()。
+
+QEvent::Type 的文档中还描述了一些相当晦涩的事件。要处理这些事件，您需要直接重新实现 event()。
+
+event() 的默认实现处理 Tab 和 Shift+Tab（用于移动键盘焦点），并将大多数其他事件传递给上述更专业的处理程序之一。
+
+事件和用于传递它们的机制在事件系统中介绍。
+
+
+## Groups of Functions and Properties
+
+| Context           | Functions and Properties |
+| ----------------- | ------------------------ |
+| Window functions  | show() , hide() , raise() , lower() , close() . |
+| Top-level windows | windowModified , windowTitle , windowIcon , isActiveWindow , activateWindow() , minimized , showMinimized() , maximized , showMaximized() , fullScreen , showFullScreen() , showNormal() . |
+| Window contents   | update() , repaint() , scroll() . |
+| Geometry          | pos , x() , y() , rect , size , width() , height() , move() , resize() , sizePolicy , sizeHint() , minimumSizeHint() , updateGeometry() , layout() , frameGeometry , geometry , childrenRect , childrenRegion , adjustSize() , mapFromGlobal() , mapToGlobal() , mapFromParent() , mapToParent() , maximumSize , minimumSize , sizeIncrement , baseSize , setFixedSize() |
+| Mode              | visible , isVisibleTo() , enabled , isEnabledTo() , modal , isWindow() , mouseTracking , updatesEnabled , visibleRegion() . |
+| Look and feel     | style() , setStyle() , styleSheet , cursor , font , palette , backgroundRole() , setBackgroundRole() , fontInfo() , fontMetrics() . |
+| Keyboard focus functions | focus , focusPolicy , setFocus() , clearFocus() , setTabOrder() , setFocusProxy() , focusNextChild() , focusPreviousChild() . |
+| Mouse and keyboard grabbing | grabMouse() , releaseMouse() , grabKeyboard() , releaseKeyboard() , mouseGrabber() , keyboardGrabber() . |
+| Event handlers    | event() , mousePressEvent() , mouseReleaseEvent() , mouseDoubleClickEvent() , mouseMoveEvent() , keyPressEvent() , keyReleaseEvent() , focusInEvent() , focusOutEvent() , wheelEvent() , enterEvent() , leaveEvent() , paintEvent() , moveEvent() , resizeEvent() , closeEvent() , dragEnterEvent() , dragMoveEvent() , dragLeaveEvent() , dropEvent() , childEvent(), showEvent() , hideEvent() , customEvent(). changeEvent() , |
+| System functions  | parentWidget() , window() , setParent() , winId() , find() , metric() . |
+| Context menu      | contextMenuPolicy , contextMenuEvent() , customContextMenuRequested() , actions() |
+| Interactive help  | setToolTip() , setWhatsThis() |
+
+
+## Widget Style Sheets
+
+除了每个平台的标准小部件样式外，还可以根据样式表中指定的规则对小部件进行样式设置。此功能使您能够自定义特定小部件的外观，以向用户提供有关其用途的视觉提示。例如，可以以特定方式对按钮进行样式设置，以指示它执行破坏性操作。
+
+Qt 样式表文档中更详细地描述了小部件样式表的使用。
+
+
+## Transparency and Double Buffering
+
+QWidget 自动对其绘制进行双缓冲，因此无需在 paintEvent() 中编写双缓冲代码来避免闪烁。
+
+只要未设置 Qt::WA_PaintOnScreen，父窗口小部件的内容就会默认传播到其每个子窗口小部件。可以编写自定义窗口小部件来利用此功能，方法是更新不规则区域（以创建非矩形子窗口小部件），或使用具有小于完整 alpha 分量的颜色进行绘制。下图显示了如何微调自定义窗口小部件的属性和特性以实现不同的效果。
+
+在上图中，构建了一个移除了某个区域的半透明矩形子窗口小部件并将其添加到父窗口小部件（显示像素图的 QLabel）。然后，设置不同的属性和窗口小部件属性以实现不同的效果：
+
+- 左侧窗口小部件没有设置其他属性或窗口小部件属性。此默认状态适合大多数具有透明度、形状不规则或不使用不透明画笔绘制整个区域的自定义窗口小部件。
+
+- 中心小部件设置了 autoFillBackground 属性。此属性用于依赖小部件提供默认背景且不使用不透明画笔绘制其整个区域的自定义小部件。
+
+- 右侧小部件设置了 Qt::WA_OpaquePaintEvent 小部件属性。这表示小部件将使用不透明颜色绘制其整个区域。小部件的区域最初将未初始化，在图中以红色对角网格图案表示，该图案透过覆盖的区域发光。
+
+要快速更新具有简单背景颜色的自定义小部件（例如实时绘图或图形小部件），最好定义合适的背景颜色（使用带有 QPalette::Window 角色的 setBackgroundRole()），设置 autoFillBackground 属性，并仅在小部件的 paintEvent() 中实现必要的绘图功能。
+
+要快速更新不断用不透明内容覆盖整个区域的自定义小部件（例如视频流小部件），最好设置小部件的 Qt::WA_OpaquePaintEvent，避免与重新绘制小部件背景相关的任何不必要的开销。
+
+如果小部件同时设置了 Qt::WA_OpaquePaintEvent 小部件属性和 autoFillBackground 属性，则 Qt::WA_OpaquePaintEvent 属性优先。根据您的要求，您应该选择其中之一。
+
+父小部件的内容也会传播到标准 Qt 小部件。如果父小部件以非标准方式装饰，这可能会导致一些意外结果，如下图所示。
+
+无需诉诸子类化即可自定义标准 Qt 小部件的绘制行为的范围略小于自定义小部件的范围。通常，可以通过设置标准小部件的 autoFillBackground 属性来实现其所需的外观。
+
+
+## Creating Translucent Windows
+
+您可以在支持合成的窗口系统上创建具有半透明区域的窗口。
+
+要在顶级小部件中启用此功能，请使用 setAttribute() 设置其 Qt::WA_TranslucentBackground 属性，并确保其背景在您希望部分透明的区域中用非不透明颜色绘制。
+
+平台说明：
+
+- X11：此功能依赖于使用支持 ARGB 视觉效果和合成窗口管理器的 X 服务器。
+
+- Windows：小部件需要设置 Qt::FramelessWindowHint 窗口标志才能使半透明效果发挥作用。
+
+- macOS：小部件需要设置 Qt::FramelessWindowHint 窗口标志才能使半透明效果发挥作用。
+
+
+## Native Widgets vs Alien Widgets
+
+外来窗口小部件是窗口系统未知的小部件。它们没有与之关联的本机窗口句柄。此功能可显著加快窗口小部件绘制、调整大小的速度，并消除闪烁。
+
+如果您需要本机窗口的旧行为，请选择以下选项之一：
+
+1. 在您的环境中使用 QT_USE_NATIVE_WINDOWS=1。
+
+2. 在您的应用程序上设置 Qt::AA_NativeWindows 属性。所有窗口小部件都将是本机窗口小部件。
+
+3. 在窗口小部件上设置 Qt::WA_NativeWindow 属性：窗口小部件本身及其所有祖先都将成为本机窗口小部件（除非设置了 Qt::WA_DontCreateNativeAncestors）。
+
+4. 调用 winId 以强制使用本机窗口（这意味着 3）。
+
+5. 设置 Qt::WA_PaintOnScreen 属性以强制使用本机窗口（这意味着 3）。
+
+
+--------------------------------
+## class RenderFlag
+
+（继承 enum.Flag）此枚举描述了在调用 render() 时如何渲染小部件。
+
+| Constant                     | Description |
+| ---------------------------- | ----------- |
+| QWidget.DrawWindowBackground | 如果启用此选项，即使未设置 autoFillBackground，小部件的背景也会呈现到目标中。默认情况下，此选项处于启用状态。 |
+| QWidget.DrawChildren         | 如果启用此选项，则小部件的子项将递归渲染到目标中。默认情况下，此选项处于启用状态。 |
+| QWidget.IgnoreMask           | 如果启用此选项，则在渲染到目标时会忽略小部件的 mask()。默认情况下，此选项处于禁用状态。 |
+
+
+--------------------------------
+## property acceptDrops : bool
+
+此属性保存是否为该小部件启用了放置事件。
+
+将此属性设置为 true 会向系统宣布该小部件可能能够接受放置事件。
+
+如果小部件是桌面 (windowType() == Qt::Desktop)，则当其他应用程序正在使用桌面时，此操作可能会失败；您可以调用 acceptDrops() 来测试是否发生这种情况。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- acceptDrops()
+- setAcceptDrops()
+
+
+--------------------------------
+## property accessibleDescription : str
+
+此属性保存辅助技术所看到的窗口小部件的描述。
+
+窗口小部件的可访问描述应传达窗口小部件的功能。虽然 accessibleName 应该是简短而简洁的字符串（例如 Save），但描述应提供更多上下文，例如 Saves the current document。
+
+此属性必须本地化。
+
+默认情况下，此属性包含一个空字符串，Qt 将使用工具提示来提供此信息。
+
+访问函数：
+
+- accessibleDescription()
+- setAccessibleDescription()
+
+
+--------------------------------
+## property accessibleName : str
+
+此属性保存辅助技术所见的小部件名称。
+
+这是辅助技术（如屏幕阅读器）宣布此小部件的主要名称。 对于大多数小部件，无需设置此属性。 例如，对于 QPushButton，将使用按钮的文本。
+
+当小部件不提供任何文本时，设置此属性很重要。 例如，仅包含图标的按钮需要设置此属性才能与屏幕阅读器配合使用。 名称应简短且等同于小部件传达的视觉信息。
+
+此属性必须本地化。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- accessibleName()
+- setAccessibleName()
+
+
+--------------------------------
+## property autoFillBackground : bool
+
+此属性保存小部件背景是否自动填充。
+
+如果启用，此属性将导致 Qt 在调用绘制事件之前填充小部件的背景。使用的颜色由小部件调色板中的 QPalette::Window 颜色角色定义。
+
+此外，除非设置了 WA_OpaquePaintEvent 或 WA_NoSystemBackground 属性，否则窗口始终由 QPalette::Window 填充。
+
+如果小部件的父级背景为静态渐变，则无法关闭此属性（即设置为 false）。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- autoFillBackground()
+- setAutoFillBackground()
+
+
+--------------------------------
+## property baseSize : QSize
+
+此属性保存小部件的基本大小。
+
+如果小部件定义了 sizeIncrement() ，则使用基本大小来计算适当的小部件大小。
+
+默认情况下，对于新创建的小部件，此属性包含宽度和高度为零的尺寸。
+
+访问函数：
+
+- baseSize()
+- setBaseSize()
+
+
+--------------------------------
+## property childrenRect : QRect
+
+此属性保存小部件子项的边界矩形。
+
+隐藏的子项被排除在外。
+
+默认情况下，对于没有子项的小部件，此属性包含位于原点的宽度和高度为零的矩形。
+
+访问函数：
+
+- childrenRect()
+
+
+--------------------------------
+## property childrenRegion : QRegion
+
+此属性保存小部件子项所占据的组合区域。
+
+隐藏的子项被排除在外。
+
+默认情况下，对于没有子项的小部件，此属性包含一个空区域。
+
+访问函数：
+
+- childrenRegion()
+
+
+--------------------------------
+## property contextMenuPolicy : Qt.ContextMenuPolicy
+
+此属性保存小部件如何显示上下文菜单。
+
+此属性的默认值为 Qt::DefaultContextMenu，这意味着将调用 contextMenuEvent() 处理程序。其他值包括 Qt::NoContextMenu、Qt::PreventContextMenu、Qt::ActionsContextMenu 和 Qt::CustomContextMenu。使用 Qt::CustomContextMenu 时，将发出信号 customContextMenuRequested()。
+
+访问函数：
+
+- contextMenuPolicy()
+- setContextMenuPolicy()
+
+
+--------------------------------
+## property cursor : QCursor
+
+此属性保存此小部件的光标形状。
+
+当鼠标光标位于此小部件上方时，它将呈现此形状。请参阅预定义光标对象列表，了解一系列有用的形状。
+
+编辑器小部件可能使用 I 型光标：
+
+```python
+setCursor(Qt.IBeamCursor)
+```
+
+如果未设置光标，或者在调用 unsetCursor() 后，则使用父级光标。
+
+默认情况下，此属性包含具有 Qt::ArrowCursor 形状的光标。
+
+某些底层窗口实现会在光标离开窗口小部件时重置光标，即使鼠标被抓取也是如此。如果您想为所有窗口小部件设置光标，即使在窗口外，也可以考虑使用 QGuiApplication::setOverrideCursor()。
+
+访问函数：
+
+- cursor()
+- setCursor()
+- unsetCursor()
+
+
+--------------------------------
+## property enabled : bool
+
+此属性保存窗口小部件是否已启用。
+
+通常，已启用的窗口小部件会处理键盘和鼠标事件；已禁用的窗口小部件则不会。QAbstractButton 是个例外。
+
+某些窗口小部件在被禁用时会以不同的方式显示自身。例如，按钮可能会将其标签绘制为灰色。如果您的窗口小部件需要知道它何时被启用或禁用，您可以使用类型为 QEvent::EnabledChange 的 changeEvent()。
+
+禁用窗口小部件会隐式禁用其所有子窗口小部件。分别启用会启用所有子窗口小部件，除非它们已被明确禁用。当其父窗口小部件保持禁用状态时，不可能明确启用非窗口的子窗口小部件。
+
+默认情况下，此属性为 true。
+
+访问函数：
+
+- isEnabled()
+- setEnabled()
+
+
+--------------------------------
+## property focus : bool
+
+此属性保存此小部件（或其焦点代理）是否具有键盘输入焦点。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- hasFocus()
+
+
+--------------------------------
+## property focusPolicy : Qt.FocusPolicy
+
+此属性保存小部件接受键盘焦点的方式。
+
+如果小部件通过 Tab 键接受键盘焦点，则策略为 Qt::TabFocus；如果小部件通过单击接受焦点，则策略为 Qt::ClickFocus；如果小部件同时接受这两种方式，则策略为 Qt::StrongFocus；如果小部件根本不接受焦点，则策略为 Qt::NoFocus（默认值）。
+
+如果小部件处理键盘事件，则必须为其启用键盘焦点。这通常是从小部件的构造函数中完成的。例如，QLineEdit 构造函数调用 setFocusPolicy(Qt::StrongFocus)。
+
+如果小部件具有焦点代理，则焦点策略将传播给它。
+
+访问函数：
+
+- focusPolicy()
+- setFocusPolicy()
+
+
+--------------------------------
+## property font : QFont
+
+此属性保存当前为窗口小部件设置的字体。
+
+此属性描述窗口小部件请求的字体。在呈现标准组件时，窗口小部件的样式会使用该字体，并且该字体可用作确保自定义窗口小部件能够与本机平台的外观保持一致性的一种手段。不同的平台或不同的样式通常会为应用程序定义不同的字体。
+
+当您为窗口小部件分配新字体时，此字体的属性将与窗口小部件的默认字体组合以形成窗口小部件的最终字体。您可以调用 fontInfo() 来获取窗口小部件最终字体的副本。最终字体还用于初始化 QPainter 的字体。
+
+默认值取决于系统环境。QApplication 维护一个系统/主题字体，该字体用作所有窗口小部件的默认字体。某些类型的窗口小部件可能还有特殊的字体默认值。您还可以通过将自定义字体和窗口小部件的名称传递给 setFont() 来自己定义窗口小部件的默认字体。最后，将字体与 Qt 的字体数据库进行匹配，以找到最佳匹配。
+
+QWidget 将显式字体属性从父级传播到子级。如果您更改字体上的特定属性并将该字体分配给小部件，则该属性将传播到小部件的所有子级，覆盖该属性的任何系统默认值。请注意，除非启用了 Qt::WA_WindowPropagation 属性，否则默认情况下字体不会传播到窗口（请参阅 isWindow()）。
+
+QWidget 的字体传播类似于其调色板传播。
+
+当前样式用于呈现所有标准 Qt 小部件的内容，可以自由选择使用小部件字体，或者在某些情况下忽略它（部分或完全）。特别是，某些样式（如 GTK 样式、Mac 样式和 Windows Vista 样式）会对小部件字体应用特殊修改以匹配平台的本机外观。因此，将属性分配给小部件的字体并不能保证会改变小部件的外观。相反，您可以选择应用 styleSheet 。
+
+访问函数：
+
+- font()
+- setFont()
+
+
+--------------------------------
+## property frameGeometry : QRect
+
+此属性保存小部件相对于其父级（包括任何窗口框架）的几何形状。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何形状的值。
+
+访问函数：
+
+- frameGeometry()
+
+
+--------------------------------
+## property frameSize : QSize
+
+此属性保存小部件（包括任何窗口框架）的大小。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何形状的值。
+
+访问函数：
+
+- frameSize()
+
+
+--------------------------------
+## property fullScreen : bool
+
+此属性保存小部件是否以全屏模式显示。
+
+全屏模式下的小部件占据整个屏幕区域，不显示窗口装饰，例如标题栏。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isFullScreen()
+
+
+--------------------------------
+## property geometry : QRect
+
+此属性保存小部件相对于其父级（不包括窗口框架）的几何形状。
+
+更改几何形状时，小部件（如果可见）会立即接收移动事件 ( moveEvent() ) 和/或调整大小事件 ( resizeEvent() )。 如果小部件当前不可见，则保证在显示之前接收适当的事件。
+
+如果尺寸组件超出由 minimumSize() 和 maximumSize() 定义的范围，则会调整尺寸组件。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何形状的值。
+
+访问函数：
+
+- geometry()
+- setGeometry()
+
+
+--------------------------------
+## property height : int
+
+此属性保存小部件的高度（不包括任何窗口框架）。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何的值。
+
+访问函数：
+
+
+--------------------------------
+## property inputMethodHints : Combination of Qt.InputMethodHint
+
+此属性保存小部件具有哪些输入法特定提示。
+
+这仅与输入小部件相关。输入法使用它来检索有关输入法应如何操作的提示。例如，如果设置了 Qt::ImhFormattedNumbersOnly 标志，输入法可能会更改其视觉组件以反映只能输入数字。
+
+
+--------------------------------
+## The default value is Qt::ImhNone.
+
+访问函数：
+
+- inputMethodHints()
+- setInputMethodHints()
+
+
+--------------------------------
+## property isActiveWindow : bool
+
+此属性保存此小部件的窗口是否为活动窗口。
+
+活动窗口是包含具有键盘焦点的小部件的窗口（如果窗口没有小部件或其小部件均不接受键盘焦点，则窗口可能仍具有焦点）。
+
+当弹出窗口可见时，此属性对于活动窗口和弹出窗口均为 true。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isActiveWindow()
+
+
+--------------------------------
+## property layoutDirection : Qt.LayoutDirection
+
+此属性保存此小部件的布局方向。
+
+默认情况下，此属性设置为 Qt::LeftToRight。
+
+当在小部件上设置布局方向时，它将传播到小部件的子项，但不会传播到窗口子项，也不会传播到已明确调用 setLayoutDirection() 的子项。此外，在为父项调用 setLayoutDirection() 之后添加的子小部件不会继承父项的布局方向。
+
+访问函数：
+
+- layoutDirection()
+- setLayoutDirection()
+- unsetLayoutDirection()
+
+
+--------------------------------
+## property locale : QLocale
+
+此属性保存小部件的语言环境。
+
+只要未设置特殊语言环境，则此属性要么是父级语言环境，要么是默认语言环境（如果此小部件是顶级小部件）。
+
+如果小部件显示日期或数字，则应使用小部件的语言环境进行格式化。
+
+访问函数：
+
+- locale()
+- setLocale()
+- unsetLocale()
+
+
+--------------------------------
+## property maximized : bool
+
+此属性保存此小部件是否最大化。
+
+此属性仅与窗口相关。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isMaximized()
+
+
+--------------------------------
+## property maximumHeight : int
+
+此属性保存小部件的最大高度（以像素为单位）。
+
+此属性对应于 maximumSize 属性所保存的高度。
+
+默认情况下，此属性包含值 16777215。
+
+访问函数：
+
+- maximumHeight()
+- setMaximumHeight()
+
+
+--------------------------------
+## property maximumSize : QSize
+
+此属性保存小部件的最大尺寸（以像素为单位）。
+
+小部件不能调整为大于最大小部件尺寸。
+
+默认情况下，此属性包含一个宽度和高度均为 16777215 的尺寸。
+
+访问函数：
+
+- maximumSize()
+- setMaximumSize()
+
+
+--------------------------------
+## property maximumWidth : int
+
+此属性保存小部件的最大宽度（以像素为单位）。
+
+此属性对应于 maximumSize 属性所保存的宽度。
+
+默认情况下，此属性包含值 16777215。
+
+访问函数：
+
+- maximumWidth()
+- setMaximumWidth()
+
+
+--------------------------------
+## property minimized : bool
+
+此属性保存此小部件是否最小化（图标化）。
+
+此属性仅适用于窗口。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isMinimized()
+
+
+--------------------------------
+## property minimumHeight : int
+
+此属性保存小部件的最小高度（以像素为单位）。
+
+此属性对应于 minimumSize 属性所保存的高度。
+
+默认情况下，此属性的值为 0。
+
+访问函数：
+
+- minimumHeight()
+- setMinimumHeight()
+
+
+--------------------------------
+## property minimumSize : QSize
+
+此属性保存小部件的最小尺寸。
+
+小部件不能调整为小于最小小部件尺寸。 如果当前尺寸小于最小小部件尺寸，则小部件的尺寸将强制为最小尺寸。
+
+此函数设置的最小尺寸将覆盖 QLayout 定义的最小尺寸。 要取消设置最小尺寸，请使用 QSize(0, 0) 值。
+
+默认情况下，此属性包含宽度和高度为零的尺寸。
+
+访问函数：
+
+- minimumSize()
+- setMinimumSize()
+
+
+--------------------------------
+## property minimumSizeHint : QSize
+
+此属性保存小部件的建议最小尺寸。
+
+如果此属性的值为无效尺寸，则不建议使用最小尺寸。
+
+如果此小部件没有布局，则 minimumSizeHint() 的默认实现将返回无效尺寸，否则将返回布局的最小尺寸。 大多数内置小部件都会重新实现 minimumSizeHint()。
+
+除非设置了 minimumSize() 或将尺寸策略设置为 QSizePolicy::Ignore，否则 QLayout 永远不会将小部件调整为小于最小尺寸提示的尺寸。 如果设置了 minimumSize()，则将忽略最小尺寸提示。
+
+访问函数：
+
+- minimumSizeHint()
+
+
+--------------------------------
+## property minimumWidth : int
+
+此属性保存小部件的最小宽度（以像素为单位）。
+
+此属性对应于 minimumSize 属性所保存的宽度。
+
+默认情况下，此属性的值为 0。
+
+访问函数：
+
+- minimumWidth()
+- setMinimumWidth()
+
+
+--------------------------------
+## property modal : bool
+
+此属性保存小部件是否为模态小部件。
+
+此属性仅适用于窗口。模态小部件会阻止所有其他窗口中的小部件获取任何输入。
+
+默认情况下，此属性为 false。
+
+访问函数：
+
+- isModal()
+
+
+--------------------------------
+## property mouseTracking : bool
+
+此属性保存是否为小部件启用鼠标跟踪。
+
+如果禁用鼠标跟踪（默认），则小部件仅在鼠标移动期间按下至少一个鼠标按钮时接收鼠标移动事件。
+
+如果启用鼠标跟踪，则即使未按下任何按钮，小部件也会接收鼠标移动事件。
+
+访问函数：
+
+- hasMouseTracking()
+- setMouseTracking()
+
+
+--------------------------------
+## property normalGeometry : QRect
+
+此属性保存小部件的几何形状，当其显示为正常（非最大化或全屏）顶层小部件时，它将出现。
+
+如果小部件已处于此状态，则正常几何形状将反映小部件的当前 geometry() 。
+
+对于子小部件，此属性始终保存一个空矩形。
+
+默认情况下，此属性包含一个空矩形。
+
+访问函数：
+
+- normalGeometry()
+
+
+--------------------------------
+## property palette : QPalette
+
+此属性保存小部件的调色板。
+
+此属性描述小部件的调色板。调色板由小部件的样式在呈现标准组件时使用，并可用作确保自定义小部件能够与本机平台的外观保持一致性的一种手段。不同的平台或不同的样式通常具有不同的调色板。
+
+当您为小部件分配新调色板时，此调色板中的颜色角色将与小部件的默认调色板组合以形成小部件的最终调色板。小部件背景角色的调色板条目用于填充小部件的背景（请参阅 autoFillBackground ），而前台角色初始化 QPainter 的画笔。
+
+默认值取决于系统环境。QApplication 维护一个系统/主题调色板，作为所有小部件的默认值。某些类型的小部件可能还有特殊的调色板默认值（例如，在 Windows Vista 上，从 QMenuBar 派生的所有类都有一个特殊的默认调色板）。您还可以通过将自定义调色板和小部件的名称传递给 setPalette() 来自己定义小部件的默认调色板。最后，样式始终可以选择在分配调色板时对其进行润色（请参阅 polish()）。
+
+QWidget 将显式调色板角色从父级传播到子级。如果您将画笔或颜色分配给调色板上的特定角色，并将该调色板分配给小部件，则该角色将传播到小部件的所有子级，覆盖该角色的任何系统默认值。请注意，除非启用了 Qt::WA_WindowPropagation 属性，否则调色板默认情况下不会传播到窗口（请参阅 isWindow()）。
+
+QWidget 的调色板传播与其字体传播类似。
+
+当前样式用于呈现所有标准 Qt 小部件的内容，可以自由选择小部件调色板中的颜色和画笔，或者在某些情况下忽略调色板（部分或完全）。具体来说，某些样式（如 GTK 样式、Mac 样式和 Windows Vista 样式）依赖于第三方 API 来呈现小部件的内容，而这些样式通常不遵循调色板。因此，将角色分配给小部件的调色板并不能保证改变小部件的外观。相反，您可以选择应用 styleSheet 。
+
+访问函数：
+
+- palette()
+- setPalette()
+
+
+--------------------------------
+## property pos : QPoint
+
+此属性保存小部件在其父小部件中的位置。
+
+如果小部件是窗口，则位置是小部件在桌面上的位置，包括其框架。
+
+更改位置时，如果小部件可见，则立即接收移动事件 ( moveEvent() )。 如果小部件当前不可见，则保证在显示之前收到事件。
+
+默认情况下，此属性包含引用原点的位置。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+访问函数：
+
+- pos()
+- move()
+
+
+--------------------------------
+## property rect : QRect
+
+此属性保存小部件的内部几何形状（不包括任何窗口框架）。
+
+rect 属性等于 QRect(0, 0, width() , height() )。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何形状的值。
+
+访问函数：
+
+- rect()
+
+
+--------------------------------
+## property size : QSize
+
+此属性保存小部件的尺寸（不包括任何窗口框架）。
+
+如果小部件在调整大小时可见，它会立即收到调整大小事件 ( resizeEvent() )。 如果小部件当前不可见，则保证在显示之前收到事件。
+
+如果尺寸超出由 minimumSize() 和 maximumSize() 定义的范围，则会调整尺寸。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何形状的值。
+
+访问函数：
+
+- size()
+- resize()
+
+
+--------------------------------
+## property sizeHint : QSize
+
+此属性保存小部件的推荐尺寸。
+
+如果此属性的值为无效尺寸，则不推荐任何尺寸。
+
+如果此小部件没有布局，sizeHint() 的默认实现将返回无效尺寸，否则将返回布局的首选尺寸。
+
+访问函数：
+
+- sizeHint()
+
+
+--------------------------------
+## property sizeIncrement : QSize
+
+此属性保存小部件的尺寸增量。
+
+当用户调整窗口大小时，尺寸将以 sizeIncrement(). width() 像素为水平方向移动，sizeIncrement. height() 像素为垂直方向移动，以 baseSize() 为基础。首选的小部件尺寸为非负整数 i 和 j：
+
+width = baseSize().width() + i * sizeIncrement().width()
+height = baseSize().height() + j * sizeIncrement().height()
+请注意，虽然您可以为所有小部件设置尺寸增量，但它仅影响窗口。
+
+默认情况下，此属性包含宽度和高度为零的尺寸。
+
+访问函数：
+
+- sizeIncrement()
+- setSizeIncrement()
+
+
+--------------------------------
+## property sizePolicy : QSizePolicy
+
+此属性保存窗口小部件的默认布局行为。
+
+如果存在管理此窗口小部件的子项的 QLayout ，则使用该布局指定的大小策略。如果没有这样的 QLayout ，则使用此函数的结果。
+
+默认策略是 Preferred/Preferred，这意味着窗口小部件可以自由调整大小，但最好是 sizeHint() 返回的大小。按钮类窗口小部件设置大小策略以指定它们可以水平拉伸，但垂直固定。这同样适用于行编辑控件（例如 QLineEdit 、 QSpinBox 或可编辑的 QComboBox ）和其他水平方向的窗口小部件（例如 QProgressBar ）。 QToolButton 通常是正方形的，因此它们允许在两个方向上增长。支持不同方向的窗口小部件（例如 QSlider 、 QScrollBar 或 QHeader）仅指定在相应方向上拉伸。可以提供滚动条的小部件（通常是 QScrollArea 的子类）倾向于指定它们可以使用额外的空间，并且它们可以使用小于 sizeHint() 的空间。
+
+访问函数：
+
+- sizePolicy()
+- setSizePolicy()
+
+
+--------------------------------
+## property statusTip : str
+
+此属性保存小部件的状态提示。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- statusTip()
+- setStatusTip()
+
+
+--------------------------------
+## property styleSheet : str
+
+此属性保存小部件的样式表。
+
+样式表包含对小部件样式的自定义的文本描述，如 Qt 样式表文档中所述。
+
+自 Qt 4.5 起，Qt 样式表完全支持 macOS。
+
+访问函数：
+
+- styleSheet()
+- setStyleSheet()
+
+
+--------------------------------
+## property tabletTracking : bool
+
+此属性用于保存小部件是否启用平板电脑跟踪。
+
+如果禁用平板电脑跟踪（默认），则小部件仅在触控笔与平板电脑接触时接收平板电脑移动事件，或者在触控笔移动时按下至少一个触控笔按钮。
+
+如果启用平板电脑跟踪，则小部件即使在附近悬停时也会接收平板电脑移动事件。这对于监控位置以及辅助属性（例如旋转和倾斜）以及在 UI 中提供反馈非常有用。
+
+访问函数：
+
+- hasTabletTracking()
+- setTabletTracking()
+
+
+--------------------------------
+## property toolTip : str
+
+此属性保存小部件的工具提示。
+
+请注意，默认情况下，工具提示仅显示活动窗口的子窗口小部件。您可以通过在窗口上设置属性 Qt::WA_AlwaysShowToolTips 来更改此行为，而不是在带有工具提示的小部件上设置。
+
+如果您想控制工具提示的行为，您可以拦截 event() 函数并捕获 QEvent::ToolTip 事件（例如，如果您想自定义应显示工具提示的区域）。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- toolTip()
+- setToolTip()
+
+
+--------------------------------
+## property toolTipDuration : int
+
+此属性保存小部件的工具提示持续时间。
+
+指定工具提示的显示时间（以毫秒为单位）。如果值为 -1（默认值），则持续时间将根据工具提示的长度计算。
+
+访问函数：
+
+- toolTipDuration()
+- setToolTipDuration()
+
+
+--------------------------------
+## property updatesEnabled : bool
+
+此属性保存是否启用更新。
+
+启用更新的小部件接收绘制事件并具有系统背景；禁用的小部件则没有。这也意味着如果禁用更新，则调用 update() 和 repaint() 无效。
+
+默认情况下，此属性为 true。
+
+setUpdatesEnabled() 通常用于短时间禁用更新，例如避免在发生较大变化时屏幕闪烁。在 Qt 中，小部件通常不会产生屏幕闪烁，但在 X11 上，当小部件被隐藏时，服务器可能会擦除屏幕上的区域，然后才能用其他小部件替换它们。禁用更新可以解决这个问题。
+
+示例：
+
+```bash
+setUpdatesEnabled(False)
+bigVisualChanges()
+setUpdatesEnabled(True)
+```
+
+禁用小部件会隐式禁用其所有子部件。启用小部件会启用除顶级小部件或已明确禁用的小部件之外的所有子部件。重新启用更新会隐式调用小部件上的 update()。
+
+访问函数：
+
+- updatesEnabled()
+- setUpdatesEnabled()
+
+
+--------------------------------
+## property visible : bool
+
+此属性保存小部件是否可见。
+
+如果小部件的所有父小部件（直至窗口）都可见，则调用 setVisible(true) 或 show() 会将小部件设置为可见状态。如果祖先不可见，则小部件将在其所有祖先都显示之前变为可见。如果其大小或位置已更改，Qt 会保证小部件在显示之前获得移动和调整大小事件。如果小部件尚未调整大小，Qt 将使用 adjustSize() 将小部件的大小调整为有用的默认值。
+
+调用 setVisible(false) 或 hide() 会明确隐藏小部件。明确隐藏的小部件永远不会变为可见，即使其所有祖先都变为可见，除非您显示它。
+
+当小部件的可见性状态发生变化时，它会接收显示和隐藏事件。在隐藏和显示事件之间，无需浪费 CPU 周期来准备或向用户显示信息。例如，视频应用程序可能只是停止生成新帧。
+
+恰巧被屏幕上的其他窗口遮挡的小部件被视为可见。这同样适用于图标化窗口和存在于另一个虚拟桌面上的窗口（在支持此概念的平台上）。当窗口系统更改窗口小部件的映射状态时，窗口小部件会收到自发显示和隐藏事件，例如，当用户最小化窗口时会收到自发隐藏事件，而当窗口再次恢复时会收到自发显示事件。
+
+您很少需要重新实现 setVisible() 函数。如果您需要在显示窗口小部件之前更改某些设置，请改用 showEvent()。如果您需要进行一些延迟初始化，请使用传递给 event() 函数的 Polish 事件。
+
+访问函数：
+
+- isVisible()
+- setVisible()
+
+
+--------------------------------
+## property whatsThis : str
+
+此属性保存小部件的“这是什么”帮助文本。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- whatsThis()
+- setWhatsThis()
+
+
+--------------------------------
+## property width : int
+
+此属性保存小部件的宽度（不包括任何窗口框架）。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性包含一个取决于用户平台和屏幕几何的值。
+
+访问函数：
+
+
+--------------------------------
+## property windowFilePath : str
+
+此属性保存与小部件关联的文件路径。
+
+此属性仅对窗口有意义。它将文件路径与窗口关联。如果您设置了文件路径，但未设置窗口标题，Qt 会将窗口标题设置为使用 QFileInfo::fileName() 获得的指定路径的文件名。
+
+如果在任何时候设置了窗口标题，则窗口标题优先，并将显示而不是文件路径字符串。
+
+此外，在 macOS 上，这还有一个额外的好处，即它为窗口设置代理图标，假设文件路径存在。
+
+如果未设置文件路径，则此属性包含一个空字符串。
+
+默认情况下，此属性包含一个空字符串。
+
+访问函数：
+
+- windowFilePath()
+- setWindowFilePath()
+
+
+--------------------------------
+## property windowIcon : QIcon
+
+此属性保存小部件的图标。
+
+此属性仅对窗口有意义。如果未设置图标，window Icon() 将返回应用程序图标 (QApplication::window Icon())。
+
+访问函数：
+
+- windowIcon()
+- setWindowIcon()
+- Signal windowIconChanged()
+
+
+--------------------------------
+## property windowIconText : str
+
+此属性保存要显示在最小化窗口图标上的文本。
+
+此属性仅对窗口有意义。如果未设置图标文本，此访问器将返回一个空字符串。它仅在 X11 平台上实现，并且只有某些窗口管理器使用此窗口属性。
+
+此属性已弃用。
+
+访问函数：
+
+- windowIconText()
+- setWindowIconText()
+- Signal windowIconTextChanged()
+
+
+--------------------------------
+## property windowModality : Qt.WindowModality
+
+此属性保存哪些窗口被模式窗口小部件阻挡。
+
+此属性仅对窗口有意义。模式窗口小部件阻止其他窗口中的窗口小部件获取输入。此属性的值控制当窗口小部件可见时哪些窗口被阻挡。在窗口可见时更改此属性无效；您必须先隐藏（）窗口小部件，然后再次显示（）。
+
+默认情况下，此属性为 Qt::NonModal。
+
+访问函数：
+
+- windowModality()
+- setWindowModality()
+
+
+--------------------------------
+## property windowModified : bool
+
+此属性保存窗口中显示的文档是否有未保存的更改。
+
+已修改窗口是指内容已更改但尚未保存到磁盘的窗口。此标志将根据平台的不同产生不同的效果。在 macOS 上，关闭按钮将具有已修改的外观；在其他平台上，窗口标题将带有“*”（星号）。
+
+窗口标题必须包含“[*]”占位符，表示“*”应出现的位置。通常，它应出现在文件名之后（例如，“document1.txt[*] - 文本编辑器”）。如果窗口未修改，则仅删除占位符。
+
+请注意，如果将小部件设置为已修改，则其所有祖先也将被设置为已修改。但是，如果您在小部件上调用 setWindowModified(false)，则这不会传播到其父级，因为父级的其他子级可能已被修改。
+
+访问函数：
+
+- isWindowModified()
+- setWindowModified()
+
+
+--------------------------------
+## property windowOpacity : float
+
+此属性保存窗口的不透明度级别。
+
+不透明度的有效范围是从 1.0（完全不透明）到 0.0（完全透明）。
+
+默认情况下，此属性的值为 1.0。
+
+此功能在支持 Composite 扩展的嵌入式 Linux、macOS、Windows 和 X11 平台上可用。
+
+访问函数：
+
+- windowOpacity()
+- setWindowOpacity()
+
+
+--------------------------------
+## property windowTitle : str
+
+此属性保存窗口标题 (caption)。
+
+此属性仅对顶级小部件（如窗口和对话框）有意义。如果未设置标题，则标题基于 windowFilePath 。如果两者都未设置，则标题为空字符串。
+
+如果您使用 windowModified 机制，则窗口标题必须包含“[*]”占位符，指示“*”应出现的位置。通常，它应出现在文件名之后（例如，“document1.txt[*] - 文本编辑器”）。如果 windowModified 属性为 false（默认值），则将删除占位符。
+
+在某些桌面平台（包括 Windows 和 Unix）上，如果设置了应用程序名称（来自 QGuiApplication::applicationDisplayName），则会将其添加到窗口标题的末尾。这是由 QPA 插件完成的，因此它会显示给用户，但不是 windowTitle 字符串的一部分。
+
+访问函数：
+
+- windowTitle()
+- setWindowTitle()
+- Signal windowTitleChanged()
+
+
+--------------------------------
+## property x : int
+
+此属性保存小部件相对于其父级（包括任何窗口框架）的 x 坐标。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性的值为 0。
+
+访问函数：
+
+- x()
+
+
+--------------------------------
+## property y : int
+
+此属性保存小部件相对于其父级（包括任何窗口框架）的 y 坐标。
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+默认情况下，此属性的值为 0。
+
+访问函数：
+
+- y()
+
+
+--------------------------------
+## __init__([parent=None[, f=Qt.WindowFlags()]])
+
+参数：
+
+- parent – QWidget
+- f – Combination of WindowType
+
+构造一个窗口小部件，它是父窗口小部件的子窗口小部件，窗口小部件标志设置为 f。
+
+如果父窗口小部件为 None，则新窗口小部件将变成一个窗口。 如果父窗口小部件是另一个窗口小部件，则此窗口小部件将变成父窗口小部件内的子窗口。 当父窗口小部件被删除时，新窗口小部件也会被删除。
+
+窗口小部件标志参数 f 通常为 0，但可以将其设置为自定义窗口的框架（即父窗口小部件必须为 None）。 要自定义框架，请使用由任何窗口标志的按位或组成的值。
+
+如果将子窗口小部件添加到已经可见的窗口小部件，则必须明确显示子窗口小部件以使其可见。
+
+请注意，Qt 的 X11 版本可能无法在所有系统上提供所有样式标志组合。 这是因为在 X11 上，Qt 只能询问窗口管理器，而窗口管理器可以覆盖应用程序的设置。 在 Windows 上，Qt 可以设置您想要的任何标志。
+
+
+--------------------------------
+## acceptDrops()
+
+返回类型：bool
+
+属性 acceptDrops 的获取器。
+
+
+--------------------------------
+## accessibleDescription()
+
+返回类型：str
+
+属性 accessibleDescription 的获取器。
+
+
+--------------------------------
+## accessibleName()
+
+返回类型：str
+
+属性 accessibleName 的获取器。
+
+
+--------------------------------
+## actionEvent(event)
+
+参数：
+
+- event – QActionEvent
+
+每当小部件的操作发生变化时，就会使用给定的事件调用此事件处理程序。
+
+
+--------------------------------
+## actions()
+
+返回类型：list of QAction
+
+返回此小部件的操作列表（可能为空）。
+
+
+--------------------------------
+## activateWindow()
+
+将包含此小部件的顶级小部件设置为活动窗口。
+
+活动窗口是具有键盘输入焦点的可见顶级窗口。
+
+此函数执行的操作与在顶级窗口的标题栏上单击鼠标相同。在 X11 上，结果取决于窗口管理器。如果您想确保窗口也堆叠在顶部，您还应该调用 raise() 。请注意，窗口必须可见，否则 activateWindow() 无效。
+
+在 Windows 上，如果您在应用程序当前不是活动应用程序时调用此函数，则不会使其成为活动窗口。它将更改任务栏条目的颜色以指示窗口已发生某种变化。这是因为 Microsoft 不允许应用程序中断用户当前在另一个应用程序中执行的操作。
+
+
+--------------------------------
+## addAction(icon, text, receiver, member[, type=Qt.AutoConnection])
+
+参数：
+
+- icon – QIcon
+- text – str
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text, receiver, member[, type=Qt.AutoConnection])
+
+参数：
+
+- text – str
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text, shortcut, receiver, member[, type=Qt.AutoConnection])
+
+参数：
+
+- text – str
+- shortcut – QKeySequence
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text, shortcut)
+
+参数：
+
+- text – str
+- shortcut – QKeySequence
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text)
+
+参数：
+
+- text – str
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut, receiver, member[, type=Qt.AutoConnection])
+
+参数：
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+- receiver – QObject
+- member – str
+- type – ConnectionType
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut)
+
+参数：
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(icon, text)
+
+参数：
+
+- icon – QIcon
+- text – str
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text, shortcut, callable)
+
+参数：
+
+- text – str
+- shortcut – QKeySequence
+- callable – object
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(text, callable)
+
+参数：
+
+- text – str
+- callable – object
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(icon, text, shortcut, callable)
+
+参数：
+
+- icon – QIcon
+- text – str
+- shortcut – QKeySequence
+- callable – object
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(icon, text, callable)
+
+参数：
+
+- icon – QIcon
+- text – str
+- callable – object
+
+返回类型：QAction
+
+
+--------------------------------
+## addAction(action)
+
+参数：
+
+- action – QAction
+
+将操作 action 附加到此小部件的操作列表中。
+
+所有 QWidget 都有一个 QActions 列表。但是，它们可以以多种不同的方式以图形方式表示。QAction 列表（由actions()返回）的默认用途是创建上下文 QMenu。
+
+QWidget 应该只具有每个操作中的一个，并且添加它已经具有的操作不会导致相同的操作在小部件中出现两次。
+
+操作的所有权不会转移到此 QWidget。
+
+
+--------------------------------
+## addActions(actions)
+
+参数：
+
+- actions – list of QAction
+
+将操作附加到此小部件的操作列表中。
+
+
+--------------------------------
+## adjustSize()
+
+调整小部件的大小以适合其内容。
+
+如果有效，即大小提示的宽度和高度 >= 0，则此函数使用 sizeHint()。否则，它将大小设置为覆盖所有子小部件的子矩形（所有子小部件矩形的并集）。
+
+对于窗口，还会考虑屏幕尺寸。如果 sizeHint() 小于 (200, 100) 且尺寸策略为扩展，则窗口将至少为 (200, 100)。窗口的最大尺寸是屏幕宽度和高度的 2/3。
+
+
+--------------------------------
+## autoFillBackground()
+
+返回类型：bool
+
+属性 autoFillBackground 的获取器。
+
+
+--------------------------------
+## backgroundRole()
+
+返回类型：ColorRole
+
+返回小部件的背景角色。
+
+背景角色定义小部件调色板中用于渲染背景的画笔。
+
+如果未设置明确的背景角色，则小部件将继承其父小部件的背景角色。
+
+
+--------------------------------
+## backingStore()
+
+返回类型：QBackingStore
+
+返回此小部件将被绘制到的 QBackingStore。
+
+
+--------------------------------
+## baseSize()
+
+返回类型：QSize
+
+属性 baseSize 的获取器。
+
+
+--------------------------------
+## changeEvent(event)
+
+参数：
+
+- event – QEvent
+
+可以重新实现此事件处理程序来处理状态更改。
+
+可以通过提供的事件检索此事件中更改的状态。
+
+变更事件包括：QEvent::ToolBarChange, QEvent::ActivationChange, QEvent::EnabledChange, QEvent::FontChange, QEvent::StyleChange, QEvent::PaletteChange, QEvent::WindowTitleChange, QEvent::IconTextChange, QEvent::ModifiedChange, QEvent::MouseTrackingChange, QEvent::ParentChange, QEvent::WindowStateChange, QEvent::LanguageChange, QEvent::LocaleChange, QEvent::LayoutDirectionChange, QEvent::ReadOnlyChange.
+
+
+--------------------------------
+## childAt(p)
+
+参数：
+
+- p – QPoint
+
+返回类型：QWidget
+
+这是一个重载函数。
+
+返回小部件自身坐标系中点 p 处的可见子小部件。
+
+
+--------------------------------
+## childAt(x, y)
+
+参数：
+
+- x – int
+- y – int
+
+返回类型：QWidget
+
+返回窗口小部件坐标系中位置 (x, y) 处的可见子窗口小部件。如果指定位置处没有可见子窗口小部件，则该函数返回 None。
+
+
+--------------------------------
+## childrenRect()
+
+返回类型：QRect
+
+属性 childrenRect 的获取器。
+
+
+--------------------------------
+## childrenRegion()
+
+返回类型：QRegion
+
+属性 childrenRegion 的获取方法。
+
+
+--------------------------------
+## clearFocus()
+
+从小部件获取键盘输入焦点。
+
+如果小部件具有活动焦点，则会向此小部件发送焦点消失事件，以告知它已失去焦点。
+
+此小部件必须启用焦点设置才能获取键盘输入焦点；也就是说，它必须调用 setFocusPolicy() 。
+
+
+--------------------------------
+## clearMask()
+
+删除由 setMask() 设置的所有掩码。
+
+
+--------------------------------
+## close()
+
+返回类型：bool
+
+关闭此小部件。如果小部件已关闭，则返回 true；否则返回 false。
+
+首先，它向小部件发送 QCloseEvent。如果小部件接受关闭事件，则隐藏小部件。如果忽略该事件，则不会发生任何事情。closeEvent() 的默认实现接受关闭事件。
+
+如果小部件具有 Qt::WA_DeleteOnClose 标志，则小部件也会被删除。无论小部件是否可见，都会向小部件传递关闭事件。
+
+当设置了 Qt::WA_QuitOnClose 属性的最后一个可见主窗口（即没有父窗口的窗口）关闭时，会发出 QGuiApplication::lastWindowClosed() 信号。默认情况下，此属性适用于除启动画面、工具窗口和弹出菜单等临时窗口之外的所有小部件。
+
+
+--------------------------------
+## closeEvent(event)
+
+参数：
+
+- event – QCloseEvent
+
+当 Qt 从窗口系统收到针对顶级窗口小部件的窗口关闭请求时，将使用给定事件调用此事件处理程序。
+
+默认情况下，事件被接受并且窗口小部件被关闭。您可以重新实现此函数以更改窗口小部件响应窗口关闭请求的方式。例如，您可以通过在所有事件上调用 ignore() 来阻止窗口关闭。
+
+主窗口应用程序通常使用此函数的重新实现来检查用户的工作是否已保存并在关闭前请求权限。
+
+
+--------------------------------
+## contentsMargins()
+
+返回类型：QMargins
+
+contentMargins 函数返回小部件的内容边距。
+
+
+--------------------------------
+## contentsRect()
+
+返回类型：QRect
+
+返回小部件边缘内的区域。
+
+
+--------------------------------
+## contextMenuEvent(event)
+
+参数：
+
+- event – QContextMenuEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件上下文菜单事件。
+
+当小部件的 contextMenuPolicy 为 Qt::DefaultContextMenu 时，将调用此处理程序。
+
+默认实现会忽略上下文事件。有关更多详细信息，请参阅 QContextMenuEvent 文档。
+
+
+--------------------------------
+## contextMenuPolicy()
+
+返回类型：ContextMenuPolicy
+
+属性 contextMenuPolicy 的获取器。
+
+
+--------------------------------
+## create([arg__1=0[, initializeWindow=true[, destroyOldWindow=true]]])
+
+参数：
+
+- arg__1 – WId
+- initializeWindow – bool
+- destroyOldWindow – bool
+
+创建一个新的小部件窗口。
+
+Qt 5 中忽略了参数 window、initializeWindow 和 destroyOldWindow。请使用 QWindow::fromWinId() 创建包装外部窗口的 QWindow，并将其传递给 createWindowContainer()。
+
+
+--------------------------------
+## createWinId()
+## static createWindowContainer(window[, parent=None[, flags=Qt.WindowFlags()]])
+
+参数：
+
+- window – QWindow
+- parent – QWidget
+- flags – Combination of WindowType
+
+返回类型：QWidget
+
+创建一个 QWidget，使窗口能够嵌入到基于 QWidget 的应用程序中。
+
+窗口容器是作为父级的子级创建的，并带有窗口标志 flags。
+
+一旦窗口嵌入到容器中，容器将控制窗口的几何形状和可见性。不建议在嵌入窗口上显式调用 QWindow::setGeometry()、QWindow::show() 或 QWindow::hide()。
+
+容器接管窗口的所有权。可以通过调用 QWindow::setParent() 从窗口容器中移除窗口。
+
+窗口容器作为本机子窗口附加到其所属的顶层窗口。当窗口容器用作 QAbstractScrollArea 或 QMdiArea 的子级时，它将为其父链中的每个小部件创建一个本机窗口，以便在这种用例中正确堆叠和裁剪。为窗口容器创建本机窗口还可以正确堆叠和裁剪。这必须在显示窗口容器之前完成。具有许多本机子窗口的应用程序可能会出现性能问题。
+
+窗口容器有许多已知的限制：
+
+堆叠顺序；嵌入窗口将作为不透明框堆叠在小部件层次结构的顶部。多个重叠窗口容器实例的堆叠顺序未定义。
+
+渲染集成；窗口容器不与 QGraphicsProxyWidget、render() 或类似功能互操作。
+
+焦点处理；可以让窗口容器实例具有任何焦点策略，它将通过调用 QWindow::requestActivate() 将焦点委托给窗口。但是，从 QWindow 实例返回正常焦点链将取决于 QWindow 实例实现本身。例如，当进入具有选项卡焦点的基于 Qt Quick 的窗口时，很可能进一步的选项卡按下只会在 QML 应用程序内循环。此外，QWindow::requestActivate() 是否真正给予窗口焦点取决于平台。
+
+在基于 QWidget 的应用程序中，使用许多窗口容器实例会极大地损害应用程序的整体性能。
+
+自 6.7 起，如果窗口属于某个小部件（即，窗口是从调用 windowHandle() 接收的），则不会创建容器。相反，此函数将在重新设置为父级后返回小部件本身。由于不会创建容器，因此将忽略标志。换句话说，如果窗口属于某个小部件，请考虑直接将该小部件重新设置为父级，而不是使用此函数。
+
+
+--------------------------------
+## cursor()
+
+返回类型：QCursor
+
+Getter of property cursor  .
+
+
+--------------------------------
+## customContextMenuRequested(pos)
+
+参数：
+
+- pos – QPoint
+
+当窗口小部件的 contextMenuPolicy 为 Qt::CustomContextMenu 且用户已请求窗口小部件上的上下文菜单时，会发出此信号。位置 pos 是窗口小部件接收的上下文菜单事件的位置。通常，这是在窗口小部件坐标中。此规则的例外是 QAbstractScrollArea 及其子类，它们将上下文菜单事件映射到 viewport() 的坐标。
+
+
+--------------------------------
+## destroy([destroyWindow=true[, destroySubWindows=true]])
+
+参数：
+
+- destroyWindow – bool
+- destroySubWindows – bool
+
+释放窗口系统资源。如果 destroyWindow 为真，则销毁窗口小部件窗口。
+
+destroy() 对所有子窗口小部件递归调用自身，并将 destroySubWindows 传递给 destroyWindow 参数。为了更好地控制子窗口小部件的销毁，请先有选择地销毁子窗口小部件。
+
+此函数通常从 QWidget 析构函数调用。
+
+
+--------------------------------
+## dragEnterEvent(event)
+
+参数：
+
+- event – QDragEnterEvent
+
+当拖动正在进行且鼠标进入此小部件时，将调用此事件处理程序。事件在事件参数中传递。
+
+如果忽略该事件，小部件将不会收到任何拖动移动事件。
+
+请参阅拖放文档，了解如何在应用程序中提供拖放功能的概述。
+
+
+--------------------------------
+## dragLeaveEvent(event)
+
+参数：
+
+- event – QDragLeaveEvent
+
+当拖动正在进行且鼠标离开此小部件时，将调用此事件处理程序。事件在事件参数中传递。
+
+请参阅拖放文档，了解如何在应用程序中提供拖放功能的概述。
+
+
+--------------------------------
+## dragMoveEvent(event)
+
+参数：
+
+- event – QDragMoveEvent
+
+如果正在进行拖放，并且发生以下任一情况，则将调用此事件处理程序：光标进入此小部件、光标在此小部件内移动，或者当此小部件具有焦点时按下键盘上的修饰键。事件在事件参数中传递。
+
+请参阅拖放文档，了解如何在应用程序中提供拖放功能的概述。
+
+
+--------------------------------
+## dropEvent(event)
+
+参数：
+
+- event – QDropEvent
+
+当拖动到此小部件上时，将调用此事件处理程序。事件在事件参数中传递。
+
+请参阅拖放文档，了解如何在应用程序中提供拖放功能的概述。
+
+
+--------------------------------
+## effectiveWinId()
+
+返回类型：WId
+
+返回小部件的有效窗口系统标识符，即原生父窗口系统标识符。
+
+如果小部件是原生的，则此函数返回原生小部件 ID。否则，将返回第一个原生父小部件（即包含此小部件的顶级小部件）的窗口 ID。
+
+
+--------------------------------
+## ensurePolished()
+
+确保小部件及其子项已由 QStyle 润色（即具有适当的字体和调色板）。
+
+QWidget 在小部件完全构建之后但在第一次显示之前调用此函数。如果您想确保在执行操作之前小部件已润色，则可以调用此函数，例如，在小部件的 sizeHint() 重新实现中可能需要正确的字体大小。请注意，此函数是从 sizeHint() 的默认实现中调用的。
+
+润色对于最终初始化很有用，必须在调用所有构造函数（来自基类以及子类）之后进行。
+
+如果您需要在小部件润色时更改某些设置，请重新实现 event() 并处理 QEvent::Polish 事件类型。
+
+
+--------------------------------
+## enterEvent(event)
+
+参数：
+
+- event – QEnterEvent
+
+可以在子类中重新实现此事件处理程序，以接收在事件参数中传递的小部件进入事件。
+
+当鼠标光标进入小部件时，会向小部件发送事件。
+
+
+--------------------------------
+## static find(arg__1)
+
+参数：
+
+- arg__1 – WId
+
+返回类型：QWidget
+
+返回指向具有窗口标识符/句柄 ID 的小部件的指针。
+
+窗口标识符类型取决于底层窗口系统，请参阅 qwindowdefs.h 了解实际定义。如果没有具有此标识符的小部件，则返回 None。
+
+
+--------------------------------
+## focusInEvent(event)
+
+参数：
+
+- event – QFocusEvent
+
+此事件处理程序可以在子类中重新实现，以接收小部件的键盘焦点事件（焦点已接收）。事件在事件参数中传递
+
+小部件通常必须将FocusPolicy() 设置为 Qt::NoFocus 以外的其他内容才能接收焦点事件。（请注意，应用程序程序员可以在任何小部件上调用 setFocus()，即使是那些通常不接受焦点的小部件。）
+
+默认实现会更新小部件（未指定 focusPolicy() 的窗口除外）。
+
+
+--------------------------------
+## focusNextChild()
+
+返回类型：bool
+
+查找一个新的窗口小部件，将键盘焦点赋予该窗口小部件（适合 Tab），如果可以找到新的窗口小部件，则返回 true，如果找不到，则返回 false。
+
+
+--------------------------------
+## focusNextPrevChild(next)
+
+参数：
+
+- next – bool
+
+返回类型：bool
+
+查找一个新的控件，将键盘焦点赋予该控件，以适应 Tab 和 Shift+Tab，如果可以找到新的控件，则返回 true，如果找不到，则返回 false。
+
+如果 next 为 true，则此函数向前搜索，如果 next 为 false，则向后搜索。
+
+有时，您需要重新实现此函数。例如，Web 浏览器可能会重新实现它以将其“当前活动链接”向前或向后移动，并且仅当到达“页面”上的最后一个或第一个链接时才调用 focusNextPrevChild()。
+
+子控件在其父控件上调用 focusNextPrevChild()，但只有包含子控件的窗口才能决定将焦点重定向到何处。通过为对象重新实现此函数，您可以控制所有子控件的焦点遍历。
+
+
+--------------------------------
+## focusOutEvent(event)
+
+参数：
+
+- event – QFocusEvent
+
+此事件处理程序可以在子类中重新实现，以接收小部件的键盘焦点事件（焦点丢失）。事件在事件参数中传递。
+
+小部件通常必须将FocusPolicy() 设置为 Qt::NoFocus 以外的其他内容才能接收焦点事件。（请注意，应用程序程序员可以对任何小部件调用 setFocus()，即使是那些通常不接受焦点的小部件。）
+
+默认实现会更新小部件（未指定 focusPolicy() 的窗口除外）。
+
+
+--------------------------------
+## focusPolicy()
+
+返回类型：FocusPolicy
+
+属性 focusPolicy 的获取器。
+
+
+--------------------------------
+## focusPreviousChild()
+
+返回类型：bool
+
+找到一个新的窗口小部件来赋予键盘焦点，适合 Shift+Tab，如果可以找到新的窗口小部件则返回 true，如果找不到则返回 false。
+
+
+--------------------------------
+## focusProxy()
+
+返回类型：QWidget
+
+返回焦点代理，如果没有焦点代理，则返回 None。
+
+
+--------------------------------
+## focusWidget()
+
+返回类型：QWidget
+
+返回已调用 setFocus 的此小部件的最后一个子项。对于顶级小部件，这是在此窗口被激活时将获得焦点的小部件
+
+这与 focusWidget() 不同，后者返回当前活动窗口中的焦点小部件。
+
+
+--------------------------------
+## font()
+
+返回类型：QFont
+
+属性 font 的获取方法。
+
+
+--------------------------------
+## fontInfo()
+
+返回类型：QFontInfo
+
+返回小部件当前字体的字体信息。相当于 QFontInfo(widget->font())。
+
+
+--------------------------------
+## fontMetrics()
+
+返回类型：QFontMetrics
+
+返回小部件当前字体的字体度量。相当于 QFontMetrics(widget->font())。
+
+
+--------------------------------
+## foregroundRole()
+
+返回类型：ColorRole
+
+返回前景角色。
+
+前景角色定义小部件调色板中用于绘制前景的颜色。
+
+如果未设置明确的前景角色，则该函数返回与背景角色形成对比的角色。
+
+
+--------------------------------
+## frameGeometry()
+
+返回类型：QRect
+
+属性 frameGeometry 的获取器。
+
+
+--------------------------------
+## frameSize()
+
+返回类型：QSize
+
+属性 frameSize 的获取器。
+
+
+--------------------------------
+## geometry()
+
+返回类型：QRect
+
+属性 geometry 的获取器。
+
+
+--------------------------------
+## grab([rectangle=QRect(QPoint(0, 0), QSize(-1, -1))])
+
+参数：
+
+- rectangle – QRect
+
+返回类型：QPixmap
+
+将小部件渲染到受给定矩形限制的像素图中。如果小部件有任何子项，则它们也会被绘制在适当的位置。
+
+如果指定了无效大小的矩形（默认），则会绘制整个小部件。
+
+
+--------------------------------
+## grabGesture(type[, flags=Qt.GestureFlags()])
+
+参数：
+
+- type – GestureType
+- flags – Combination of GestureFlag
+
+使用特定标志将小部件订阅到给定的手势。
+
+
+--------------------------------
+## grabKeyboard()
+
+抓取键盘输入。
+
+此小部件接收所有键盘事件，直到调用 releaseKeyboard()；其他小部件根本不会收到键盘事件。鼠标事件不受影响。如果要抓取鼠标事件，请使用 grabMouse()。
+
+焦点小部件不受影响，但它不会接收任何键盘事件。setFocus() 会像往常一样移动焦点，但新的焦点小部件仅在调用 releaseKeyboard() 后才会接收键盘事件。
+
+如果其他小部件当前正在抓取键盘输入，则首先释放该小部件的抓取。
+
+
+--------------------------------
+## grabMouse()
+
+抓取鼠标输入。
+
+此小部件接收所有鼠标事件，直到调用 releaseMouse()；其他小部件根本不会收到鼠标事件。键盘事件不受影响。如果要抓取，请使用 grabKeyboard()。
+
+使用 Qt 时很少需要抓取鼠标，因为 Qt 会合理地抓取和释放鼠标。具体来说，Qt 会在按下鼠标按钮时抓取鼠标，并保持鼠标状态，直到释放最后一个按钮。
+
+
+--------------------------------
+## grabMouse(arg__1)
+
+参数：
+
+- arg__1 – QCursor
+
+此函数重载 grabMouse() 。
+
+抓取鼠标输入并更改光标形状。
+
+光标将呈现光标形状（只要鼠标焦点被抓取），并且此小部件将是唯一接收鼠标事件的小部件，直到调用 releaseMouse() 为止。
+
+
+--------------------------------
+## grabShortcut(key[, context=Qt.WindowShortcut])
+
+参数：
+
+- key – QKeySequence
+- context – ShortcutContext
+
+返回类型：int
+
+向 Qt 的快捷键系统添加快捷键，该系统在给定上下文中监视给定的按键序列。如果上下文是 Qt::ApplicationShortcut，则快捷键将应用于整个应用程序。否则，它要么是此小部件的本地按键，即 Qt::WidgetShortcut，要么是窗口本身的本地按键，即 Qt::WindowShortcut。
+
+如果多个小部件都抓取了相同的按键序列，则当按键序列发生时，QEvent::Shortcut 事件将以非确定性顺序发送到它应用的所有小部件，但“ambiguous”标志设置为 true。
+
+
+--------------------------------
+## graphicsEffect()
+
+返回类型：QGraphicsEffect
+
+graphicsEffect 函数返回指向小部件图形效果的指针。
+
+如果小部件没有图形效果，则返回 None。
+
+
+--------------------------------
+## graphicsProxyWidget()
+
+返回类型：QGraphicsProxyWidget
+
+返回图形视图中相应嵌入窗口小部件的代理窗口小部件；否则返回 None。
+
+
+--------------------------------
+## hasFocus()
+
+返回类型：bool
+
+属性焦点的获取器。
+
+
+--------------------------------
+## hasHeightForWidth()
+
+返回类型：bool
+
+如果小部件的首选高度取决于其宽度，则返回 true；否则返回 false。
+
+
+--------------------------------
+## hasMouseTracking()
+
+返回类型：bool
+
+属性 mouseTracking 的获取器。
+
+
+--------------------------------
+## hasTabletTracking()
+
+返回类型：bool
+
+属性 tabletTracking 的获取器。
+
+
+--------------------------------
+## heightForWidth(arg__1)
+
+参数：
+
+- arg__1 – int
+
+返回类型：int
+
+给定宽度 w，返回此小部件的首选高度。
+
+如果此小部件具有布局，则默认实现将返回布局的首选高度。如果没有布局，则默认实现将返回 -1，表示首选高度不依赖于宽度。
+
+
+--------------------------------
+## hide()
+
+隐藏小部件。该函数相当于 setVisible (false)。
+
+
+--------------------------------
+## hideEvent(event)
+
+参数：
+
+- event – QHideEvent
+
+可以在子类中重新实现此事件处理程序以接收小部件隐藏事件。事件在事件参数中传递。
+
+小部件隐藏后，会立即向其发送隐藏事件。
+
+
+--------------------------------
+## inputMethodEvent(event)
+
+参数：
+
+- event – QInputMethodEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收输入法组合事件。当输入法状态发生变化时，将调用此处理程序。
+
+请注意，在创建自定义文本编辑小部件时，必须明确设置 Qt::WA_InputMethodEnabled 窗口属性（使用 setAttribute() 函数）才能接收输入法事件。
+
+默认实现调用 event->ignore()，它会拒绝输入法事件。有关更多详细信息，请参阅 QInputMethodEvent 文档。
+
+
+--------------------------------
+## inputMethodHints()
+
+返回类型：Combination of InputMethodHint
+
+属性 inputMethodHints 的获取器。
+
+
+--------------------------------
+## inputMethodQuery(arg__1)
+
+参数：
+
+- arg__1 – InputMethodQuery
+
+返回类型：object
+
+此方法仅与输入小部件相关。输入法使用它来查询小部件的一组属性，以便能够支持复杂的输入法操作，如支持周围文本和重新转换。
+
+查询指定查询哪个属性。
+
+
+--------------------------------
+## insertAction(before, action)
+
+参数：
+
+- before – QAction
+- action – QAction
+
+将操作 action 插入到此小部件的操作列表中，位于操作 before 之前。如果 before 为 None 或 before 不是此小部件的有效操作，则附加操作。
+
+QWidget 应该只具有每个操作中的一个。
+
+
+--------------------------------
+## insertActions(before, actions)
+
+参数：
+
+- before – QAction
+- actions – .list of QAction
+
+将操作操作插入到此小部件的操作列表中，在操作之前。如果操作之前为 None 或之前不是此小部件的有效操作，则附加操作。
+
+QWidget 最多可以拥有每个操作中的一个。
+
+
+--------------------------------
+## internalWinId()
+
+返回类型：WId
+
+
+--------------------------------
+## isActiveWindow()
+
+返回类型：bool
+
+属性 isActiveWindow 的获取器。
+
+
+--------------------------------
+## isAncestorOf(child)
+
+参数：
+
+- child – QWidget
+
+返回类型：bool
+
+如果此窗口小部件是给定子窗口小部件的父窗口小部件（或祖父母窗口小部件等，直到任何级别），并且两个窗口小部件都在同一个窗口内，则返回 true；否则返回 false。
+
+
+--------------------------------
+## isEnabled()
+
+返回类型：bool
+
+已启用属性的获取器。
+
+
+--------------------------------
+## isEnabledTo(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+返回类型：bool
+
+如果此小部件在祖先已启用的情况下变为启用状态，则返回 true；否则返回 false。
+
+如果小部件本身以及除祖先之外的每个父级均未明确禁用，则会出现这种情况。
+
+如果此小部件或其任何祖先已明确禁用，则 isEnabledTo(0) 返回 false。
+
+此处的祖先一词表示同一窗口内的父小部件。
+
+因此，isEnabledTo(0) 停止在此小部件的窗口，而 isEnabled() 则将父窗口也考虑在内。
+
+
+--------------------------------
+## isFullScreen()
+
+返回类型：bool
+
+属性 fullScreen 的获取器。
+
+
+--------------------------------
+## isHidden()
+
+返回类型：bool
+
+如果小部件被隐藏，则返回 true，否则返回 false。
+
+隐藏的小部件只有在调用 show() 时才会变为可见。当父级显示时，它不会自动显示。
+
+要检查可见性，请改用 ! isVisible()（注意感叹号）。
+
+isHidden() 意味着 ! isVisible() ，但小部件可以同时不可见和不隐藏。对于不可见小部件的子小部件，情况就是如此。
+
+如果出现以下情况，小部件将被隐藏：
+
+- 它们被创建为独立窗口，
+- 它们被创建为可见小部件的子小部件，
+- 调用了 hide() 或 setVisible (false)。
+
+
+--------------------------------
+## isLeftToRight()
+
+返回类型：bool
+
+
+--------------------------------
+##  isMaximized()
+
+返回类型：bool
+
+属性最大化的获取器。
+
+
+--------------------------------
+## isMinimized()
+
+返回类型：bool
+
+属性的吸气剂最小化。
+
+
+--------------------------------
+## isModal()
+
+返回类型：bool
+
+属性 modal 的获取方法。
+
+
+--------------------------------
+## isRightToLeft()
+
+返回类型：bool
+
+
+--------------------------------
+## isTopLevel()
+
+返回类型：bool
+
+改用 isWindow()。
+
+
+--------------------------------
+## isVisible()
+
+返回类型：bool
+
+可见属性的获取器。
+
+
+--------------------------------
+## isVisibleTo(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+返回类型：bool
+
+如果此小部件在显示祖先时变为可见，则返回 true；否则返回 false。
+
+如果小部件本身以及除祖先之外的任何父级都没有被明确隐藏，则会出现 true 的情况。
+
+如果小部件被屏幕上的其他窗口遮挡，但如果它或它们被移动，则可能在物理上可见，则此函数仍将返回 true。
+
+isVisibleTo(0) 与 isVisible() 相同。
+
+
+--------------------------------
+## isWindow()
+
+返回类型：bool
+
+如果窗口小部件是独立窗口，则返回 true，否则返回 false。
+
+窗口是一种在视觉上不是任何其他窗口小部件的子窗口小部件，通常具有框架和窗口标题。
+
+窗口可以有一个父窗口小部件。然后它将与其父窗口小部件组合在一起，并在父窗口小部件被删除时被删除，在父窗口小部件最小化时被最小化等。如果窗口管理器支持，它还将与其父窗口小部件具有一个公共任务栏条目。
+
+QDialog 和 QMainWindow 窗口小部件默认为窗口，即使在构造函数中指定了父窗口小部件。此行为由 Qt::Window 标志指定。
+
+
+--------------------------------
+## isWindowModified()
+
+返回类型：bool
+
+属性 windowModified 的获取器。
+
+
+--------------------------------
+## keyPressEvent(event)
+
+参数：
+
+- event – QKeyEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件的按键事件。
+
+小部件必须调用 setFocusPolicy() 来初始接受焦点，并具有焦点才能接收按键事件。
+
+如果您重新实现此处理程序，则在您未对按键执行操作时调用基类实现非常重要。
+
+如果用户按下 QKeySequence::Cancel 的按键序列（通常是 Escape 键），则默认实现会关闭弹出小部件。否则，事件将被忽略，以便小部件的父级可以对其进行解释。
+
+请注意，QKeyEvent 以 isAccepted() == true 开头，因此您无需调用 QKeyEvent::accept() - 如果您对按键执行操作，则不要调用基类实现。
+
+
+--------------------------------
+## keyReleaseEvent(event)
+
+参数：
+
+- event – QKeyEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件的按键释放事件。
+
+小部件必须首先接受焦点并具有焦点才能接收按键释放事件。
+
+如果您重新实现此处理程序，则在不对按键采取行动的情况下调用基类实现非常重要。
+
+默认实现会忽略该事件，以便小部件的父级可以对其进行解释。
+
+请注意，QKeyEvent 以 isAccepted() == true 开头，因此您无需调用 QKeyEvent::accept() - 如果您对按键采取行动，则不要调用基类实现。
+
+
+--------------------------------
+## static keyboardGrabber()
+
+返回类型：QWidget
+
+返回当前正在抓取键盘输入的小部件。
+
+如果此应用程序中当前没有小部件正在抓取键盘，则返回 None。
+
+
+--------------------------------
+## layout()
+
+返回类型：QLayout
+
+返回此小部件上安装的布局管理器，如果未安装布局管理器，则返回 None。
+
+布局管理器设置已添加到布局的小部件子项的几何形状。
+
+
+--------------------------------
+## layoutDirection()
+
+返回类型：LayoutDirection
+
+属性 layoutDirection 的获取方法。
+
+
+--------------------------------
+## leaveEvent(event)
+
+参数：
+
+- event – QEvent
+
+可以在子类中重新实现此事件处理程序，以接收在事件参数中传递的小部件离开事件。
+
+当鼠标光标离开小部件时，将向小部件发送离开事件。
+
+
+--------------------------------
+## locale()
+
+返回类型：QLocale
+
+属性 locale 的获取器。
+
+
+--------------------------------
+## lower()
+
+将小部件降低到父小部件堆栈的底部。
+
+调用此函数后，小部件将在视觉上位于任何重叠的兄弟小部件后面（因此被其遮挡）。
+
+
+--------------------------------
+## mapFrom(arg__1, arg__2)
+
+参数：
+
+- arg__1 – QWidget
+- arg__2 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mapFrom(arg__1, arg__2)
+
+参数：
+
+- arg__1 – QWidget
+- arg__2 – QPointF
+
+返回类型：QPointF
+
+将小部件坐标 pos 从父级坐标系转换为此小部件的坐标系。父级不能为 None，并且必须是调用小部件的父级。
+
+
+--------------------------------
+## mapFromGlobal(arg__1)
+
+参数：
+
+- arg__1 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mapFromGlobal(arg__1)
+
+参数：
+
+- arg__1 – QPointF
+
+返回类型：QPointF
+
+将全局屏幕坐标 pos 转换为小部件坐标。
+
+
+--------------------------------
+## mapFromParent(arg__1)
+
+参数：
+
+- arg__1 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mapFromParent(arg__1)
+
+参数：
+
+- arg__1 – QPointF
+
+返回类型：QPointF
+
+将父窗口小部件坐标 pos 转换为窗口小部件坐标。
+
+如果窗口小部件没有父级，则与 mapFromGlobal() 相同。
+
+
+--------------------------------
+## mapTo(arg__1, arg__2)
+
+参数：
+
+- arg__1 – QWidget
+- arg__2 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mapTo(arg__1, arg__2)
+
+参数：
+
+- arg__1 – QWidget
+- arg__2 – QPointF
+
+返回类型：QPointF
+
+将小部件坐标 pos 转换为父级坐标系。父级不能为 None，并且必须是调用小部件的父级。
+
+
+--------------------------------
+## mapToGlobal(arg__1)
+
+参数：
+
+- arg__1 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mapToGlobal(arg__1)
+
+参数：
+
+- arg__1 – QPointF
+
+返回类型：QPointF
+
+将小部件坐标 pos 转换为全局屏幕坐标。例如，mapToGlobal(QPointF(0,0)) 将提供小部件左上角像素的全局坐标。
+
+
+--------------------------------
+## mapToParent(arg__1)
+
+参数：
+
+- arg__1 – QPointF
+
+返回类型：QPointF
+
+将小部件坐标 pos 转换为父小部件中的坐标。
+
+如果小部件没有父级，则与 mapToGlobal() 相同。
+
+
+--------------------------------
+## mapToParent(arg__1)
+
+参数：
+
+- arg__1 – QPoint
+
+返回类型：QPoint
+
+这是一个重载函数。
+
+
+--------------------------------
+## mask()
+
+返回类型：QRegion
+
+返回当前在小部件上设置的掩码。如果没有设置掩码，则返回值将是一个空区域。
+
+
+--------------------------------
+## maximumHeight()
+
+返回类型：int
+
+属性 maximumHeight 的获取器。
+
+
+--------------------------------
+## maximumSize()
+
+返回类型：QSize
+
+属性 maximumSize 的获取器。
+
+
+--------------------------------
+## maximumWidth()
+
+返回类型：int
+
+属性 maximumWidth 的获取器。
+
+
+--------------------------------
+## minimumHeight()
+
+返回类型：int
+
+属性 minimumHeight 的获取器。
+
+
+--------------------------------
+## minimumSize()
+
+返回类型：QSize
+
+属性 minimumSize 的获取器。
+
+
+--------------------------------
+## minimumSizeHint()
+
+返回类型：QSize
+
+属性 minimumSizeHint 的获取器。
+
+
+--------------------------------
+## minimumWidth()
+
+返回类型：int
+
+属性 minimumWidth 的获取器。
+
+
+--------------------------------
+## mouseDoubleClickEvent(event)
+
+参数：
+
+- event – QMouseEvent
+
+此事件处理程序（用于事件）可以在子类中重新实现，以接收小部件的鼠标双击事件。
+
+默认实现调用 mousePressEvent() 。
+
+
+--------------------------------
+## static mouseGrabber()
+
+返回类型：QWidget
+
+返回当前正在抓取鼠标输入的小部件。
+
+如果此应用程序中当前没有小部件正在抓取鼠标，则返回 None。
+
+
+--------------------------------
+## mouseMoveEvent(event)
+
+参数：
+
+- event – QMouseEvent
+
+此事件处理程序（用于事件）可以在子类中重新实现，以接收小部件的鼠标移动事件。
+
+如果关闭鼠标跟踪，则只有在移动鼠标时按下鼠标按钮时才会发生鼠标移动事件。 如果打开鼠标跟踪，即使没有按下鼠标按钮也会发生鼠标移动事件。
+
+QMouseEvent::pos() 报告鼠标光标相对于此小部件的位置。 对于按下和释放事件，位置通常与上次鼠标移动事件的位置相同，但如果用户的手抖动，位置可能会有所不同。 这是底层窗口系统的功能，而不是 Qt。
+
+如果您想在鼠标移动时立即显示工具提示（例如，使用 QMouseEvent::pos() 获取鼠标坐标并将其显示为工具提示），您必须首先启用鼠标跟踪，如上所述。 然后，为了确保工具提示立即更新，您必须在 mouseMoveEvent() 的实现中调用 showText() 而不是 setToolTip()。
+
+
+--------------------------------
+## mousePressEvent(event)
+
+参数：
+
+- event – QMouseEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件的鼠标按下事件。
+
+如果您在 mousePressEvent() 中创建新的小部件，mouseReleaseEvent() 可能不会到达您期望的位置，这取决于底层窗口系统（或 X11 窗口管理器）、小部件的位置等。
+
+默认实现会在您单击窗口外部时关闭弹出小部件。对于其他小部件类型，它不执行任何操作。
+
+
+--------------------------------
+## mouseReleaseEvent(event)
+
+参数：
+
+- event – QMouseEvent
+
+对于事件，此事件处理程序可以在子类中重新实现，以接收小部件的鼠标释放事件。
+
+
+--------------------------------
+## move(arg__1)
+
+参数：
+
+- arg__1 – QPoint
+
+属性 pos 的设置者。
+
+
+--------------------------------
+## move(x, y)
+
+参数：
+
+- x – int
+- y – int
+
+这是一个重载函数。
+
+这对应于 move(QPoint(x, y))。
+
+
+--------------------------------
+## moveEvent(event)
+
+参数：
+
+- event – QMoveEvent
+
+此事件处理程序可以在子类中重新实现，以接收在事件参数中传递的小部件移动事件。当小部件接收到此事件时，它已经处于新位置。
+
+可以通过 QMoveEvent::oldPos() 访问旧位置。
+
+
+--------------------------------
+## nativeEvent(eventType, message)
+
+参数：
+
+- eventType – QByteArray
+- message – void
+
+返回类型：PyObject
+
+此特殊事件处理程序可以在子类中重新实现，以接收由消息参数中传递的 eventType 标识的本机平台事件。
+
+在重新实现此函数时，如果您想停止 Qt 处理的事件，请返回 true 并设置结果。result 参数仅在 Windows 上有意义。如果返回 false，则此本机事件将传递回 Qt，Qt 会将该事件转换为 Qt 事件并将其发送到小部件。
+
+| Platform | Event Type Identifier | Message Type | Result Type |
+| -------- | --------------------- | ------------ | ----------- |
+| Windows  | “windows_generic_MSG” | MSG *        | LRESULT     |
+| macOS    | “NSEvent”             | NSEvent *    |             |
+| XCB      | “xcb_generic_event_t” | xcb_generic_event_t * |    |
+
+
+--------------------------------
+## nativeParentWidget()
+
+返回类型：QWidget
+
+返回此小部件的本机父级，即下一个具有系统标识符的祖先小部件，如果它没有任何本机父级，则返回 None。
+
+
+--------------------------------
+## nextInFocusChain()
+
+返回类型：QWidget
+
+返回此小部件焦点链中的下一个小部件。
+
+
+--------------------------------
+## normalGeometry()
+
+返回类型：QRect
+
+属性 normalGeometry 的获取方法。
+
+
+--------------------------------
+## overrideWindowFlags(type)
+
+参数：
+
+- type – Combination of WindowType
+
+将小部件的窗口标志设置为标志，而不告知窗口系统。
+
+
+--------------------------------
+## overrideWindowState(state)
+
+参数：
+
+- state – Combination of WindowState
+
+
+--------------------------------
+## paintEvent(event)
+
+参数：
+
+- event – QPaintEvent
+
+此事件处理程序可以在子类中重新实现，以接收事件中传递的绘制事件。
+
+绘制事件是重新绘制全部或部分小部件的请求。它可能由于以下原因之一而发生：
+
+调用了 repaint() 或 update()，
+
+小部件被遮挡并且现在已被发现，或者
+
+许多其他原因。
+
+许多小部件可以在被要求时简单地重新绘制其整个表面，但一些速度较慢的小部件需要通过仅绘制请求的区域进行优化：QPaintEvent::region()。这种速度优化不会改变结果，因为在事件处理期间绘制被剪辑到该区域。例如，QListView 和 QTableView 就是这样做的。
+
+Qt 还尝试通过将多个绘制事件合并为一个来加快绘制速度。当多次调用 update() 或窗口系统发送多个绘制事件时，Qt 会将这些事件合并为一个具有较大区域的事件（请参阅 QRegion::united()）。repaint() 函数不允许这种优化，因此我们建议尽可能使用 update()。
+
+当发生绘制事件时，更新区域通常已被擦除，因此您正在小部件的背景上进行绘制。
+
+可以使用 setBackgroundRole() 和 setPalette() 设置背景。
+
+自 Qt 4.0 起，QWidget 会自动对其绘制进行双缓冲，因此无需在 paintEvent() 中编写双缓冲代码来避免闪烁。
+
+
+--------------------------------
+## palette()
+
+返回类型：QPalette
+
+属性调色板的获取器。
+
+
+--------------------------------
+## parentWidget()
+
+返回类型：QWidget
+
+返回此小部件的父级，如果它没有任何父小部件，则返回 None。
+
+
+--------------------------------
+## pos()
+
+返回类型：QPoint
+
+属性 pos 的获取器。
+
+
+--------------------------------
+## previousInFocusChain()
+
+返回类型：QWidget
+
+previousInFocusChain 函数返回此小部件焦点链中的前一个小部件。
+
+
+--------------------------------
+## raise_()
+## rect()
+
+返回类型：QRect
+
+属性 rect 的获取器。
+
+
+--------------------------------
+## releaseKeyboard()
+
+释放键盘抓取。
+
+
+--------------------------------
+## releaseMouse()
+
+释放鼠标抓取。
+
+
+--------------------------------
+## releaseShortcut(id)
+
+参数：
+
+- id – int
+
+从 Qt 的快捷方式系统中删除具有指定 ID 的快捷方式。小部件将不再接收快捷方式的键序列的 QEvent::Shortcut 事件（除非它有其他具有相同键序列的快捷方式）。
+
+
+--------------------------------
+## removeAction(action)
+
+参数：
+
+- action – QAction
+
+从此小部件的操作列表中删除操作。
+
+
+--------------------------------
+## render(target[, targetOffset=QPoint()[, sourceRegion=QRegion()[, renderFlags=QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)]]])
+
+参数：
+
+- target – QPaintDevice
+- targetOffset – QPoint
+- sourceRegion – QRegion
+- renderFlags – Combination of RenderFlag
+
+
+使用 renderFlags 将此小部件的 sourceRegion 渲染到目标中，以确定如何渲染。渲染从目标中的 targetOffset 开始。例如：
+
+```python
+pixmap = QPixmap(widget.size())
+widget.render(pixmap)
+```
+
+如果 sourceRegion 为空区域，则此函数将使用 rect() 作为区域，即整个小部件。
+
+确保在渲染之前为目标设备的活动绘图器（如果有）调用 QPainter::end()。例如：
+
+```python
+painter = QPainter(self)
+...
+painter.end()
+myWidget.render(self)
+```
+
+
+--------------------------------
+## render(painter, targetOffset[, sourceRegion=QRegion()[, renderFlags=QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)]])
+
+参数：
+
+- painter – QPainter
+- targetOffset – QPoint
+- sourceRegion – QRegion
+- renderFlags – Combination of RenderFlag
+
+这是一个重载函数。
+
+将小部件渲染到绘图器的 QPainter::device() 中。
+
+渲染时将使用应用于绘图器的变换和设置。
+
+
+--------------------------------
+## repaint()
+
+通过立即调用 paintEvent() 直接重新绘制小部件，除非更新被禁用或小部件被隐藏。
+
+我们建议仅在需要立即重新绘制时（例如在动画期间）才使用 repaint()。在大多数情况下，update() 更好，因为它允许 Qt 优化速度并最大限度地减少闪烁。
+
+
+--------------------------------
+## repaint(arg__1)
+
+参数：
+
+- arg__1 – QRect
+
+这是一个重载函数。
+
+此版本重新绘制了小部件内部的矩形。
+
+
+--------------------------------
+## repaint(arg__1)
+
+参数：
+
+- arg__1 – QRegion
+
+这是一个重载函数。
+
+此版本重新绘制了小部件内部的区域 rgn。
+
+
+--------------------------------
+## repaint(x, y, w, h)
+
+参数：
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+这是一个重载函数。
+
+此版本在小部件内重新绘制一个矩形 (x, y, w, h)。
+
+如果 w 为负数，则用 width() - x 替换；如果 h 为负数，则用 width height() - y 替换。
+
+
+--------------------------------
+## resize(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+属性大小的设置者。
+
+
+--------------------------------
+## resize(w, h)
+
+参数：
+
+- w – int
+- h – int
+
+这是一个重载函数。
+
+这对应于resize(QSize(w, h)).
+
+
+--------------------------------
+## resizeEvent(event)
+
+参数：
+
+- event – QResizeEvent
+
+此事件处理程序可以在子类中重新实现，以接收在事件参数中传递的小部件调整大小事件。调用 resizeEvent() 时，小部件已经具有其新的几何形状。旧大小可通过 QResizeEvent::oldSize() 访问。
+
+处理调整大小事件后，小部件将被擦除并立即接收绘制事件。此处理程序内不需要（或不应该）进行任何绘制。
+
+
+--------------------------------
+## restoreGeometry(geometry)
+
+参数：
+
+- geometry – QByteArray
+
+返回类型：bool
+
+恢复存储在字节数组 geometry 中的顶级小部件的几何形状和状态。成功时返回 true；否则返回 false。
+
+如果恢复的几何形状不在屏幕上，它将被修改为位于可用的屏幕几何形状内。
+
+要恢复使用 QSettings 保存的几何形状，您可以使用如下代码：
+
+```python
+settings = QSettings("MyCompany", "MyApp")
+myWidget.restoreGeometry(settings.value("myWidget/geometry").toByteArray())
+```
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+使用 restoreState() 恢复工具栏和停靠小部件的几何形状和状态。
+
+
+--------------------------------
+## saveGeometry()
+
+返回类型：QByteArray
+
+保存顶层小部件的当前几何图形和状态。
+
+要在窗口关闭时保存几何图形，您可以实现如下关闭事件：
+
+```python
+def closeEvent(self, event):
+
+    settings = QSettings("MyCompany", "MyApp")
+    settings.setValue("geometry", saveGeometry())
+    QWidget.closeEvent(event)
+```
+
+有关窗口几何问题的概述，请参阅窗口几何文档。
+
+使用 saveState() 保存工具栏和停靠小部件的几何形状和状态。
+
+
+--------------------------------
+## screen()
+
+返回类型：QScreen
+
+返回小部件所在的屏幕。
+
+
+--------------------------------
+## scroll(dx, dy, arg__3)
+
+参数：
+
+- dx – int
+- dy – int
+- arg__3 – QRect
+
+这是一个重载函数。
+
+此版本仅滚动 r，不会移动小部件的子项。
+
+如果 r 为空或无效，则结果未定义。
+
+
+--------------------------------
+## scroll(dx, dy)
+
+参数：
+
+- dx – int
+- dy – int
+
+将包括其子项的窗口小部件向右滚动 dx 像素，向下滚动 dy。dx 和 dy 都可能为负数。
+
+滚动后，窗口小部件将收到需要重新绘制的区域的绘制事件。对于 Qt 知道不透明的窗口小部件，这仅是新暴露的部分。例如，如果不透明窗口小部件向左滚动 8 像素，则只有右边缘的 8 像素宽条纹需要更新。
+
+由于窗口小部件默认传播其父项的内容，因此您需要设置 autoFillBackground 属性，或使用 setAttribute() 设置 Qt::WA_OpaquePaintEvent 属性，以使窗口小部件不透明。
+
+对于使用内容传播的窗口小部件，滚动将导致整个滚动区域的更新。
+
+
+--------------------------------
+## setAcceptDrops(on)
+
+参数：
+
+- on – bool
+
+属性 acceptDrops 的设置者。
+
+
+--------------------------------
+## setAccessibleDescription(description)
+
+参数：
+
+- description – str
+
+属性 accessibleDescription 的设置者。
+
+
+--------------------------------
+## setAccessibleName(name)
+
+参数：
+
+- name – str
+
+属性 accessibleName 的设置者。
+
+
+--------------------------------
+## setAttribute(arg__1[, on=true])
+
+参数：
+
+- arg__1 – WidgetAttribute
+- on – bool
+
+如果为真，则设置此小部件上的属性attribute；否则清除该属性。
+
+
+--------------------------------
+## setAutoFillBackground(enabled)
+
+参数：
+
+- enabled – bool
+
+属性 autoFillBackground 的设置者。
+
+
+--------------------------------
+## setBackgroundRole(arg__1)
+
+参数：
+
+- arg__1 – ColorRole
+
+将小部件的背景角色设置为 role。
+
+背景角色定义小部件调色板中用于渲染背景的画笔。
+
+如果 role 是 QPalette::NoRole，则小部件将继承其父级的背景角色。
+
+请注意，样式可以自由选择调色板中的任何颜色。如果使用 setBackgroundRole() 未获得所需结果，您可以修改调色板或设置样式表。
+
+
+--------------------------------
+## setBaseSize(basew, baseh)
+
+参数：
+
+- basew – int
+- baseh – int
+
+这是一个重载函数。
+
+这对应于 setBaseSize (QSize(basew, baseh))。将小部件基本大小设置为宽度 basew 和高度 baseh。
+
+
+--------------------------------
+## setBaseSize(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+属性 baseSize 的设置者。
+
+
+--------------------------------
+## setContentsMargins(margins)
+
+参数：
+
+- margins – QMargins
+
+这是一个重载函数。
+
+setContentsMargins 函数设置小部件内容周围的边距。
+
+设置小部件内容周围的边距，使其大小由边距决定。边距由布局系统使用，并可由子类使用来指定要绘制的区域（例如，不包括框架）。
+
+更改边距将触发 resizeEvent() 。
+
+
+--------------------------------
+## setContentsMargins(left, top, right, bottom)
+
+参数：
+
+- left – int
+- top – int
+- right – int
+- bottom – int
+
+设置小部件内容周围的边距，使其具有左、上、右和下的大小。边距由布局系统使用，并可由子类使用来指定要绘制的区域（例如，不包括框架）。
+
+更改边距将触发 resizeEvent() 。
+
+
+--------------------------------
+## setContextMenuPolicy(policy)
+
+参数：
+
+- policy – ContextMenuPolicy
+
+属性 contextMenuPolicy 的设置者。
+
+
+--------------------------------
+## setCursor(arg__1)
+
+参数：
+
+- arg__1 – QCursor
+
+属性 cursor 的设置者。
+
+
+--------------------------------
+## setDisabled(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+如果 disable 为真，则禁用小部件输入事件；否则启用输入事件。
+
+请参阅启用文档以了解更多信息。
+
+
+--------------------------------
+## setEnabled(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性的设置器已启用。
+
+
+--------------------------------
+## setFixedHeight(h)
+
+参数：
+
+- h – int
+
+将小部件的最小和最大高度都设置为 h，而不改变宽度。提供方便。
+
+
+--------------------------------
+## setFixedSize(w, h)
+
+参数：
+
+- w – int
+- h – int
+
+这是一个重载函数。
+
+将小部件的宽度设置为 w，高度设置为 h。
+
+
+--------------------------------
+## setFixedSize(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+将小部件的最小和最大尺寸都设置为 s，从而防止其增大或缩小。
+
+这将覆盖 QLayout 设置的默认尺寸限制。
+
+要删除限制，请将尺寸设置为 QWIDGETSIZE_MAX 。
+
+或者，如果您希望小部件根据其内容具有固定尺寸，则可以调用 setSizeConstraint ( SetFixedSize )；
+
+
+--------------------------------
+## setFixedWidth(w)
+
+参数：
+
+- w – int
+
+将小部件的最小和最大宽度都设置为 w，而不改变高度。提供方便。
+
+
+--------------------------------
+## setFocus(reason)
+
+参数：
+
+- reason – FocusReason
+
+如果此小部件或其父项之一是活动窗口，则将键盘输入焦点赋予此小部件（或其焦点代理）。原因参数将传递到从此函数发送的任何焦点事件中，它用于解释导致小部件获得焦点的原因。如果窗口不活动，则窗口变为活动状态时将为小部件提供焦点。
+
+首先，将焦点即将改变事件发送到焦点小部件（如果有），以告知它即将失去焦点。然后改变焦点，将焦点移出事件发送到上一个焦点项目，并将焦点进入事件发送到新项目，以告知它刚刚收到焦点。（如果焦点进入和焦点移出小部件相同，则不会发生任何事情。）
+
+setFocus() 将焦点赋予小部件，无论其焦点策略如何，但不会清除任何键盘抓取（请参阅 grabKeyboard()）。
+
+请注意，如果小部件被隐藏，它将不会接受焦点，直到显示出来。
+
+
+--------------------------------
+## setFocus()
+
+这是一个重载函数。
+
+如果此窗口小部件或其父代之一是活动窗口，则将键盘输入焦点赋予此窗口小部件（或其焦点代理）。
+
+
+--------------------------------
+## setFocusPolicy(policy)
+
+参数：
+
+- policy – FocusPolicy
+
+focusPolicy 属性的设置者。
+
+
+--------------------------------
+## setFocusProxy(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+将小部件的焦点代理设置为小部件 w。如果 w 为 None，则该函数会将此小部件重置为没有焦点代理。
+
+某些小部件可以“具有焦点”，但会创建一个子小部件（例如 QLineEdit）来实际处理焦点。在这种情况下，小部件可以将行编辑设置为其焦点代理。
+
+setFocusProxy() 设置当“此小部件”获得焦点时实际获得焦点的小部件。如果有焦点代理，则 setFocus() 和 hasFocus() 将对焦点代理进行操作。如果“此小部件”是焦点小部件，则 setFocusProxy() 会将焦点移动到新的焦点代理。
+
+
+--------------------------------
+## setFont(arg__1)
+
+参数：
+
+- arg__1 – QFont
+
+字体属性的设置者。
+
+
+--------------------------------
+## setForegroundRole(arg__1)
+
+参数：
+
+- arg__1 – ColorRole
+
+将小部件的前景角色设置为 role。
+
+前景角色定义小部件调色板中用于绘制前景的颜色。
+
+如果 role 是 QPalette::NoRole，则小部件使用与背景角色形成对比的前景角色。
+
+请注意，样式可以自由选择调色板中的任何颜色。 如果使用 setForegroundRole() 未获得所需结果，您可以修改调色板或设置样式表。
+
+
+--------------------------------
+## setGeometry(arg__1)
+
+参数：
+
+- arg__1 – QRect
+
+几何属性的设置者。
+
+
+--------------------------------
+## setGeometry(x, y, w, h)
+
+参数：
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+这是一个重载函数。
+
+这对应于 setGeometry (QRect(x, y, w, h))。
+
+
+--------------------------------
+## setGraphicsEffect(effect)
+
+参数：
+
+- effect – QGraphicsEffect
+
+setGraphicsEffect 函数用于设置小部件的图形效果。
+
+将效果设置为小部件的效果。如果此小部件上已安装效果，QWidget 将在安装新效果之前删除现有效果。
+
+如果效果是其他小部件上安装的效果，setGraphicsEffect() 将从小部件中删除该效果并将其安装在此小部件上。
+
+QWidget 拥有效果。
+
+
+--------------------------------
+## setHidden(hidden)
+
+参数：
+
+- hidden – bool
+
+便利功能，相当于setVisible(!``hidden``)。
+
+
+--------------------------------
+## setInputMethodHints(hints)
+
+参数：
+
+- hints – Combination of InputMethodHint
+
+属性 inputMethodHints 的设置器。
+
+
+--------------------------------
+## setLayout(arg__1)
+
+参数：
+
+- arg__1 – QLayout
+
+将此小部件的布局管理器设置为布局。
+
+如果此小部件上已安装布局管理器，QWidget 将不允许您安装另一个。您必须先删除现有布局管理器（由 layout() 返回），然后才能使用新布局调用 setLayout()。
+
+如果 layout 是不同小部件上的布局管理器，setLayout() 将重新设置布局的父级并使其成为此小部件的布局管理器。
+
+示例：
+
+```python
+layout = QVBoxLayout()
+layout.addWidget(formWidget)
+setLayout(layout)
+```
+
+调用此函数的另一种方法是将此小部件传递给布局的构造函数。
+
+QWidget 将拥有布局的所有权。
+
+
+--------------------------------
+## setLayoutDirection(direction)
+
+参数：
+
+- direction – LayoutDirection
+
+属性 layoutDirection 的设置器。
+
+
+--------------------------------
+## setLocale(locale)
+
+参数：
+
+- locale – QLocale
+
+属性 locale 的设置者。
+
+
+--------------------------------
+## setMask(arg__1)
+
+参数：
+
+- arg__1 – QBitmap
+
+仅使位图具有相应 1 位的小部件像素可见。如果区域包含小部件 rect() 之外的像素，则该区域中的窗口系统控件可能可见也可能不可见，具体取决于平台。
+
+请注意，如果区域特别复杂，此效果可能会很慢。
+
+以下代码显示了如何使用具有 alpha 通道的图像为小部件生成蒙版：
+
+```python
+topLevelLabel = QLabel()
+pixmap = QPixmap(":/images/tux.png")
+topLevelLabel.setPixmap(pixmap)
+topLevelLabel.setMask(pixmap.mask())
+```
+
+此代码显示的标签使用其包含的图像进行屏蔽，使其看起来像是将不规则形状的图像直接绘制在屏幕上。
+
+屏蔽的小部件仅在其可见部分接收鼠标事件。
+
+
+--------------------------------
+## setMask(arg__1)
+
+参数：
+
+- arg__1 – QRegion
+
+这是一个重载函数。
+
+仅使窗口小部件与区域重叠的部分可见。如果该区域包含窗口小部件 rect() 之外的像素，则该区域中的窗口系统控件可能可见也可能不可见，具体取决于平台。
+
+由于 QRegion 允许创建任意复杂的区域，因此可以制作窗口小部件蒙版以适应最不寻常形状的窗口，甚至允许显示带有孔的窗口小部件。请注意，如果区域特别复杂，此效果可能会很慢。
+
+窗口小部件蒙版用于向窗口系统提示应用程序不希望蒙版外的区域发生鼠标事件。在大多数系统上，它们还会导致粗糙的视觉剪辑。要获得平滑的窗口边缘，请改用半透明背景和抗锯齿绘画，如半透明背景示例中所示。
+
+
+--------------------------------
+## setMaximumHeight(maxh)
+
+参数：
+
+- maxh – int
+
+属性 maximumHeight 的设置者。
+
+
+--------------------------------
+## setMaximumSize(maxw, maxh)
+
+参数：
+
+- maxw – int
+- maxh – int
+
+这是一个重载函数。
+
+此函数对应于setMaximumSize (QSize(maxw, maxh))。将最大宽度设置为maxw，将最大高度设置为maxh。
+
+
+--------------------------------
+## setMaximumSize(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+属性 maximumSize 的设置者。
+
+
+--------------------------------
+## setMaximumWidth(maxw)
+
+参数：
+
+- maxw – int
+
+属性 maximumWidth 的设置者。
+
+
+--------------------------------
+## setMinimumHeight(minh)
+
+参数：
+
+- minh – int
+
+属性 minimumHeight 的设置者。
+
+
+--------------------------------
+## setMinimumSize(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+属性 minimumSize 的设置者。
+
+
+--------------------------------
+## setMinimumSize(minw, minh)
+
+参数：
+
+- minw – int
+- minh – int
+
+这是一个重载函数。
+
+此函数对应于setMinimumSize (QSize(minw, minh))。将最小宽度设置为minw，将最小高度设置为minh。
+
+
+--------------------------------
+## setMinimumWidth(minw)
+
+参数：
+
+- minw – int
+
+属性 minimumWidth 的设置者。
+
+
+--------------------------------
+## setMouseTracking(enable)
+
+参数：
+
+- enable – bool
+
+属性 mouseTracking 的设置器。
+
+
+--------------------------------
+## setPalette(arg__1)
+
+参数：
+
+- arg__1 – QPalette
+
+属性调色板的设置器。
+
+
+--------------------------------
+## setParent(parent)
+
+参数：
+
+- parent – QWidget
+
+将窗口小部件的父窗口设置为父窗口，并重置窗口标志。窗口小部件将移动到其新父窗口的位置 (0, 0)。
+
+如果新的父窗口小部件位于不同的窗口中，则重新设置父窗口小部件及其子窗口将附加到新父窗口小部件的选项卡链的末尾，内部顺序与之前相同。如果其中一个移动的窗口小部件具有键盘焦点，setParent() 将为该窗口小部件调用 clearFocus()。
+
+如果新的父窗口小部件与旧的父窗口小部件位于同一个窗口中，则设置父窗口小部件不会更改选项卡顺序或键盘焦点。
+
+如果“新”父窗口小部件是旧的父窗口小部件，则此函数不执行任何操作。
+
+
+--------------------------------
+## setParent(parent, f)
+
+参数：
+
+- parent – QWidget
+- f – Combination of WindowType
+
+这是一个重载函数。
+
+此函数还将小部件标志 f 作为参数。
+
+
+--------------------------------
+## setScreen(arg__1)
+
+参数：
+
+- arg__1 – QScreen
+
+设置小部件应在哪个屏幕上显示。
+
+设置屏幕只对窗口有意义。如有必要，小部件的窗口将在屏幕上重新创建。
+
+
+--------------------------------
+## setShortcutAutoRepeat(id[, enable=true])
+
+参数：
+
+- id – int
+- enable – bool
+
+如果 enable 为真，则启用具有给定 id 的快捷方式的自动重复；否则，禁用该功能。
+
+
+--------------------------------
+## setShortcutEnabled(id[, enable=true])
+
+参数：
+
+- id – int
+- enable – bool
+
+如果 enable 为真，则启用具有给定 id 的快捷方式；否则禁用该快捷方式。
+
+
+--------------------------------
+## setSizeIncrement(arg__1)
+
+参数：
+
+- arg__1 – QSize
+
+属性 sizeIncrement 的设置者。
+
+
+--------------------------------
+## setSizeIncrement(w, h)
+
+参数：
+
+- w – int
+- h – int
+
+这是一个重载函数。
+
+将 x（宽度）尺寸增量设置为 w，将 y（高度）尺寸增量设置为 h。
+
+
+--------------------------------
+## setSizePolicy(horizontal, vertical)
+
+参数：
+
+- horizontal – Policy
+- vertical – Policy
+
+这是一个重载函数。
+
+将小部件的尺寸策略设置为水平和垂直，具有标准拉伸并且没有高度与宽度。
+
+
+--------------------------------
+## setSizePolicy(arg__1)
+
+参数：
+
+- arg__1 – QSizePolicy
+
+属性 sizePolicy 的设置者。
+
+
+--------------------------------
+## setStatusTip(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 statusTip 的设置者。
+
+
+--------------------------------
+## setStyle(arg__1)
+
+参数：
+
+- arg__1 – QStyle
+
+将小部件的 GUI 样式设置为 style。样式对象的所有权不会转移。
+
+如果未设置样式，小部件将改用应用程序的样式 style()。
+
+设置小部件的样式对现有或未来的子小部件没有影响。
+
+
+--------------------------------
+## setStyleSheet(styleSheet)
+
+参数：
+
+- styleSheet – str
+
+属性 styleSheet 的设置者。
+
+
+--------------------------------
+## static setTabOrder(arg__1, arg__2)
+
+参数：
+
+- arg__1 – QWidget
+- arg__2 – QWidget
+
+将第二个小部件放在焦点顺序中第一个小部件之后。
+
+它有效地将第二个小部件从其焦点链中移除，并将其插入到第一个小部件之后。
+
+请注意，由于第二个小部件的选项卡顺序已更改，因此您应该按如下方式对链进行排序：
+
+```python
+setTabOrder(a, b) # a to b
+setTabOrder(b, c) # a to b to c
+setTabOrder(c, d) # a to b to c to d
+```
+
+不是这样的：
+
+```python
+# WRONG
+setTabOrder(c, d) # c to d
+setTabOrder(a, b) # a to b AND c to d
+setTabOrder(b, c) # a to b to c, but not c to d
+```
+
+如果第一个或第二个具有焦点代理，则 setTabOrder() 会正确替换代理。
+
+
+--------------------------------
+## setTabletTracking(enable)
+
+参数：
+
+- enable – bool
+
+属性 tabletTracking 的设置者。
+
+
+--------------------------------
+## setToolTip(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 toolTip 的设置者。
+
+
+--------------------------------
+## setToolTipDuration(msec)
+
+参数：
+
+- msec – int
+
+属性 toolTipDuration 的设置者。
+
+
+--------------------------------
+## setUpdatesEnabled(enable)
+
+参数：
+
+- enable – bool
+
+属性 updatesEnabled 的设置者。
+
+
+--------------------------------
+## setVisible(visible)
+
+参数：
+
+- visible – bool
+
+属性的设置者可见。
+
+
+--------------------------------
+## setWhatsThis(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 whatsThis 的设置者。
+
+
+--------------------------------
+## setWindowFilePath(filePath)
+
+参数：
+
+- filePath – str
+
+属性 windowFilePath 的设置器。
+
+
+--------------------------------
+## setWindowFlag(arg__1[, on=true])
+
+参数：
+
+- arg__1 – WindowType
+- on – bool
+
+如果为真则设置此小部件上的窗口标志flag；否则清除该标志。
+
+
+--------------------------------
+## setWindowFlags(type)
+
+参数：
+
+- type – Combination of WindowType
+
+
+--------------------------------
+## setWindowIcon(icon)
+
+参数：
+
+- icon – QIcon
+
+属性 windowIcon 的设置者。
+
+
+--------------------------------
+## setWindowIconText(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 windowIconText 的设置者。
+
+
+--------------------------------
+## setWindowModality(windowModality)
+
+参数：
+
+- windowModality – WindowModality
+
+属性 windowModality 的设置者。
+
+
+--------------------------------
+## setWindowModified(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性 windowModified 的设置者。
+
+
+--------------------------------
+## setWindowOpacity(level)
+
+参数：
+
+- level – float
+
+
+--------------------------------
+## setWindowRole(arg__1)
+
+参数：
+
+- arg__1 – str
+
+将窗口的角色设置为 role。这只对 X11 上的窗口有意义。
+
+
+--------------------------------
+## setWindowState(state)
+
+参数：
+
+- state – Combination of WindowState
+
+将窗口状态设置为 windowState。窗口状态是 Qt::WindowState 的 OR 组合：Qt::WindowMinimized、Qt::WindowMaximized、Qt::WindowFullScreen 和 Qt::WindowActive。
+
+如果窗口不可见（即 isVisible() 返回 false），则调用 show() 时窗口状态将生效。对于可见窗口，更改是即时的。例如，要在全屏和正常模式之间切换，请使用以下代码：
+
+```python
+w.setWindowState(w.windowState() ^ Qt.WindowFullScreen)
+```
+
+要恢复并激活最小化的窗口（同时保留其最大化和/或全屏状态），请使用以下命令：
+
+```python
+w.setWindowState((w.windowState()  ~Qt.WindowMinimized) | Qt.WindowActive)
+```
+
+调用此函数将隐藏小部件。您必须调用 show() 才能使小部件再次可见。
+
+当窗口状态发生变化时，小部件会收到 QEvent::WindowStateChange 类型的 changeEvent()。
+
+
+--------------------------------
+## setWindowTitle(arg__1)
+
+参数：
+
+- arg__1 – str
+
+属性 windowTitle 的设置者。
+
+
+--------------------------------
+## show()
+
+显示小部件及其子小部件。
+
+对于子窗口，这相当于调用 setVisible (true)。否则，这相当于调用 showFullScreen() 、 showMaximized() 或 setVisible (true)，具体取决于平台对窗口标志的默认行为。
+
+
+--------------------------------
+## showEvent(event)
+
+参数：
+
+- event – QShowEvent
+
+此事件处理程序可以在子类中重新实现，以接收在事件参数中传递的小部件显示事件。
+
+非自发显示事件在小部件显示之前立即发送给小部件。窗口的自发显示事件随后传递。
+
+
+--------------------------------
+## showFullScreen()
+
+以全屏模式显示小部件。
+
+调用此函数仅影响窗口。
+
+要从全屏模式返回，请调用 showNormal() 或 close()。
+
+另一种方法是完全绕过窗口管理器，并使用 Qt::X11BypassWindowManagerHint 标志创建一个窗口。但这还有其他严重问题，例如键盘焦点损坏以及桌面更改或用户调出其他窗口时产生非常奇怪的效果。
+
+遵循现代后 ICCCM 规范的 X11 窗口管理器正确支持全屏模式。
+
+在 macOS 上，全屏显示窗口会使整个应用程序处于全屏模式，为其提供专用桌面。在应用程序以全屏模式运行时显示另一个窗口可能会自动使该窗口也全屏。为防止这种情况，请在显示另一个窗口之前通过调用 showNormal() 或全屏窗口上的 close() 退出全屏模式。
+
+
+--------------------------------
+## showMaximized()
+
+显示最大化的小部件。
+
+调用此函数仅影响窗口。
+
+在 X11 上，此功能可能无法与某些窗口管理器正常工作。请参阅窗口几何文档以了解说明。
+
+
+--------------------------------
+## showMinimized()
+
+将小部件最小化显示为图标。
+
+调用此函数只会影响窗口。
+
+
+--------------------------------
+## showNormal()
+
+在窗口小部件最大化或最小化后恢复它​​。
+
+调用此函数只会影响窗口。
+
+
+--------------------------------
+## size()
+
+返回类型：QSize
+
+属性 size 的获取器。
+
+
+--------------------------------
+## sizeHint()
+
+返回类型：QSize
+
+属性 sizeHint 的获取方法。
+
+
+--------------------------------
+## sizeIncrement()
+
+返回类型：QSize
+
+属性 sizeIncrement 的获取器。
+
+
+--------------------------------
+## sizePolicy()
+
+返回类型：QSizePolicy
+
+属性 sizePolicy 的获取器。
+
+
+--------------------------------
+## stackUnder(arg__1)
+
+参数：
+
+- arg__1 – QWidget
+
+将小部件放置在父小部件堆栈中的 w 下。
+
+要实现此功能，小部件本身和 w 必须是同级。
+
+
+--------------------------------
+## statusTip()
+
+返回类型：str
+
+属性 statusTip 的获取器。
+
+
+--------------------------------
+## style()
+
+返回类型：QStyle
+
+
+--------------------------------
+## styleSheet()
+
+返回类型：str
+
+属性 styleSheet 的获取器。
+
+
+--------------------------------
+## tabletEvent(event)
+
+参数：
+
+- event – QTabletEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件的平板电脑事件。
+
+如果您重新实现此处理程序，则非常重要的是，如果您不处理该事件，则请忽略（）该事件，以便小部件的父级可以解释它。
+
+默认实现将忽略该事件。
+
+如果关闭平板电脑跟踪，则仅当触控笔与平板电脑接触，或者在移动触控笔时按下至少一个触控笔按钮时，才会发生平板电脑移动事件。 如果打开平板电脑跟踪，即使触控笔悬停在平板电脑附近，没有按下任何按钮，也会发生平板电脑移动事件。
+
+
+--------------------------------
+## testAttribute(arg__1)
+
+参数：
+
+- arg__1 – WidgetAttribute
+
+返回类型：bool
+
+如果此小部件上设置了属性，则返回 true；否则返回 false。
+
+
+--------------------------------
+## toolTip()
+
+返回类型：str
+
+属性 toolTip 的获取器。
+
+
+--------------------------------
+## toolTipDuration()
+
+返回类型：int
+
+属性 toolTipDuration 的获取器。
+
+
+--------------------------------
+## topLevelWidget()
+
+返回类型：QWidget
+
+改用 window()。
+
+
+--------------------------------
+## underMouse()
+
+返回类型：bool
+
+如果小部件位于鼠标光标下方，则返回 true；否则返回 false。
+
+在拖放操作期间，此值无法正确更新。
+
+
+--------------------------------
+## ungrabGesture(type)
+
+参数：
+
+- type – GestureType
+
+取消对小部件的给定手势类型的订阅。
+
+
+--------------------------------
+## unsetCursor()
+
+属性光标的重置功能。
+
+
+--------------------------------
+## unsetLayoutDirection()
+
+重置属性layoutDirection的功能。
+
+
+--------------------------------
+## unsetLocale()
+
+属性 locale 的重置功能。
+
+
+--------------------------------
+## update(arg__1)
+
+参数：
+
+- arg__1 – QRegion
+
+这是一个重载函数。
+
+此版本重新绘制小部件内的区域 rgn。
+
+
+--------------------------------
+## update(x, y, w, h)
+
+参数：
+
+- x – int
+- y – int
+- w – int
+- h – int
+
+这是一个重载函数。
+
+此版本更新小部件内的矩形 (x, y, w, h)。
+
+
+--------------------------------
+## update(arg__1)
+
+参数：
+
+- arg__1 – QRect
+
+这是一个重载函数。
+
+此版本更新小部件内的矩形。
+
+
+--------------------------------
+## update()
+
+更新小部件，除非更新被禁用或小部件被隐藏。
+
+此函数不会导致立即重新绘制；相反，它会在 Qt 返回主事件循环时安排绘制事件进行处理。这允许 Qt 优化速度，并减少对 repaint() 的调用所产生的闪烁。
+
+多次调用 update() 通常只会导致一次 paintEvent() 调用。
+
+Qt 通常会在 paintEvent() 调用之前擦除小部件的区域。如果设置了 Qt::WA_OpaquePaintEvent 小部件属性，则小部件负责用不透明颜色绘制其所有像素。
+
+
+--------------------------------
+## updateGeometry()
+
+通知布局系统此小部件已更改，可能需要更改几何形状。
+
+如果 sizeHint() 或 sizePolicy() 已更改，则调用此函数。
+
+对于明确隐藏的小部件，updateGeometry() 为无操作。小部件显示后，布局系统将立即收到通知。
+
+
+--------------------------------
+## updateMicroFocus([query=Qt.ImQueryAll])
+
+参数：
+
+- query – InputMethodQuery
+
+更新小部件的微焦点并通知输入方法查询指定的状态已改变。
+
+
+--------------------------------
+## updatesEnabled()
+
+返回类型：bool
+
+属性 updatesEnabled 的获取器。
+
+
+--------------------------------
+## visibleRegion()
+
+返回类型：QRegion
+
+返回可发生绘制事件的未被遮挡的区域。
+
+对于可见的小部件，这是未被其他小部件覆盖的区域的近似值；否则，这是一个空区域。
+
+repaint() 函数会在必要时调用此函数，因此一般来说您不需要调用它。
+
+
+--------------------------------
+## whatsThis()
+
+返回类型：str
+
+属性 whatsThis 的获取器。
+
+
+--------------------------------
+## wheelEvent(event)
+
+参数：
+
+- event – QWheelEvent
+
+此事件处理程序（用于事件）可在子类中重新实现，以接收小部件的滚轮事件。
+
+如果您重新实现此处理程序，则非常重要的是，如果您不处理该事件，则请忽略（）该事件，以便小部件的父级可以解释它。
+
+默认实现会忽略该事件。
+
+
+--------------------------------
+## winId()
+
+返回类型：WId
+
+返回窗口小部件的窗口系统标识符。
+
+原则上是可移植的，但如果您使用它，您可能要做一些不可移植的事情。请小心。
+
+如果窗口小部件是非本机的（外来）并且在其上调用 winId()，则将为该窗口小部件提供本机句柄。
+
+此值可能会在运行时更改。窗口系统标识符更改后，将向窗口小部件发送类型为 QEvent::WinIdChange 的事件。
+
+
+--------------------------------
+## window()
+
+返回类型：QWidget
+
+返回此小部件的窗口，即具有（或可能具有）窗口系统框架的下一个祖先小部件。
+
+如果小部件是窗口，则返回小部件本身。
+
+典型用法是更改窗口标题：
+
+```python
+aWidget.window().setWindowTitle("New Window Title")
+```
+
+
+--------------------------------
+## windowFilePath()
+
+返回类型：str
+
+属性 windowFilePath 的获取器。
+
+
+--------------------------------
+## windowFlags()
+
+返回类型：Combination of WindowType
+
+
+--------------------------------
+## windowHandle()
+
+返回类型：QWindow
+
+如果这是本机小部件，则返回关联的 QWindow。否则返回 null。
+
+本机小部件包括顶层小部件、QGLWidget 和调用 winId() 的子小部件。
+
+
+--------------------------------
+## windowIcon()
+
+返回类型：QIcon
+
+属性 windowIcon 的获取器。
+
+
+--------------------------------
+## windowIconChanged(icon)
+
+参数：
+
+- icon – QIcon
+
+当窗口图标发生变化时，将发出此信号，并以新图标作为参数。
+
+属性 windowIcon 的通知信号。
+
+
+--------------------------------
+## windowIconText()
+
+返回类型：str
+
+属性 windowIconText 的获取器。
+
+
+--------------------------------
+## windowIconTextChanged(iconText)
+
+参数：
+
+- iconText – str
+
+当窗口的图标文本发生更改时，将发出此信号，并以新的 iconText 作为参数。
+
+此信号已弃用。
+
+属性 windowIconText 的通知信号。
+
+
+--------------------------------
+## windowModality()
+
+返回类型：WindowModality
+
+属性 windowModality 的获取器。
+
+
+--------------------------------
+## windowOpacity()
+
+返回类型：float
+
+
+--------------------------------
+## windowRole()
+
+返回类型：str
+
+返回窗口的角色，或者一个空字符串。
+
+
+--------------------------------
+## windowState()
+
+返回类型：Combination of WindowState
+
+返回当前窗口状态。窗口状态是 Qt::WindowState：Qt::WindowMinimized、Qt::WindowMaximized、Qt::WindowFullScreen 和 Qt::WindowActive 的或组合。
+
+
+--------------------------------
+## windowTitle()
+
+返回类型：str
+
+属性 windowTitle 的获取器。
+
+
+--------------------------------
+## windowTitleChanged(title)
+
+参数：
+
+- title – str
+
+当窗口标题发生改变时，将发出此信号，并以新标题作为参数。
+
+属性 windowTitle 的通知信号。
+
+
+--------------------------------
+## windowType()
+
+返回类型：WindowType
+
+返回此小部件的窗口类型。这与 windowFlags() 和 Qt::WindowType_Mask 相同。
+
+
+--------------------------------
+## x()
+
+返回类型：int
+
+属性 x 的获取器。
+
+
+--------------------------------
+## y()
+
+返回类型：int
+
+属性 y 的获取者。

From 53ca0ba610e084a9bf53e6eb37c31cc85d280089 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Wed, 7 Aug 2024 18:39:08 +0800
Subject: [PATCH 33/38] [PyQt] Add QComboBox doc.

---
 Class-3/PyQt6/Class-0/QtWidget/QComboBox.md | 1224 +++++++++++++++++++
 1 file changed, 1224 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QComboBox.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md
new file mode 100644
index 0000000..71991d4
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md
@@ -0,0 +1,1224 @@
+
+[Chinese doc](QComboBox.CN.md)
+
+# class QComboBox
+
+The QComboBox widget combines a button with a dropdown list.
+
+
+# Synopsis
+
+## Properties
+
+- [count]()
+
+    The number of items in the combobox.
+
+- [currentData]()
+
+    The data for the current item.
+
+- [currentIndex]()
+
+    The index of the current item in the combobox.
+
+- [currentText]()
+
+    The current text.
+
+- [duplicatesEnabled]()
+
+    Whether the user can enter duplicate items into the combobox.
+
+- [editable]()
+
+    Whether the combo box can be edited by the user.
+
+- [frame]()
+
+    Whether the combo box draws itself with a frame.
+
+- [iconSize]()
+
+    The size of the icons shown in the combobox.
+
+- [insertPolicy]()
+
+    The policy used to determine where user-inserted items should appear in the combobox.
+
+- [maxCount]()
+
+    The maximum number of items allowed in the combobox.
+
+- [maxVisibleItems]()
+
+    The maximum allowed size on screen of the combo box, measured in items.
+
+- [minimumContentsLength]()
+
+    The minimum number of characters that should fit into the combobox.
+
+- [modelColumn]()
+
+    The column in the model that is visible.
+
+- [placeholderText]()
+
+    Sets a placeholderText text shown when no valid index is set.
+
+- [sizeAdjustPolicy]()
+
+    The policy describing how the size of the combobox changes when the content changes.
+
+
+## Methods
+
+- [def \_\_init__()]()
+
+- [def addItem()]()
+
+- [def addItems()]()
+
+- [def completer()]()
+
+- [def count()]()
+
+- [def currentData()]()
+
+- [def currentIndex()]()
+
+- [def currentText()]()
+
+- [def duplicatesEnabled()]()
+
+- [def findData()]()
+
+- [def findText()]()
+
+- [def hasFrame()]()
+
+- [def iconSize()]()
+
+- [def inputMethodQuery()]()
+
+- [def insertItem()]()
+
+- [def insertItems()]()
+
+- [def insertPolicy()]()
+
+- [def insertSeparator()]()
+
+- [def isEditable()]()
+
+- [def itemData()]()
+
+- [def itemDelegate()]()
+
+- [def itemIcon()]()
+
+- [def itemText()]()
+
+- [def lineEdit()]()
+
+- [def maxCount()]()
+
+- [def maxVisibleItems()]()
+
+- [def minimumContentsLength()]()
+
+- [def model()]()
+
+- [def modelColumn()]()
+
+- [def placeholderText()]()
+
+- [def removeItem()]()
+
+- [def rootModelIndex()]()
+
+- [def setCompleter()]()
+
+- [def setDuplicatesEnabled()]()
+
+- [def setEditable()]()
+
+- [def setFrame()]()
+
+- [def setIconSize()]()
+
+- [def setInsertPolicy()]()
+
+- [def setItemData()]()
+
+- [def setItemDelegate()]()
+
+- [def setItemIcon()]()
+
+- [def setItemText()]()
+
+- [def setLineEdit()]()
+
+- [def setMaxCount()]()
+
+- [def setMaxVisibleItems()]()
+
+- [def setMinimumContentsLength()]()
+
+- [def setModelColumn()]()
+
+- [def setPlaceholderText()]()
+
+- [def setRootModelIndex()]()
+
+- [def setSizeAdjustPolicy()]()
+
+- [def setValidator()]()
+
+- [def setView()]()
+
+- [def sizeAdjustPolicy()]()
+
+- [def validator()]()
+
+- [def view()]()
+
+
+## Virtual methods
+
+- [def hidePopup()]()
+
+- [def initStyleOption()]()
+
+- [def setModel()]()
+
+- [def showPopup()]()
+
+
+## Slots
+
+- [def clear()]()
+
+- [def clearEditText()]()
+
+- [def setCurrentIndex()]()
+
+- [def setCurrentText()]()
+
+- [def setEditText()]()
+
+
+## Signals
+
+- [def activated()]()
+
+- [def currentIndexChanged()]()
+
+- [def currentTextChanged()]()
+
+- [def editTextChanged()]()
+
+- [def highlighted()]()
+
+- [def textActivated()]()
+
+- [def textHighlighted()]()
+
+
+# Detailed Description
+
+## Display Features
+
+A QComboBox is a compact way to present a list of options to the user.
+
+A combobox is a selection widget that shows the current item, and pops up a list of selectable items when clicked. Comboboxes can contain pixmaps as well as strings if the insertItem() and setItemText() functions are suitably overloaded.
+
+
+## Editing Features
+
+A combobox may be editable, allowing the user to modify each item in the list. For editable comboboxes, the function clearEditText() is provided, to clear the displayed string without changing the combobox’s contents.
+
+When the user enters a new string in an editable combobox, the widget may or may not insert it, and it can insert it in several locations. The default policy is InsertAtBottom but you can change this using setInsertPolicy() .
+
+It is possible to constrain the input to an editable combobox using QValidator; see setValidator() . By default, any input is accepted.
+
+A combobox can be populated using the insert functions, insertItem() and insertItems() for example. Items can be changed with setItemText() . An item can be removed with removeItem() and all items can be removed with clear() . The text of the current item is returned by currentText() , and the text of a numbered item is returned with text(). The current item can be set with setCurrentIndex() . The number of items in the combobox is returned by count() ; the maximum number of items can be set with setMaxCount() . You can allow editing using setEditable() . For editable comboboxes you can set auto-completion using setCompleter() and whether or not the user can add duplicates is set with setDuplicatesEnabled() .
+
+
+## Signals
+
+There are three signals emitted if the current item of a combobox changes: currentIndexChanged() , currentTextChanged() , and activated() . currentIndexChanged() and currentTextChanged() are always emitted regardless if the change was done programmatically or by user interaction, while activated() is only emitted when the change is caused by user interaction. The highlighted() signal is emitted when the user highlights an item in the combobox popup list. All three signals exist in two versions, one with a QString argument and one with an int argument. If the user selects or highlights a pixmap, only the int signals are emitted. Whenever the text of an editable combobox is changed, the editTextChanged() signal is emitted.
+
+
+## Model/View Framework
+
+QComboBox uses the model/view framework for its popup list and to store its items. By default a QStandardItemModel stores the items and a QListView subclass displays the popuplist. You can access the model and view directly (with model() and view() ), but QComboBox also provides functions to set and get item data, for example, setItemData() and itemText() . You can also set a new model and view (with setModel() and setView() ). For the text and icon in the combobox label, the data in the model that has the Qt::DisplayRole and Qt::DecorationRole is used.
+
+
+--------------------------------
+## class InsertPolicy
+
+This enum specifies what the QComboBox should do when a new string is entered by the user.
+
+| Constant                       | Description                                                      |
+| ------------------------------ | ---------------------------------------------------------------- |
+| QComboBox.NoInsert             | The string will not be inserted into the combobox.               |
+| QComboBox.InsertAtTop          | The string will be inserted as the first item in the combobox.   |
+| QComboBox.InsertAtCurrent      | The current item will be replaced by the string.                 |
+| QComboBox.InsertAtBottom       | The string will be inserted after the last item in the combobox. |
+| QComboBox.InsertAfterCurrent   | The string is inserted after the current item in the combobox.   |
+| QComboBox.InsertBeforeCurrent  | The string is inserted before the current item in the combobox.  |
+| QComboBox.InsertAlphabetically | The string is inserted in the alphabetic order in the combobox.  |
+
+
+--------------------------------
+## class SizeAdjustPolicy
+
+This enum specifies how the size hint of the QComboBox should adjust when new content is added or content changes.
+
+| Constant                              | Description                                                          |
+| ------------------------------------- | -------------------------------------------------------------------- |
+| QComboBox.AdjustToContents            | The combobox will always adjust to the contents                      |
+| QComboBox.AdjustToContentsOnFirstShow | The combobox will adjust to its contents the first time it is shown. |
+| QComboBox.AdjustToMinimumContentsLengthWithIcon | The combobox will adjust to minimumContentsLength plus space for an icon. For performance reasons use this policy on large models. |
+
+
+--------------------------------
+## property count : int
+
+This property holds the number of items in the combobox..
+
+By default, for an empty combo box, this property has a value of 0.
+
+Access functions:
+
+- count()
+
+
+--------------------------------
+## property currentData : object
+
+This property holds the data for the current item.
+
+By default, for an empty combo box or a combo box in which no current item is set, this property contains an invalid QVariant.
+
+Access functions:
+
+- currentData()
+
+
+--------------------------------
+## property currentIndex : int
+
+This property holds the index of the current item in the combobox..
+
+The current index can change when inserting or removing items.
+
+By default, for an empty combo box or a combo box in which no current item is set, this property has a value of -1.
+
+Access functions:
+
+- currentIndex()
+- setCurrentIndex()
+- Signal currentIndexChanged()
+
+
+--------------------------------
+## property currentText : str
+
+This property holds the current text.
+
+If the combo box is editable, the current text is the value displayed by the line edit. Otherwise, it is the value of the current item or an empty string if the combo box is empty or no current item is set.
+
+The setter setCurrentText() simply calls setEditText() if the combo box is editable. Otherwise, if there is a matching text in the list, currentIndex is set to the corresponding index.
+
+Access functions:
+
+- currentText()
+- setCurrentText()
+- Signal currentTextChanged()
+
+
+--------------------------------
+## property duplicatesEnabled : bool
+
+This property holds whether the user can enter duplicate items into the combobox..
+
+Note that it is always possible to programmatically insert duplicate items into the combobox.
+
+By default, this property is false (duplicates are not allowed).
+
+Access functions:
+
+- duplicatesEnabled()
+- setDuplicatesEnabled()
+
+
+--------------------------------
+## property editable : bool
+
+This property holds whether the combo box can be edited by the user..
+
+By default, this property is false. The effect of editing depends on the insert policy.
+
+Access functions:
+
+- isEditable()
+- setEditable()
+
+
+--------------------------------
+## property frame : bool
+
+This property holds whether the combo box draws itself with a frame..
+
+If enabled (the default) the combo box draws itself inside a frame, otherwise the combo box draws itself without any frame.
+
+Access functions:
+
+- hasFrame()
+- setFrame()
+
+
+--------------------------------
+## property iconSize : QSize
+
+This property holds the size of the icons shown in the combobox..
+
+Unless explicitly set this returns the default value of the current style. This size is the maximum size that icons can have; icons of smaller size are not scaled up.
+
+Access functions:
+
+- iconSize()
+- setIconSize()
+
+
+--------------------------------
+## property insertPolicy : QComboBox.InsertPolicy
+
+This property holds the policy used to determine where user-inserted items should appear in the combobox..
+
+The default value is InsertAtBottom , indicating that new items will appear at the bottom of the list of items.
+
+Access functions:
+
+- insertPolicy()
+- setInsertPolicy()
+
+
+--------------------------------
+## property maxCount : int
+
+This property holds the maximum number of items allowed in the combobox..
+
+
+By default, this property’s value is derived from the highest signed integer available (typically 2147483647).
+
+Access functions:
+
+- maxCount()
+- setMaxCount()
+
+
+--------------------------------
+## property maxVisibleItems : int
+
+This property holds the maximum allowed size on screen of the combo box, measured in items.
+
+By default, this property has a value of 10.
+
+Access functions:
+
+- maxVisibleItems()
+- setMaxVisibleItems()
+
+
+--------------------------------
+## property minimumContentsLength : int
+
+This property holds the minimum number of characters that should fit into the combobox..
+
+The default value is 0.
+
+If this property is set to a positive value, the minimumSizeHint() and sizeHint() take it into account.
+
+Access functions:
+
+- minimumContentsLength()
+- setMinimumContentsLength()
+
+
+--------------------------------
+## property modelColumn : int
+
+This property holds the column in the model that is visible..
+
+If set prior to populating the combo box, the pop-up view will not be affected and will show the first column (using this property’s default value).
+
+By default, this property has a value of 0.
+
+Access functions:
+
+- modelColumn()
+- setModelColumn()
+
+
+--------------------------------
+## property placeholderText : str
+
+This property holds Sets a placeholderText text shown when no valid index is set..
+
+The placeholderText will be shown when an invalid index is set. The text is not accessible in the dropdown list. When this function is called before items are added the placeholder text will be shown, otherwise you have to call setCurrentIndex (-1) programmatically if you want to show the placeholder text. Set an empty placeholder text to reset the setting.
+
+When the QComboBox is editable, use setPlaceholderText() instead.
+
+Access functions:
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property sizeAdjustPolicy : QComboBox.SizeAdjustPolicy
+
+This property holds the policy describing how the size of the combobox changes when the content changes..
+
+The default value is AdjustToContentsOnFirstShow .
+
+Access functions:
+
+- sizeAdjustPolicy()
+- setSizeAdjustPolicy()
+
+
+--------------------------------
+## __init__([parent=None])
+
+Parameters:
+
+- parent – QWidget
+
+Constructs a combobox with the given parent, using the default model QStandardItemModel.
+
+
+--------------------------------
+## activated(index)
+
+Parameters:
+
+- index – int
+
+This signal is sent when the user chooses an item in the combobox. The item’s index is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged() or currentTextChanged() .
+
+
+--------------------------------
+## addItem(text[, userData=None])
+
+Parameters:
+
+- text – str
+
+userData – object
+
+Adds an item to the combobox with the given text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.
+
+
+--------------------------------
+## addItem(icon, text[, userData=None])
+
+Parameters:
+
+- icon – QIcon
+- text – str
+- userData – object
+
+Adds an item to the combobox with the given icon and text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.
+
+
+--------------------------------
+## addItems(texts)
+
+Parameters:
+
+- texts – list of strings
+
+Adds each of the strings in the given texts to the combobox. Each item is appended to the list of existing items in turn.
+
+
+--------------------------------
+## clear()
+
+Clears the combobox, removing all items.
+
+Note: If you have set an external model on the combobox this model will still be cleared when calling this function.
+
+
+--------------------------------
+## clearEditText()
+
+Clears the contents of the line edit used for editing in the combobox.
+
+
+--------------------------------
+## completer()
+
+Return type: QCompleter
+
+Returns the completer that is used to auto complete text input for the combobox.
+
+
+--------------------------------
+## count()
+
+Return type: int
+
+Getter of property count  .
+
+
+--------------------------------
+## currentData([role=Qt.UserRole])
+
+Parameters:
+
+- role – int
+
+Return type: object
+
+
+--------------------------------
+## currentIndex()
+
+Return type: int
+
+Getter of property currentIndex  .
+
+
+--------------------------------
+## currentIndexChanged(index)
+
+Parameters:
+
+- index – int
+
+This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item’s index is passed or -1 if the combobox becomes empty or the currentIndex was reset.
+
+Notification signal of property currentIndex  .
+
+
+--------------------------------
+## currentText()
+
+Return type: str
+
+Getter of property currentText  .
+
+
+--------------------------------
+## currentTextChanged(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is emitted whenever currentText changes. The new value is passed as text.
+
+
+Notification signal of property currentText  .
+
+
+--------------------------------
+## duplicatesEnabled()
+
+Return type: bool
+
+Getter of property duplicatesEnabled  .
+
+
+--------------------------------
+## editTextChanged(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is emitted when the text in the combobox’s line edit widget is changed. The new text is specified by text.
+
+
+--------------------------------
+## findData(data[, role=Qt.UserRole[, flags=static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)]])
+
+Parameters:
+
+- data – object
+- role – int
+- flags – Combination of MatchFlag
+
+Return type: int
+
+Returns the index of the item containing the given data for the given role; otherwise returns -1.
+
+The flags specify how the items in the combobox are searched.
+
+
+--------------------------------
+## findText(text[, flags=static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)])
+
+Parameters:
+
+- text – str
+- flags – Combination of MatchFlag
+
+Return type: int
+
+Returns the index of the item containing the given text; otherwise returns -1.
+
+The flags specify how the items in the combobox are searched.
+
+
+--------------------------------
+## hasFrame()
+
+Return type: bool
+
+Getter of property frame  .
+
+--------------------------------
+## hidePopup()
+
+Hides the list of items in the combobox if it is currently visible and resets the internal state, so that if the custom pop-up was shown inside the reimplemented showPopup() , then you also need to reimplement the hidePopup() function to hide your custom pop-up and call the base class implementation to reset the internal state whenever your custom pop-up widget is hidden.
+
+
+--------------------------------
+## highlighted(index)
+
+Parameters:
+
+- index – int
+
+This signal is sent when an item in the combobox popup list is highlighted by the user. The item’s index is passed.
+
+
+--------------------------------
+## iconSize()
+
+Return type: QSize
+
+Getter of property iconSize  .
+
+
+--------------------------------
+## initStyleOption(option)
+
+Parameters:
+
+- option – QStyleOptionComboBox
+
+Initialize option with the values from this QComboBox . This method is useful for subclasses when they need a QStyleOptionComboBox , but don’t want to fill in all the information themselves.
+
+
+--------------------------------
+## inputMethodQuery(query, argument)
+
+Parameters:
+
+- query – InputMethodQuery
+- argument – object
+
+Return type: object
+
+
+--------------------------------
+## insertItem(index, icon, text[, userData=None])
+
+Parameters:
+
+- index – int
+- icon – QIcon
+- text – str
+- userData – object
+
+Inserts the icon, text and userData (stored in the Qt::UserRole) into the combobox at the given index.
+
+If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.
+
+
+--------------------------------
+## insertItem(index, text[, userData=None])
+
+Parameters:
+
+- index – int
+- text – str
+- userData – object
+
+Inserts the text and userData (stored in the Qt::UserRole) into the combobox at the given index.
+
+If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.
+
+
+--------------------------------
+## insertItems(index, texts)
+
+Parameters:
+
+- index – int
+- texts – list of strings
+
+Inserts the strings from the list into the combobox as separate items, starting at the index specified.
+
+If the index is equal to or higher than the total number of items, the new items are appended to the list of existing items. If the index is zero or negative, the new items are prepended to the list of existing items.
+
+
+--------------------------------
+## insertPolicy()
+
+Return type: InsertPolicy
+
+Getter of property insertPolicy  .
+
+
+--------------------------------
+## insertSeparator(index)
+
+Parameters:
+
+- index – int
+
+Inserts a separator item into the combobox at the given index.
+
+If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.
+
+
+--------------------------------
+## isEditable()
+
+Return type: bool
+
+Getter of property editable  .
+
+
+--------------------------------
+## itemData(index[, role=Qt.UserRole])
+
+Parameters:
+
+- index – int
+- role – int
+
+Return type: object
+
+Returns the data for the given role in the given index in the combobox, or an invalid QVariant if there is no data for this role.
+
+
+--------------------------------
+## itemDelegate()
+
+Return type: QAbstractItemDelegate
+
+Returns the item delegate used by the popup list view.
+
+
+--------------------------------
+## itemIcon(index)
+
+Parameters:
+
+- index – int
+
+Return type: QIcon
+
+Returns the icon for the given index in the combobox.
+
+
+--------------------------------
+## itemText(index)
+
+Parameters:
+
+- index – int
+
+Return type: str
+
+Returns the text for the given index in the combobox.
+
+
+--------------------------------
+## lineEdit()
+
+Return type: QLineEdit
+
+Returns the line edit used to edit items in the combobox, or None if there is no line edit.
+
+Only editable combo boxes have a line edit.
+
+
+--------------------------------
+## maxCount()
+
+Return type: int
+
+Getter of property maxCount  .
+
+
+--------------------------------
+## maxVisibleItems()
+
+Return type: int
+
+Getter of property maxVisibleItems  .
+
+
+--------------------------------
+## minimumContentsLength()
+
+Return type: int
+
+Getter of property minimumContentsLength  .
+
+
+--------------------------------
+## model()
+
+Return type: QAbstractItemModel
+
+Returns the model used by the combobox.
+
+
+--------------------------------
+## modelColumn()
+
+Return type: int
+
+Getter of property modelColumn  .
+
+
+--------------------------------
+## placeholderText()
+
+Return type: str
+
+Getter of property placeholderText  .
+
+
+--------------------------------
+## removeItem(index)
+
+Parameters:
+
+- index – int
+
+Removes the item at the given index from the combobox. This will update the current index if the index is removed.
+
+This function does nothing if index is out of range.
+
+
+--------------------------------
+## rootModelIndex()
+
+Return type: QModelIndex
+
+Returns the root model item index for the items in the combobox.
+
+
+--------------------------------
+## setCompleter(c)
+
+Parameters:
+
+- c – QCompleter
+
+Sets the completer to use instead of the current completer. If completer is None, auto completion is disabled.
+
+By default, for an editable combo box, a QCompleter that performs case insensitive inline completion is automatically created.
+
+
+--------------------------------
+## setCurrentIndex(index)
+
+Parameters:
+
+- index – int
+
+Setter of property currentIndex  .
+
+
+--------------------------------
+## setCurrentText(text)
+
+Parameters:
+
+- text – str
+
+Setter of property currentText  .
+
+
+--------------------------------
+## setDuplicatesEnabled(enable)
+
+Parameters:
+
+- enable – bool
+
+Setter of property duplicatesEnabled  .
+
+
+--------------------------------
+## setEditText(text)
+
+Parameters:
+
+- text – str
+
+Sets the text in the combobox’s text edit.
+
+
+--------------------------------
+## setEditable(editable)
+
+Parameters:
+
+- editable – bool
+
+Setter of property editable  .
+
+
+--------------------------------
+## setFrame(arg__1)
+
+Parameters:
+
+- arg__1 – bool
+
+Setter of property frame  .
+
+
+--------------------------------
+## setIconSize(size)
+
+Parameters:
+
+- size – QSize
+
+Setter of property iconSize  .
+
+
+--------------------------------
+## setInsertPolicy(policy)
+
+Parameters:
+
+- policy – InsertPolicy
+
+Setter of property insertPolicy  .
+
+
+--------------------------------
+## setItemData(index, value[, role=Qt.UserRole])
+
+Parameters:
+
+- index – int
+- value – object
+- role – int
+
+Sets the data role for the item on the given index in the combobox to the specified value.
+
+
+--------------------------------
+## setItemDelegate(delegate)
+
+Parameters:
+
+- delegate – QAbstractItemDelegate
+
+Sets the item delegate for the popup list view. The combobox takes ownership of the delegate.
+
+Any existing delegate will be removed, but not deleted. QComboBox does not take ownership of delegate.
+
+
+--------------------------------
+## setItemIcon(index, icon)
+
+Parameters:
+
+- index – int
+- icon – QIcon
+
+Sets the icon for the item on the given index in the combobox.
+
+
+--------------------------------
+## setItemText(index, text)
+
+Parameters:
+
+- index – int
+- text – str
+
+Sets the text for the item on the given index in the combobox.
+
+
+--------------------------------
+## setLineEdit(edit)
+
+Parameters:
+
+- edit – QLineEdit
+
+Sets the line edit to use instead of the current line edit widget.
+
+The combo box takes ownership of the line edit.
+
+
+--------------------------------
+## setMaxCount(max)
+
+Parameters:
+
+- max – int
+
+Setter of property maxCount  .
+
+
+--------------------------------
+## setMaxVisibleItems(maxItems)
+
+Parameters:
+
+- maxItems – int
+
+Setter of property maxVisibleItems  .
+
+
+--------------------------------
+## setMinimumContentsLength(characters)
+
+Parameters:
+
+- characters – int
+
+Setter of property minimumContentsLength  .
+
+
+--------------------------------
+## setModel(model)
+
+Parameters:
+
+- model – QAbstractItemModel
+
+Sets the model to be model. model must not be None. If you want to clear the contents of a model, call clear() .
+
+
+--------------------------------
+## setModelColumn(visibleColumn)
+
+Parameters:
+
+- visibleColumn – int
+
+Setter of property modelColumn  .
+
+
+--------------------------------
+## setPlaceholderText(placeholderText)
+
+Parameters:
+
+- placeholderText – str
+
+Setter of property placeholderText  .
+
+
+--------------------------------
+## setRootModelIndex(index)
+
+Parameters:
+
+- index – QModelIndex
+
+Sets the root model item index for the items in the combobox.
+
+
+--------------------------------
+## setSizeAdjustPolicy(policy)
+
+Parameters:
+
+- policy – SizeAdjustPolicy
+
+Setter of property sizeAdjustPolicy  .
+
+
+--------------------------------
+## setValidator(v)
+
+Parameters:
+
+- v – QValidator
+
+Sets the validator to use instead of the current validator.
+
+
+--------------------------------
+## setView(itemView)
+
+Parameters:
+
+- itemView – QAbstractItemView
+
+Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.
+
+Note: If you want to use the convenience views (like QListWidget , QTableWidget or QTreeWidget ), make sure to call setModel() on the combobox with the convenience widgets model before calling this function.
+
+
+--------------------------------
+## showPopup()
+
+Displays the list of items in the combobox. If the list is empty then no items will be shown.
+
+If you reimplement this function to show a custom pop-up, make sure you call hidePopup() to reset the internal state.
+
+
+--------------------------------
+## sizeAdjustPolicy()
+
+Return type: SizeAdjustPolicy
+
+Getter of property sizeAdjustPolicy  .
+
+
+--------------------------------
+## textActivated(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is sent when the user chooses an item in the combobox. The item’s text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged() or currentTextChanged() .
+
+
+--------------------------------
+## textHighlighted(arg__1)
+
+Parameters:
+
+- arg__1 – str
+
+This signal is sent when an item in the combobox popup list is highlighted by the user. The item’s text is passed.
+
+
+--------------------------------
+## validator()
+
+Return type: QValidator
+
+Returns the validator that is used to constrain text input for the combobox.
+
+
+--------------------------------
+## view()
+
+Return type: QAbstractItemView
+
+Returns the list view used for the combobox popup.

From b1106da73dd82fcc1c566ded670d9f63943d772b Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Wed, 7 Aug 2024 19:15:06 +0800
Subject: [PATCH 34/38] [PyQt] Add QComboBox Chinese doc.

---
 .../PyQt6/Class-0/QtWidget/QComboBox.CN.md    | 1219 +++++++++++++++++
 Class-3/PyQt6/Class-0/QtWidget/QComboBox.md   |  179 ++-
 2 files changed, 1306 insertions(+), 92 deletions(-)
 create mode 100644 Class-3/PyQt6/Class-0/QtWidget/QComboBox.CN.md

diff --git a/Class-3/PyQt6/Class-0/QtWidget/QComboBox.CN.md b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.CN.md
new file mode 100644
index 0000000..2c95fb4
--- /dev/null
+++ b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.CN.md
@@ -0,0 +1,1219 @@
+
+[English doc](QComboBox.md)
+
+# class QComboBox
+
+QComboBox 小部件将按钮与下拉列表结合在一起。
+
+
+# Synopsis
+
+## Properties
+
+- [count](#property-count--int)
+
+    组合框中的项目数。
+
+- [currentData](#property-currentdata--object)
+
+    当前项目的数据。
+
+- [currentIndex](#property-currentindex--int)
+
+    组合框中当前项目的索引。
+
+- [currentText](#property-currenttext--str)
+
+    当前文本。
+
+- [duplicatesEnabled](#property-duplicatesenabled--bool)
+
+    用户是否可以在组合框中输入重复的项目。
+
+- [editable](#property-editable--bool)
+
+    组合框是否可以由用户编辑。
+
+- [frame](#property-frame--bool)
+
+    组合框是否用框架绘制自身。
+
+- [iconSize](#property-iconsize--qsize)
+
+    组合框中显示的图标的大小。
+
+- [insertPolicy](#property-insertpolicy--qcomboboxinsertpolicy)
+
+    该策略用于确定用户插入的项目应出现在组合框中的何处。
+
+- [maxCount](#property-maxcount--int)
+
+    组合框中允许的最大项目数。
+
+- [maxVisibleItems](#property-maxvisibleitems--int)
+
+    组合框在屏幕上允许的最大尺寸，以项目为单位。
+
+- [minimumContentsLength](#property-minimumcontentslength--int)
+
+    组合框中应容纳的最小字符数。
+
+- [modelColumn](#property-modelcolumn--int)
+
+    模型中可见的列。
+
+- [placeholderText](#property-placeholdertext--str)
+
+    设置在未设置有效索引时显示的占位符文本。
+
+- [sizeAdjustPolicy](#property-sizeadjustpolicy--qcomboboxsizeadjustpolicy)
+
+    描述当内容改变时组合框的大小如何变化的策略。
+
+
+## Methods
+
+- [def \_\_init__()](#initparentnone)
+
+- [def addItem()](#additemicon-text-userdatanone)
+
+- [def addItems()](#additemstexts)
+
+- [def completer()](#completer)
+
+- [def count()](#count)
+
+- [def currentData()](#currentdataroleqtuserrole)
+
+- [def currentIndex()](#currentindex)
+
+- [def currentText()](#currenttext)
+
+- [def duplicatesEnabled()](#duplicatesenabled)
+
+- [def findData()](#finddatadata-roleqtuserrole-flagsstatic_castqtmatchflagsqtmatchexactlyqtmatchcasesensitive)
+
+- [def findText()](#findtexttext-flagsstatic_castqtmatchflagsqtmatchexactlyqtmatchcasesensitive)
+
+- [def hasFrame()](#hasframe)
+
+- [def iconSize()](#iconsize)
+
+- [def inputMethodQuery()](#inputmethodqueryquery-argument)
+
+- [def insertItem()](#insertitemindex-icon-text-userdatanone)
+
+- [def insertItems()](#insertitemsindex-texts)
+
+- [def insertPolicy()](#insertpolicy)
+
+- [def insertSeparator()](#insertseparatorindex)
+
+- [def isEditable()](#iseditable)
+
+- [def itemData()](#itemdataindex-roleqtuserrole)
+
+- [def itemDelegate()](#itemdelegate)
+
+- [def itemIcon()](#itemiconindex)
+
+- [def itemText()](#itemtextindex)
+
+- [def lineEdit()](#lineedit)
+
+- [def maxCount()](#maxcount)
+
+- [def maxVisibleItems()](#maxvisibleitems)
+
+- [def minimumContentsLength()](#minimumcontentslength)
+
+- [def model()](#model)
+
+- [def modelColumn()](#modelcolumn)
+
+- [def placeholderText()](#placeholdertext)
+
+- [def removeItem()](#removeitemindex)
+
+- [def rootModelIndex()](#rootmodelindex)
+
+- [def setCompleter()](#setcompleterc)
+
+- [def setDuplicatesEnabled()](#setduplicatesenabledenable)
+
+- [def setEditable()](#seteditableeditable)
+
+- [def setFrame()](#setframearg__1)
+
+- [def setIconSize()](#seticonsizesize)
+
+- [def setInsertPolicy()](#setinsertpolicypolicy)
+
+- [def setItemData()](#setitemdataindex-value-roleqtuserrole)
+
+- [def setItemDelegate()](#setitemdelegatedelegate)
+
+- [def setItemIcon()](#setitemiconindex-icon)
+
+- [def setItemText()](#setitemtextindex-text)
+
+- [def setLineEdit()](#setlineeditedit)
+
+- [def setMaxCount()](#setmaxcountmax)
+
+- [def setMaxVisibleItems()](#setmaxvisibleitemsmaxitems)
+
+- [def setMinimumContentsLength()](#setminimumcontentslengthcharacters)
+
+- [def setModelColumn()](#setmodelcolumnvisiblecolumn)
+
+- [def setPlaceholderText()](#setplaceholdertextplaceholdertext)
+
+- [def setRootModelIndex()](#setrootmodelindexindex)
+
+- [def setSizeAdjustPolicy()](#setsizeadjustpolicypolicy)
+
+- [def setValidator()](#setvalidatorv)
+
+- [def setView()](#setviewitemview)
+
+- [def sizeAdjustPolicy()](#sizeadjustpolicy)
+
+- [def validator()](#validator)
+
+- [def view()](#view)
+
+
+## Virtual methods
+
+- [def hidePopup()](#hidepopup)
+
+- [def initStyleOption()](#initstyleoptionoption)
+
+- [def setModel()](#setmodelmodel)
+
+- [def showPopup()](#showpopup)
+
+
+## Slots
+
+- [def clear()](#clear)
+
+- [def clearEditText()](#clearedittext)
+
+- [def setCurrentIndex()](#setcurrentindexindex)
+
+- [def setCurrentText()](#setcurrenttexttext)
+
+- [def setEditText()](#setedittexttext)
+
+
+## Signals
+
+- [def activated()](#activatedindex)
+
+- [def currentIndexChanged()](#currentindexchangedindex)
+
+- [def currentTextChanged()](#currenttextchangedarg__1)
+
+- [def editTextChanged()](#edittextchangedarg__1)
+
+- [def highlighted()](#highlightedindex)
+
+- [def textActivated()](#textactivatedarg__1)
+
+- [def textHighlighted()](#texthighlightedarg__1)
+
+
+# Detailed Description
+
+## Display Features
+
+QComboBox 是一种向用户呈现选项列表的紧凑方式。
+
+组合框是一个选择小部件，它显示当前项目，并在单击时弹出可选项目的列表。如果 insertItem() 和 setItemText() 函数适当重载，组合框可以包含像素图和字符串。
+
+
+## Editing Features
+
+组合框可以是可编辑的，允许用户修改列表中的每个项目。对于可编辑组合框，提供了 clearEditText() 函数，用于清除显示的字符串而不更改组合框的内容。
+
+当用户在可编辑组合框中输入新字符串时，小部件可能会或可能不会插入它，并且可以将其插入到多个位置。默认策略是 InsertAtBottom，但您可以使用 setInsertPolicy() 更改它。
+
+可以使用 QValidator 将输入限制为可编辑组合框；请参阅 setValidator() 。默认情况下，接受任何输入。
+
+可以使用插入函数（例如 insertItem() 和 insertItems()）填充组合框。可以使用 setItemText() 更改项目。可以使用 removeItem() 删除项目，可以使用 clear() 删除所有项目。当前项目的文本由 currentText() 返回，编号项目的文本由 text() 返回。可以使用 setCurrentIndex() 设置当前项目。组合框中的项目数由 count() 返回；可以使用 setMaxCount() 设置最大项目数。您可以使用 setEditable() 允许编辑。对于可编辑组合框，您可以使用 setCompleter() 设置自动完成，并使用 setDuplicatesEnabled() 设置用户是否可以添加重复项。
+
+
+## Signals
+
+如果组合框的当前项发生变化，则会发出三个信号： currentIndexChanged() 、 currentTextChanged() 和 activated() 。 currentIndexChanged() 和 currentTextChanged() 始终会发出，无论更改是通过编程完成还是通过用户交互完成，而 activated() 仅在更改由用户交互引起时才会发出。当用户突出显示组合框弹出列表中的某项时，会发出 highlighting() 信号。所有这三个信号都有两个版本，一个带有 QString 参数，另一个带有 int 参数。如果用户选择或突出显示像素图，则只会发出 int 信号。每当可编辑组合框的文本发生变化时，都会发出 editTextChanged() 信号。
+
+
+## Model/View Framework
+
+QComboBox 使用模型/视图框架来处理弹出列表并存储其项目。默认情况下，QStandardItemModel 存储项目，QListView 子类显示弹出列表。您可以直接访问模型和视图（使用 model() 和 view() ），但 QComboBox 还提供了设置和获取项目数据的函数，例如 setItemData() 和 itemText() 。您还可以设置新的模型和视图（使用 setModel() 和 setView() ）。对于组合框标签中的文本和图标，使用具有 Qt::DisplayRole 和 Qt::DecorationRole 的模型中的数据。
+
+
+--------------------------------
+## class InsertPolicy
+
+这个枚举指定当用户输入新字符串时 QComboBox 应该做什么。
+
+| Constant                       | Description                            |
+| ------------------------------ | -------------------------------------- |
+| QComboBox.NoInsert             | 该字符串将不会插入到组合框中。            |
+| QComboBox.InsertAtTop          | 该字符串将作为组合框中的第一个项目插入。   |
+| QComboBox.InsertAtCurrent      | 当前项目将被字符串替换。                 |
+| QComboBox.InsertAtBottom       | 该字符串将插入到组合框中的最后一项之后。   |
+| QComboBox.InsertAfterCurrent   | 该字符串插入到组合框中的当前项之后。      |
+| QComboBox.InsertBeforeCurrent  | 该字符串插入到组合框中的当前项之前。      |
+| QComboBox.InsertAlphabetically | 该字符串按字母顺序插入组合框中。          |
+
+
+--------------------------------
+## class SizeAdjustPolicy
+
+此枚举指定当添加新内容或内容改变时，QComboBox 的大小提示应如何调整。
+
+| Constant                              | Description                                                                        |
+| ------------------------------------- | ---------------------------------------------------------------------------------- |
+| QComboBox.AdjustToContents            | 组合框将始终根据内容进行调整。                                                        |
+| QComboBox.AdjustToContentsOnFirstShow | 组合框将在第一次显示时调整其内容。                                                     |
+| QComboBox.AdjustToMinimumContentsLengthWithIcon | 组合框将调整为最小内容长度加上图标空间。出于性能原因，请在大型模型上使用此策略。 |
+
+
+--------------------------------
+## property count : int
+
+此属性保存组合框中的项目数。
+
+默认情况下，对于空组合框，此属性的值为 0。
+
+访问函数：
+
+- count()
+
+
+--------------------------------
+## property currentData : object
+
+此属性保存当前项的数据。
+
+默认情况下，对于空组合框或未设置当前项的组合框，此属性包含无效的 QVariant。
+
+访问函数：
+
+- currentData()
+
+
+--------------------------------
+## property currentIndex : int
+
+此属性保存组合框中当前项目的索引。
+
+插入或删除项目时，当前索引可能会发生变化。
+
+默认情况下，对于空组合框或未设置当前项目的组合框，此属性的值为 -1。
+
+访问函数：
+
+- currentIndex()
+- setCurrentIndex()
+- Signal currentIndexChanged()
+
+
+--------------------------------
+## property currentText : str
+
+此属性保存当前文本。
+
+如果组合框可编辑，则当前文本是行编辑显示的值。否则，它是当前项的值，如果组合框为空或未设置当前项，则为空字符串。
+
+如果组合框可编辑，setter setCurrentText() 只需调用 setEditText()。否则，如果列表中有匹配的文本，则将 currentIndex 设置为相应的索引。
+
+访问函数：
+
+- currentText()
+- setCurrentText()
+- Signal currentTextChanged()
+
+
+--------------------------------
+## property duplicatesEnabled : bool
+
+此属性控制用户是否可以将重复项输入到组合框中。
+
+请注意，始终可以通过编程将重复项插入到组合框中。
+
+默认情况下，此属性为 false（不允许重复）。
+
+访问函数：
+
+- duplicatesEnabled()
+- setDuplicatesEnabled()
+
+
+--------------------------------
+## property editable : bool
+
+此属性保存组合框是否可由用户编辑。
+
+默认情况下，此属性为 false。编辑的效果取决于插入策略。
+
+访问函数：
+
+- isEditable()
+- setEditable()
+
+
+--------------------------------
+## property frame : bool
+
+此属性保存组合框是否使用框架绘制自身。
+
+如果启用（默认），组合框将在框架内绘制自身，否则组合框将在没有任何框架的情况下绘制自身。
+
+访问函数：
+
+- hasFrame()
+- setFrame()
+
+
+--------------------------------
+## property iconSize : QSize
+
+此属性保存组合框中显示的图标的大小。
+
+除非明确设置，否则将返回当前样式的默认值。此大小是图标可以具有的最大尺寸；较小尺寸的图标不会放大。
+
+访问函数：
+
+- iconSize()
+- setIconSize()
+
+
+--------------------------------
+## property insertPolicy : QComboBox.InsertPolicy
+
+此属性保存用于确定用户插入的项目应出现在组合框中何处的策略。
+
+默认值为 InsertAtBottom ，表示新项目将出现在项目列表的底部。
+
+访问函数：
+
+- insertPolicy()
+- setInsertPolicy()
+
+
+--------------------------------
+## property maxCount : int
+
+此属性保存组合框中允许的最大项目数。
+
+默认情况下，此属性的值来自可用的最高有符号整数（通常为 2147483647）。
+
+访问函数：
+
+- maxCount()
+- setMaxCount()
+
+
+--------------------------------
+## property maxVisibleItems : int
+
+此属性保存组合框在屏幕上允许的最大尺寸（以项目为单位）。
+
+默认情况下，此属性的值为 10。
+
+访问函数：
+
+- maxVisibleItems()
+- setMaxVisibleItems()
+
+
+--------------------------------
+## property minimumContentsLength : int
+
+此属性保存组合框中应容纳的最小字符数。
+
+默认值为 0。
+
+如果将此属性设置为正值，则 minimumSizeHint() 和 sizeHint() 会将其考虑在内。
+
+访问函数：
+
+- minimumContentsLength()
+- setMinimumContentsLength()
+
+
+--------------------------------
+## property modelColumn : int
+
+此属性保存模型中可见的列。
+
+如果在填充组合框之前设置，弹出视图将不受影响并显示第一列（使用此属性的默认值）。
+
+默认情况下，此属性的值为 0。
+
+访问函数：
+
+- modelColumn()
+- setModelColumn()
+
+
+--------------------------------
+## property placeholderText : str
+
+此属性用于设置未设置有效索引时显示的占位符文本。
+
+设置无效索引时将显示占位符文本。下拉列表中无法访问该文本。在添加项目之前调用此函数时，将显示占位符文本，否则，如果您想显示占位符文本，则必须以编程方式调用 setCurrentIndex (-1)。设置空的占位符文本以重置设置。
+
+当 QComboBox 可编辑时，请改用 setPlaceholderText()。
+
+访问函数：
+
+- placeholderText()
+- setPlaceholderText()
+
+
+--------------------------------
+## property sizeAdjustPolicy : QComboBox.SizeAdjustPolicy
+
+此属性保存描述当内容更改时组合框的大小如何更改的策略。
+
+默认值为 AdjustToContentsOnFirstShow 。
+
+访问函数：
+
+- sizeAdjustPolicy()
+- setSizeAdjustPolicy()
+
+
+--------------------------------
+## __init__([parent=None])
+
+参数：
+
+- parent – QWidget
+
+使用默认模型 QStandardItemModel 构造具有给定父级的组合框。
+
+
+--------------------------------
+## activated(index)
+
+参数：
+
+- index – int
+
+当用户选择组合框中的项目时，会发送此信号。传递项目的索引。请注意，即使选项未更改，也会发送此信号。如果您需要知道选项何时实际更改，请使用信号 currentIndexChanged() 或 currentTextChanged() 。
+
+
+--------------------------------
+## addItem(text[, userData=None])
+
+参数：
+
+- text – str
+- userData – object
+
+使用给定的文本向组合框添加一个项目，并包含指定的用户数据（存储在 Qt::UserRole 中）。该项目将附加到现有项目列表中。
+
+
+--------------------------------
+## addItem(icon, text[, userData=None])
+
+参数：
+
+- icon – QIcon
+- text – str
+- userData – object
+
+使用给定的图标和文本向组合框添加一个项目，并包含指定的用户数据（存储在 Qt::UserRole 中）。该项目将附加到现有项目列表中。
+
+
+--------------------------------
+## addItems(texts)
+
+参数：
+
+- texts – list of strings
+
+将给定文本中的每个字符串添加到组合框。每个项目依次附加到现有项目的列表中。
+
+
+--------------------------------
+## clear()
+
+清除组合框，删除所有项目。
+
+
+--------------------------------
+## clearEditText()
+
+清除组合框中用于编辑的行编辑的内容。
+
+
+--------------------------------
+## completer()
+
+返回类型：QCompleter
+
+返回用于自动完成组合框文本输入的完成器。
+
+
+--------------------------------
+## count()
+
+返回类型：int
+
+属性 count 的获取器。
+
+
+--------------------------------
+## currentData([role=Qt.UserRole])
+
+参数：
+
+- role – int
+
+返回类型：object
+
+
+--------------------------------
+## currentIndex()
+
+返回类型：int
+
+属性 currentIndex 的获取器。
+
+
+--------------------------------
+## currentIndexChanged(index)
+
+参数：
+
+- index – int
+
+每当组合框中的 currentIndex 通过用户交互或编程发生变化时，都会发送此信号。如果组合框变为空或 currentIndex 被重置，则传递项目的索引或 -1。
+
+属性 currentIndex 的通知信号。
+
+
+--------------------------------
+## currentText()
+
+返回类型：str
+
+属性 currentText 的获取器。
+
+
+--------------------------------
+## currentTextChanged(arg__1)
+
+参数：
+
+- arg__1 – str
+
+每当 currentText 发生变化时，都会发出此信号。新值以文本形式传递。
+
+属性 currentText 的通知信号。
+
+
+--------------------------------
+## duplicatesEnabled()
+
+返回类型：bool
+
+属性 duplicatesEnabled 的获取器。
+
+
+--------------------------------
+## editTextChanged(arg__1)
+
+参数：
+
+- arg__1 – str
+
+当组合框的行编辑小部件中的文本发生更改时，会发出此信号。新文本由 text 指定。
+
+
+--------------------------------
+## findData(data[, role=Qt.UserRole[, flags=static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)]])
+
+参数：
+
+- data – object
+- role – int
+- flags – Combination of MatchFlag
+
+返回类型：int
+
+返回包含给定角色的给定数据的项目的索引；否则返回 -1。
+
+标志指定如何搜索组合框中的项目。
+
+
+--------------------------------
+## findText(text[, flags=static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)])
+
+参数：
+
+- text – str
+- flags – Combination of MatchFlag
+
+返回类型：int
+
+返回包含指定文本的项目的索引；否则返回 -1。
+
+标志指定如何搜索组合框中的项目。
+
+
+--------------------------------
+## hasFrame()
+
+返回类型：bool
+
+属性框架的获取器。
+
+--------------------------------
+## hidePopup()
+
+如果组合框中的项目列表当前可见，则隐藏它并重置内部状态，因此，如果自定义弹出窗口显示在重新实现的 showPopup() 中，那么您还需要重新实现 hidePopup() 函数来隐藏自定义弹出窗口，并在自定义弹出窗口小部件隐藏时调用基类实现来重置内部状态。
+
+
+--------------------------------
+## highlighted(index)
+
+参数：
+
+- index – int
+
+当用户突出显示组合框弹出列表中的某项时，将发送此信号。传递该项的索引。
+
+
+--------------------------------
+## iconSize()
+
+返回类型：QSize
+
+属性 iconSize 的获取器。
+
+
+--------------------------------
+## initStyleOption(option)
+
+参数：
+
+- option – QStyleOptionComboBox
+
+用此 QComboBox 中的值初始化选项。当子类需要 QStyleOptionComboBox 但又不想自己填写所有信息时，此方法非常有用。
+
+
+--------------------------------
+## inputMethodQuery(query, argument)
+
+参数：
+
+- query – InputMethodQuery
+- argument – object
+
+返回类型：object
+
+
+--------------------------------
+## insertItem(index, icon, text[, userData=None])
+
+参数：
+
+- index – int
+- icon – QIcon
+- text – str
+- userData – object
+
+将图标、文本和用户数据（存储在 Qt::UserRole 中）插入到给定索引处的组合框中。
+
+如果索引等于或大于项目总数，则新项目将附加到现有项目列表中。 如果索引为零或负数，则新项目将附加到现有项目列表中。
+
+
+--------------------------------
+## insertItem(index, text[, userData=None])
+
+参数：
+
+- index – int
+- text – str
+- userData – object
+
+将文本和用户数据（存储在 Qt::UserRole 中）插入到给定索引处的组合框中。
+
+如果索引等于或大于项目总数，则新项目将附加到现有项目列表中。 如果索引为零或负数，则新项目将附加到现有项目列表中。
+
+
+--------------------------------
+## insertItems(index, texts)
+
+参数：
+
+- index – int
+- texts – list of strings
+
+从指定的索引开始，将列表中的字符串作为单独的项目插入到组合框中。
+
+如果索引等于或大于项目总数，则新项目将附加到现有项目列表中。 如果索引为零或负数，则新项目将附加到现有项目列表中。
+
+
+--------------------------------
+## insertPolicy()
+
+返回类型：InsertPolicy
+
+属性 insertPolicy 的获取器。
+
+
+--------------------------------
+## insertSeparator(index)
+
+参数：
+
+- index – int
+
+在给定索引处将分隔项插入组合框。
+
+如果索引等于或大于项的总数，则新项将附加到现有项的列表中。 如果索引为零或负数，则新项将附加到现有项的列表中。
+
+
+--------------------------------
+## isEditable()
+
+返回类型：bool
+
+属性 editable 的获取器。
+
+
+--------------------------------
+## itemData(index[, role=Qt.UserRole])
+
+参数：
+
+- index – int
+- role – int
+
+返回类型：object
+
+返回组合框中给定索引中给定角色的数据，如果此角色没有数据，则返回无效的 QVariant。
+
+
+--------------------------------
+## itemDelegate()
+
+返回类型：QAbstractItemDelegate
+
+返回弹出列表视图使用的项目委托。
+
+
+--------------------------------
+## itemIcon(index)
+
+参数：
+
+- index – int
+
+返回类型：QIcon
+
+返回组合框中给定索引的图标。
+
+
+--------------------------------
+## itemText(index)
+
+参数：
+
+- index – int
+
+返回类型：str
+
+返回组合框中给定索引的文本。
+
+
+--------------------------------
+## lineEdit()
+
+返回类型：QLineEdit
+
+返回用于编辑组合框中项目的行编辑，如果没有行编辑则返回 None。
+
+只有可编辑的组合框才有行编辑。
+
+
+--------------------------------
+## maxCount()
+
+返回类型：int
+
+属性 maxCount 的获取方法。
+
+
+--------------------------------
+## maxVisibleItems()
+
+返回类型：int
+
+属性 maxVisibleItems 的获取器。
+
+
+--------------------------------
+## minimumContentsLength()
+
+返回类型：int
+
+属性 minimumContentsLength 的获取器。
+
+
+--------------------------------
+## model()
+
+返回类型：QAbstractItemModel
+
+返回组合框使用的模型。
+
+
+--------------------------------
+## modelColumn()
+
+返回类型：int
+
+属性 modelColumn 的获取方法。
+
+
+--------------------------------
+## placeholderText()
+
+返回类型：str
+
+属性 placeholderText 的获取方法。
+
+
+--------------------------------
+## removeItem(index)
+
+参数：
+
+- index – int
+
+从组合框中删除给定索引处的项目。如果索引被删除，这将更新当前索引。
+
+如果索引超出范围，则此函数不执行任何操作。
+
+
+--------------------------------
+## rootModelIndex()
+
+返回类型：QModelIndex
+
+返回组合框中项目的根模型项目索引。
+
+
+--------------------------------
+## setCompleter(c)
+
+参数：
+
+- c – QCompleter
+
+设置要使用的补全器，而不是当前补全器。如果补全器为 None，则禁用自动补全。
+
+默认情况下，对于可编辑组合框，会自动创建执行不区分大小写的内联补全的 QCompleter。
+
+
+--------------------------------
+## setCurrentIndex(index)
+
+参数：
+
+- index – int
+
+currentIndex 属性的设置者。
+
+
+--------------------------------
+## setCurrentText(text)
+
+参数：
+
+- text – str
+
+currentText 属性的设置器。
+
+
+--------------------------------
+## setDuplicatesEnabled(enable)
+
+参数：
+
+- enable – bool
+
+属性 duplicatesEnabled 的设置者。
+
+
+--------------------------------
+## setEditText(text)
+
+参数：
+
+- text – str
+
+设置组合框的文本编辑中的文本。
+
+
+--------------------------------
+## setEditable(editable)
+
+参数：
+
+- editable – bool
+
+属性的设置者可编辑。
+
+
+--------------------------------
+## setFrame(arg__1)
+
+参数：
+
+- arg__1 – bool
+
+属性框架的设置者。
+
+
+--------------------------------
+## setIconSize(size)
+
+参数：
+
+- size – QSize
+
+属性 iconSize 的设置者。
+
+
+--------------------------------
+## setInsertPolicy(policy)
+
+参数：
+
+- policy – InsertPolicy
+
+属性 insertPolicy 的设置者。
+
+
+--------------------------------
+## setItemData(index, value[, role=Qt.UserRole])
+
+参数：
+
+- index – int
+- value – object
+- role – int
+
+将组合框中给定索引上的项目的数据角色设置为指定值。
+
+
+--------------------------------
+## setItemDelegate(delegate)
+
+参数：
+
+- delegate – QAbstractItemDelegate
+
+设置弹出列表视图的项目委托。组合框拥有委托的所有权。
+
+任何现有委托都将被移除，但不会被删除。QComboBox 不拥有委托的所有权。
+
+
+--------------------------------
+## setItemIcon(index, icon)
+
+参数：
+
+- index – int
+- icon – QIcon
+
+设置组合框中给定索引的项目的图标。
+
+
+--------------------------------
+## setItemText(index, text)
+
+参数：
+
+- index – int
+- text – str
+
+设置组合框中给定索引的项目的文本。
+
+
+--------------------------------
+## setLineEdit(edit)
+
+参数：
+
+- edit – QLineEdit
+
+设置要使用的行编辑，而不是当前行编辑小部件。
+
+组合框拥有行编辑的所有权。
+
+
+--------------------------------
+## setMaxCount(max)
+
+参数：
+
+- max – int
+
+属性 maxCount 的设置者。
+
+
+--------------------------------
+## setMaxVisibleItems(maxItems)
+
+参数：
+
+- maxItems – int
+
+属性 maxVisibleItems 的设置者。
+
+
+--------------------------------
+## setMinimumContentsLength(characters)
+
+参数：
+
+- characters – int
+
+属性 minimumContentsLength 的设置者。
+
+
+--------------------------------
+## setModel(model)
+
+参数：
+
+- model – QAbstractItemModel
+
+将模型设置为 model。model 不能为 None。如果要清除模型的内容，请调用 clear() 。
+
+
+--------------------------------
+## setModelColumn(visibleColumn)
+
+参数：
+
+- visibleColumn – int
+
+属性 modelColumn 的设置器。
+
+
+--------------------------------
+## setPlaceholderText(placeholderText)
+
+参数：
+
+- placeholderText – str
+
+属性 placeholderText 的设置者。
+
+
+--------------------------------
+## setRootModelIndex(index)
+
+参数：
+
+- index – QModelIndex
+
+设置组合框中项目的根模型项目索引。
+
+
+--------------------------------
+## setSizeAdjustPolicy(policy)
+
+参数：
+
+- policy – SizeAdjustPolicy
+
+属性 sizeAdjustPolicy 的设置者。
+
+
+--------------------------------
+## setValidator(v)
+
+参数：
+
+- v – QValidator
+
+设置要使用的验证器来代替当前验证器。
+
+
+--------------------------------
+## setView(itemView)
+
+参数：
+
+- itemView – QAbstractItemView
+
+将组合框弹出窗口中要使用的视图设置为给定的 itemView。组合框拥有该视图的所有权。
+
+注意：如果您想要使用便利视图（如 QListWidget、QTableWidget 或 QTreeWidget），请确保在调用此函数之前使用便利小部件模型在组合框上调用 setModel()。
+
+
+--------------------------------
+## showPopup()
+
+显示组合框中的项目列表。如果列表为空，则不会显示任何项目。
+
+如果您重新实现此函数以显示自定义弹出窗口，请确保调用 hidePopup() 来重置内部状态。
+
+
+--------------------------------
+## sizeAdjustPolicy()
+
+返回类型：SizeAdjustPolicy
+
+属性 sizeAdjustPolicy 的获取器。
+
+
+--------------------------------
+## textActivated(arg__1)
+
+参数：
+
+- arg__1 – str
+
+当用户选择组合框中的项目时，会发送此信号。传递项目的文本。请注意，即使选项未更改，也会发送此信号。如果您需要知道选项何时实际更改，请使用信号 currentIndexChanged() 或 currentTextChanged() 。
+
+
+--------------------------------
+## textHighlighted(arg__1)
+
+参数：
+
+- arg__1 – str
+
+当用户突出显示组合框弹出列表中的某项时，会发送此信号。传递该项的文本。
+
+
+--------------------------------
+## validator()
+
+返回类型：QValidator
+
+返回用于约束组合框的文本输入的验证器。
+
+
+--------------------------------
+## view()
+
+返回类型：QAbstractItemView
+
+返回用于组合框弹出的列表视图。
diff --git a/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md
index 71991d4..accbeab 100644
--- a/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md
+++ b/Class-3/PyQt6/Class-0/QtWidget/QComboBox.md
@@ -10,219 +10,219 @@ The QComboBox widget combines a button with a dropdown list.
 
 ## Properties
 
-- [count]()
+- [count](#property-count--int)
 
     The number of items in the combobox.
 
-- [currentData]()
+- [currentData](#property-currentdata--object)
 
     The data for the current item.
 
-- [currentIndex]()
+- [currentIndex](#property-currentindex--int)
 
     The index of the current item in the combobox.
 
-- [currentText]()
+- [currentText](#property-currenttext--str)
 
     The current text.
 
-- [duplicatesEnabled]()
+- [duplicatesEnabled](#property-duplicatesenabled--bool)
 
     Whether the user can enter duplicate items into the combobox.
 
-- [editable]()
+- [editable](#property-editable--bool)
 
     Whether the combo box can be edited by the user.
 
-- [frame]()
+- [frame](#property-frame--bool)
 
     Whether the combo box draws itself with a frame.
 
-- [iconSize]()
+- [iconSize](#property-iconsize--qsize)
 
     The size of the icons shown in the combobox.
 
-- [insertPolicy]()
+- [insertPolicy](#property-insertpolicy--qcomboboxinsertpolicy)
 
     The policy used to determine where user-inserted items should appear in the combobox.
 
-- [maxCount]()
+- [maxCount](#property-maxcount--int)
 
     The maximum number of items allowed in the combobox.
 
-- [maxVisibleItems]()
+- [maxVisibleItems](#property-maxvisibleitems--int)
 
     The maximum allowed size on screen of the combo box, measured in items.
 
-- [minimumContentsLength]()
+- [minimumContentsLength](#property-minimumcontentslength--int)
 
     The minimum number of characters that should fit into the combobox.
 
-- [modelColumn]()
+- [modelColumn](#property-modelcolumn--int)
 
     The column in the model that is visible.
 
-- [placeholderText]()
+- [placeholderText](#property-placeholdertext--str)
 
     Sets a placeholderText text shown when no valid index is set.
 
-- [sizeAdjustPolicy]()
+- [sizeAdjustPolicy](#property-sizeadjustpolicy--qcomboboxsizeadjustpolicy)
 
     The policy describing how the size of the combobox changes when the content changes.
 
 
 ## Methods
 
-- [def \_\_init__()]()
+- [def \_\_init__()](#initparentnone)
 
-- [def addItem()]()
+- [def addItem()](#additemicon-text-userdatanone)
 
-- [def addItems()]()
+- [def addItems()](#additemstexts)
 
-- [def completer()]()
+- [def completer()](#completer)
 
-- [def count()]()
+- [def count()](#count)
 
-- [def currentData()]()
+- [def currentData()](#currentdataroleqtuserrole)
 
-- [def currentIndex()]()
+- [def currentIndex()](#currentindex)
 
-- [def currentText()]()
+- [def currentText()](#currenttext)
 
-- [def duplicatesEnabled()]()
+- [def duplicatesEnabled()](#duplicatesenabled)
 
-- [def findData()]()
+- [def findData()](#finddatadata-roleqtuserrole-flagsstatic_castqtmatchflagsqtmatchexactlyqtmatchcasesensitive)
 
-- [def findText()]()
+- [def findText()](#findtexttext-flagsstatic_castqtmatchflagsqtmatchexactlyqtmatchcasesensitive)
 
-- [def hasFrame()]()
+- [def hasFrame()](#hasframe)
 
-- [def iconSize()]()
+- [def iconSize()](#iconsize)
 
-- [def inputMethodQuery()]()
+- [def inputMethodQuery()](#inputmethodqueryquery-argument)
 
-- [def insertItem()]()
+- [def insertItem()](#insertitemindex-icon-text-userdatanone)
 
-- [def insertItems()]()
+- [def insertItems()](#insertitemsindex-texts)
 
-- [def insertPolicy()]()
+- [def insertPolicy()](#insertpolicy)
 
-- [def insertSeparator()]()
+- [def insertSeparator()](#insertseparatorindex)
 
-- [def isEditable()]()
+- [def isEditable()](#iseditable)
 
-- [def itemData()]()
+- [def itemData()](#itemdataindex-roleqtuserrole)
 
-- [def itemDelegate()]()
+- [def itemDelegate()](#itemdelegate)
 
-- [def itemIcon()]()
+- [def itemIcon()](#itemiconindex)
 
-- [def itemText()]()
+- [def itemText()](#itemtextindex)
 
-- [def lineEdit()]()
+- [def lineEdit()](#lineedit)
 
-- [def maxCount()]()
+- [def maxCount()](#maxcount)
 
-- [def maxVisibleItems()]()
+- [def maxVisibleItems()](#maxvisibleitems)
 
-- [def minimumContentsLength()]()
+- [def minimumContentsLength()](#minimumcontentslength)
 
-- [def model()]()
+- [def model()](#model)
 
-- [def modelColumn()]()
+- [def modelColumn()](#modelcolumn)
 
-- [def placeholderText()]()
+- [def placeholderText()](#placeholdertext)
 
-- [def removeItem()]()
+- [def removeItem()](#removeitemindex)
 
-- [def rootModelIndex()]()
+- [def rootModelIndex()](#rootmodelindex)
 
-- [def setCompleter()]()
+- [def setCompleter()](#setcompleterc)
 
-- [def setDuplicatesEnabled()]()
+- [def setDuplicatesEnabled()](#setduplicatesenabledenable)
 
-- [def setEditable()]()
+- [def setEditable()](#seteditableeditable)
 
-- [def setFrame()]()
+- [def setFrame()](#setframearg__1)
 
-- [def setIconSize()]()
+- [def setIconSize()](#seticonsizesize)
 
-- [def setInsertPolicy()]()
+- [def setInsertPolicy()](#setinsertpolicypolicy)
 
-- [def setItemData()]()
+- [def setItemData()](#setitemdataindex-value-roleqtuserrole)
 
-- [def setItemDelegate()]()
+- [def setItemDelegate()](#setitemdelegatedelegate)
 
-- [def setItemIcon()]()
+- [def setItemIcon()](#setitemiconindex-icon)
 
-- [def setItemText()]()
+- [def setItemText()](#setitemtextindex-text)
 
-- [def setLineEdit()]()
+- [def setLineEdit()](#setlineeditedit)
 
-- [def setMaxCount()]()
+- [def setMaxCount()](#setmaxcountmax)
 
-- [def setMaxVisibleItems()]()
+- [def setMaxVisibleItems()](#setmaxvisibleitemsmaxitems)
 
-- [def setMinimumContentsLength()]()
+- [def setMinimumContentsLength()](#setminimumcontentslengthcharacters)
 
-- [def setModelColumn()]()
+- [def setModelColumn()](#setmodelcolumnvisiblecolumn)
 
-- [def setPlaceholderText()]()
+- [def setPlaceholderText()](#setplaceholdertextplaceholdertext)
 
-- [def setRootModelIndex()]()
+- [def setRootModelIndex()](#setrootmodelindexindex)
 
-- [def setSizeAdjustPolicy()]()
+- [def setSizeAdjustPolicy()](#setsizeadjustpolicypolicy)
 
-- [def setValidator()]()
+- [def setValidator()](#setvalidatorv)
 
-- [def setView()]()
+- [def setView()](#setviewitemview)
 
-- [def sizeAdjustPolicy()]()
+- [def sizeAdjustPolicy()](#sizeadjustpolicy)
 
-- [def validator()]()
+- [def validator()](#validator)
 
-- [def view()]()
+- [def view()](#view)
 
 
 ## Virtual methods
 
-- [def hidePopup()]()
+- [def hidePopup()](#hidepopup)
 
-- [def initStyleOption()]()
+- [def initStyleOption()](#initstyleoptionoption)
 
-- [def setModel()]()
+- [def setModel()](#setmodelmodel)
 
-- [def showPopup()]()
+- [def showPopup()](#showpopup)
 
 
 ## Slots
 
-- [def clear()]()
+- [def clear()](#clear)
 
-- [def clearEditText()]()
+- [def clearEditText()](#clearedittext)
 
-- [def setCurrentIndex()]()
+- [def setCurrentIndex()](#setcurrentindexindex)
 
-- [def setCurrentText()]()
+- [def setCurrentText()](#setcurrenttexttext)
 
-- [def setEditText()]()
+- [def setEditText()](#setedittexttext)
 
 
 ## Signals
 
-- [def activated()]()
+- [def activated()](#activatedindex)
 
-- [def currentIndexChanged()]()
+- [def currentIndexChanged()](#currentindexchangedindex)
 
-- [def currentTextChanged()]()
+- [def currentTextChanged()](#currenttextchangedarg__1)
 
-- [def editTextChanged()]()
+- [def editTextChanged()](#edittextchangedarg__1)
 
-- [def highlighted()]()
+- [def highlighted()](#highlightedindex)
 
-- [def textActivated()]()
+- [def textActivated()](#textactivatedarg__1)
 
-- [def textHighlighted()]()
+- [def textHighlighted()](#texthighlightedarg__1)
 
 
 # Detailed Description
@@ -411,7 +411,6 @@ Access functions:
 
 This property holds the maximum number of items allowed in the combobox..
 
-
 By default, this property’s value is derived from the highest signed integer available (typically 2147483647).
 
 Access functions:
@@ -517,8 +516,7 @@ This signal is sent when the user chooses an item in the combobox. The item’s
 Parameters:
 
 - text – str
-
-userData – object
+- userData – object
 
 Adds an item to the combobox with the given text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.
 
@@ -550,8 +548,6 @@ Adds each of the strings in the given texts to the combobox. Each item is append
 
 Clears the combobox, removing all items.
 
-Note: If you have set an external model on the combobox this model will still be cleared when calling this function.
-
 
 --------------------------------
 ## clearEditText()
@@ -622,7 +618,6 @@ Parameters:
 
 This signal is emitted whenever currentText changes. The new value is passed as text.
 
-
 Notification signal of property currentText  .
 
 

From d7c122c267c112c5bc79c484c48fa8ca4458e78e Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Thu, 8 Aug 2024 23:46:02 +0800
Subject: [PATCH 35/38] [PyQt] Add Translation UI example.

---
 .../PyQt6/Class-1/03-TranslationUI/README.md  |  0
 .../PyQt6/Class-1/03-TranslationUI/hello.ui   | 35 +++++++++++++++++++
 .../Class-1/03-TranslationUI/hello_ui.py      |  0
 .../PyQt6/Class-1/03-TranslationUI/main.py    |  0
 4 files changed, 35 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-1/03-TranslationUI/README.md
 create mode 100644 Class-3/PyQt6/Class-1/03-TranslationUI/hello.ui
 create mode 100644 Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py
 create mode 100644 Class-3/PyQt6/Class-1/03-TranslationUI/main.py

diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/README.md b/Class-3/PyQt6/Class-1/03-TranslationUI/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/hello.ui b/Class-3/PyQt6/Class-1/03-TranslationUI/hello.ui
new file mode 100644
index 0000000..1c48cf0
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/03-TranslationUI/hello.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>160</x>
+     <y>120</y>
+     <width>81</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Hello World!</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignCenter</set>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py b/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py
new file mode 100644
index 0000000..e69de29
diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/main.py b/Class-3/PyQt6/Class-1/03-TranslationUI/main.py
new file mode 100644
index 0000000..e69de29

From df1f2d06f7449351c37bd134048b2df208eec86f Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Fri, 9 Aug 2024 10:34:52 +0800
Subject: [PATCH 36/38] [PyQt] Update Translation UI example.

---
 .../PyQt6/Class-1/03-TranslationUI/README.md  | 41 +++++++++++++++++++
 .../Class-1/03-TranslationUI/hello_ui.py      | 27 ++++++++++++
 .../PyQt6/Class-1/03-TranslationUI/main.py    | 30 ++++++++++++++
 3 files changed, 98 insertions(+)

diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/README.md b/Class-3/PyQt6/Class-1/03-TranslationUI/README.md
index e69de29..b043d63 100644
--- a/Class-3/PyQt6/Class-1/03-TranslationUI/README.md
+++ b/Class-3/PyQt6/Class-1/03-TranslationUI/README.md
@@ -0,0 +1,41 @@
+
+# Introduction
+
+PyQt6 QLabel UI example.
+
+
+# QT Designer
+
+Windows 11:
+
+```bash
+${Python}/Lib/site-packages/qt6_applications/Qt/bin/designer.exe
+```
+
+Linux (Ubuntu 22.04):
+
+```bash
+${Python}/lib/python3.10/site-packages/qt6_applications/Qt/bin/designer
+```
+
+
+# Screenshot
+
+![TranslateUI](../res/03-TranslateUI.png)
+
+
+# Usage
+
+1. Using QT Designer Craete widget window and drag a label control save as "hello.ui" file.
+
+2. Translate UI file:
+
+```bash
+$ python -m PyQt6.uic.pyuic hello.ui -o hello_ui.py
+```
+
+3. Use
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py b/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py
index e69de29..34af7fe 100644
--- a/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py
+++ b/Class-3/PyQt6/Class-1/03-TranslationUI/hello_ui.py
@@ -0,0 +1,27 @@
+# Form implementation generated from reading ui file 'hello.ui'
+#
+# Created by: PyQt6 UI code generator 6.4.2
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic6 is
+# run again.  Do not edit this file unless you know what you are doing.
+
+
+from PyQt6 import QtCore, QtGui, QtWidgets
+
+
+class Ui_Form(object):
+    def setupUi(self, Form):
+        Form.setObjectName("Form")
+        Form.resize(400, 300)
+        self.label = QtWidgets.QLabel(parent=Form)
+        self.label.setGeometry(QtCore.QRect(160, 120, 81, 16))
+        self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
+        self.label.setObjectName("label")
+
+        self.retranslateUi(Form)
+        QtCore.QMetaObject.connectSlotsByName(Form)
+
+    def retranslateUi(self, Form):
+        _translate = QtCore.QCoreApplication.translate
+        Form.setWindowTitle(_translate("Form", "Form"))
+        self.label.setText(_translate("Form", "Hello World!"))
diff --git a/Class-3/PyQt6/Class-1/03-TranslationUI/main.py b/Class-3/PyQt6/Class-1/03-TranslationUI/main.py
index e69de29..03b8969 100644
--- a/Class-3/PyQt6/Class-1/03-TranslationUI/main.py
+++ b/Class-3/PyQt6/Class-1/03-TranslationUI/main.py
@@ -0,0 +1,30 @@
+###
+# PyQt6 QLabel UI example.
+#
+# License - MIT.
+###
+
+from PyQt6.QtWidgets import QApplication, QWidget
+
+# Locals
+from hello_ui import Ui_Form
+
+
+def main():
+# {
+    app    = QApplication([])
+    widget = QWidget()
+
+    ui     = Ui_Form()
+    ui.setupUi(widget)
+
+    widget.show()
+
+    print(ui.label.text())
+
+    app.exec()
+# }
+
+
+if '__main__' == __name__:
+    main()

From e04caee503a29938a6266f13589032c059d93778 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Sat, 10 Aug 2024 12:05:59 +0800
Subject: [PATCH 37/38] [PyQt] Add QLabel example.

---
 Class-3/PyQt6/Class-1/04-Label/README.md |  37 ++++++++++++++
 Class-3/PyQt6/Class-1/04-Label/main.py   |  60 +++++++++++++++++++++++
 Class-3/PyQt6/Class-1/res/04-Label.png   | Bin 5860 -> 7217 bytes
 3 files changed, 97 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-1/04-Label/README.md
 create mode 100644 Class-3/PyQt6/Class-1/04-Label/main.py

diff --git a/Class-3/PyQt6/Class-1/04-Label/README.md b/Class-3/PyQt6/Class-1/04-Label/README.md
new file mode 100644
index 0000000..58c32d6
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/04-Label/README.md
@@ -0,0 +1,37 @@
+
+# Introduction
+
+PyQt6 QLabel example.
+
+Launch, it will display "hello world.", after 3 seconds, dispaly "nihao world.".
+
+
+# Screenshot
+
+![Label](../res/04-Label.png)
+
+
+# API
+
+English:
+
+- [QApplication](../../Class-0/QtWidget/QApplication.md)
+- [QWidget](../../Class-0/QtWidget/QWidget.md)
+- [QLabel](../../Class-0/QtWidget/QLabel.md)
+- [QTimer](../../Class-0/QtWidget/QTimer.md)
+
+Chinese:
+
+- [QApplication](../../Class-0/QtWidget/QApplication.CN.md)
+- [QWidget](../../Class-0/QtWidget/QWidget.CN.md)
+- [QLabel](../../Class-0/QtWidget/QLabel.CN.md)
+- [QTimer](../../Class-0/QtWidget/QTimer.CN.md)
+
+
+# Usage
+
+```bash
+$ python --version
+Python 3.12.3
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/04-Label/main.py b/Class-3/PyQt6/Class-1/04-Label/main.py
new file mode 100644
index 0000000..bd5f7e7
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/04-Label/main.py
@@ -0,0 +1,60 @@
+###
+# PyQt6 QLabel example.
+#
+# License - MIT.
+###
+
+import sys
+from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel
+from PyQt6.QtCore import Qt, QTimer
+
+
+def updateLabel(label: QLabel):
+# {
+    label.setText('Niubility !')
+# }
+
+
+# QWidget API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QWidget.html>
+# QLabel  API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QLabel.html>
+# QTimer  API : <https://doc.qt.io/qtforpython-6/PySide6/QtCore/QTimer.html>
+def main():
+# {
+    app = QApplication([])
+
+    # Controls.
+    # English: hello.
+    # Chinese: nihao.
+    label1 = QLabel()
+    label1.setText('hello world.')
+
+    label2 = QLabel()
+    label2.setText('nihao world.')
+
+    label3 = QLabel()
+    label3.setText('Great !')
+
+    # Layout.
+    layout = QVBoxLayout()
+
+    layout.addWidget(label1)
+    layout.addWidget(label2)
+    layout.addWidget(label3)
+    layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
+
+    # Widget.
+    widget = QWidget()
+
+    widget.setLayout(layout)
+    widget.resize(300, 200)
+    widget.show()
+
+    # Change label context.
+    QTimer.singleShot(3000, lambda: updateLabel(label3))
+
+    sys.exit(app.exec())
+# }
+
+
+if '__main__' == __name__:
+    main()
diff --git a/Class-3/PyQt6/Class-1/res/04-Label.png b/Class-3/PyQt6/Class-1/res/04-Label.png
index c13910b2c743514ee647db2fad93516df08ab5a7..6d42aab22defb4740d98aba15a03e58543902da7 100644
GIT binary patch

From 2ebe7529d2b957a2308d873d14c7f1fd00af8388 Mon Sep 17 00:00:00 2001
From: Phoebus <tianjindahai@126.com>
Date: Sat, 10 Aug 2024 18:21:02 +0800
Subject: [PATCH 38/38] [PyQt] Add base control examples.

---
 Class-3/PyQt6/Class-1/05-PushButton/README.md |  29 ++++++++++
 Class-3/PyQt6/Class-1/05-PushButton/main.py   |  54 ++++++++++++++++++
 .../Class-1/06-HorizontalLayout/MainWindow.py |  50 ++++++++++++++++
 .../Class-1/06-HorizontalLayout/README.md     |  27 +++++++++
 .../PyQt6/Class-1/06-HorizontalLayout/main.py |  29 ++++++++++
 .../Class-1/07-VerticalLayout/MainWindow.py   |  51 +++++++++++++++++
 .../PyQt6/Class-1/07-VerticalLayout/README.md |  27 +++++++++
 .../PyQt6/Class-1/07-VerticalLayout/main.py   |  30 ++++++++++
 Class-3/PyQt6/Class-1/res/06-HBoxLayout.png   | Bin 0 -> 4798 bytes
 Class-3/PyQt6/Class-1/res/07-VBoxLayout.png   | Bin 0 -> 5811 bytes
 10 files changed, 297 insertions(+)
 create mode 100644 Class-3/PyQt6/Class-1/05-PushButton/README.md
 create mode 100644 Class-3/PyQt6/Class-1/05-PushButton/main.py
 create mode 100644 Class-3/PyQt6/Class-1/06-HorizontalLayout/MainWindow.py
 create mode 100644 Class-3/PyQt6/Class-1/06-HorizontalLayout/README.md
 create mode 100644 Class-3/PyQt6/Class-1/06-HorizontalLayout/main.py
 create mode 100644 Class-3/PyQt6/Class-1/07-VerticalLayout/MainWindow.py
 create mode 100644 Class-3/PyQt6/Class-1/07-VerticalLayout/README.md
 create mode 100644 Class-3/PyQt6/Class-1/07-VerticalLayout/main.py
 create mode 100644 Class-3/PyQt6/Class-1/res/06-HBoxLayout.png
 create mode 100644 Class-3/PyQt6/Class-1/res/07-VBoxLayout.png

diff --git a/Class-3/PyQt6/Class-1/05-PushButton/README.md b/Class-3/PyQt6/Class-1/05-PushButton/README.md
new file mode 100644
index 0000000..19c8c97
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/05-PushButton/README.md
@@ -0,0 +1,29 @@
+
+# Introduction
+
+PyQt6 QPushButton example.
+
+
+# Screenshot
+
+![PushButton](../res/05-PushButton.png)
+
+
+# API
+
+English:
+
+- [QPushButton](../../Class-0/QtWidget/QPushButton.md)
+- [QMessageBox](../../Class-0/QtWidget/QMessageBox.md)
+
+Chinese:
+
+- [QPushButton](../../Class-0/QtWidget/QPushButton.CN.md)
+- [QMessageBox](../../Class-0/QtWidget/QMessageBox.CN.md)
+
+
+# Usage
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/05-PushButton/main.py b/Class-3/PyQt6/Class-1/05-PushButton/main.py
new file mode 100644
index 0000000..3e1f35f
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/05-PushButton/main.py
@@ -0,0 +1,54 @@
+###
+# PyQt6 QPushButton example.
+#
+# License - MIT.
+###
+
+import sys
+from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QMessageBox
+from PyQt6.QtCore import Qt
+
+
+def buttonClick(widget: QWidget):
+# {
+    print('---- Button clicked. ----')
+
+    # message = QMessageBox()
+    # message.setText('Button clicked.')
+    # message.show()
+
+    QMessageBox.information(widget, 'Test', 'Button clicked.')
+# }
+
+
+# QPushButton API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QPushButton.html>
+# QMessageBox API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QMessageBox.html>
+def main():
+# {
+    app = QApplication([])
+    widget = QWidget()
+
+    # Controls.
+    button = QPushButton()
+
+    button.setText('OK')
+    button.setFixedSize(100, 30)
+    button.clicked.connect(lambda: buttonClick(widget))
+
+    # Layout.
+    layout = QVBoxLayout()
+
+    layout.addWidget(button)
+    layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
+
+    # Widget.
+    widget.setLayout(layout)
+    widget.setFixedSize(300, 200)
+    widget.show()
+
+    sys.exit(app.exec())
+# }
+
+
+if '__main__' == __name__:
+    main()
diff --git a/Class-3/PyQt6/Class-1/06-HorizontalLayout/MainWindow.py b/Class-3/PyQt6/Class-1/06-HorizontalLayout/MainWindow.py
new file mode 100644
index 0000000..6e0352b
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/06-HorizontalLayout/MainWindow.py
@@ -0,0 +1,50 @@
+###
+# PyQt6 QHBoxLayout main window.
+#
+# License - MIT.
+###
+
+from PyQt6.QtWidgets import QWidget, QHBoxLayout, QLabel
+from PyQt6.QtCore import Qt
+
+
+# QHBoxLayout API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QHBoxLayout.html>
+class MainWindow(QWidget):
+# {
+    def __init__(self):
+    # {
+        super().__init__()
+
+        # Proprities.
+        self.title = 'Horizontal Layout'
+
+        # Initilaze.
+        self.initUI()
+    # }
+
+    def initUI(self):
+    # {
+        self.setWindowTitle(self.title)
+        self.createLayout()
+    # }
+
+    def createLayout(self):
+    # {
+        colors = [
+            'background-color: red',
+            'background-color: green',
+            'background-color: blue'
+        ]
+
+        self.hboxLayout = QHBoxLayout(self)
+
+        for i, color in enumerate(colors, start = 1):
+            label = QLabel()
+            label.setText("Label " + str(i))
+            label.setAlignment(Qt.AlignmentFlag.AlignCenter)
+            label.setStyleSheet(color)
+            label.setFixedSize(100, 30)
+
+            self.hboxLayout.addWidget(label)
+    # }
+# }
diff --git a/Class-3/PyQt6/Class-1/06-HorizontalLayout/README.md b/Class-3/PyQt6/Class-1/06-HorizontalLayout/README.md
new file mode 100644
index 0000000..3f7e4c2
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/06-HorizontalLayout/README.md
@@ -0,0 +1,27 @@
+
+# Introduction
+
+PyQt6 QHBoxLayout example.
+
+
+# Screenshot
+
+![HorizontalLayout](../res/07-HBoxLayout.png)
+
+
+# API
+
+English:
+
+- [QHBoxLayout](../../Class-0/QtWidget/QHBoxLayout.md)
+
+Chinese:
+
+- [QHBoxLayout](../../Class-0/QtWidget/QHBoxLayout.CN.md)
+
+
+# Usage
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/06-HorizontalLayout/main.py b/Class-3/PyQt6/Class-1/06-HorizontalLayout/main.py
new file mode 100644
index 0000000..4fd0fef
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/06-HorizontalLayout/main.py
@@ -0,0 +1,29 @@
+###
+# PyQt6 QHBoxLayout example.
+#
+# License - MIT.
+###
+
+import sys
+from PyQt6.QtWidgets import QApplication
+
+# Locals
+from MainWindow import MainWindow
+
+
+def main():
+# {
+    app = QApplication([])
+
+    window = MainWindow()
+    window.show()
+
+    # Access class variable.
+    print(window.title)
+
+    sys.exit(app.exec())
+# }
+
+
+if '__main__' == __name__:
+    main()
diff --git a/Class-3/PyQt6/Class-1/07-VerticalLayout/MainWindow.py b/Class-3/PyQt6/Class-1/07-VerticalLayout/MainWindow.py
new file mode 100644
index 0000000..ab5578a
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/07-VerticalLayout/MainWindow.py
@@ -0,0 +1,51 @@
+###
+# PyQt6 QVBoxLayout main window.
+#
+# License - MIT.
+###
+
+from PyQt6.QtWidgets import QWidget, QVBoxLayout, QLabel
+from PyQt6.QtCore import Qt
+
+
+# QVBoxLayout API : <https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QVBoxLayout.html>
+class MainWindow(QWidget):
+# {
+    def __init__(self):
+    # {
+        super().__init__()
+
+        # Proprities.
+        self.title = 'Vertical Layout'
+
+        # Initilaze.
+        self.initUI()
+    # }
+
+    def initUI(self):
+    # {
+        self.setWindowTitle(self.title)
+        self.createLayout()
+    # }
+
+    def createLayout(self):
+    # {
+        colors = [
+            'background-color: red',
+            'background-color: green',
+            'background-color: blue'
+        ]
+
+        self.vboxLayout = QVBoxLayout(self)
+
+        for i, color in enumerate(colors, start = 1):
+            label = QLabel()
+            label.setText("Label " + str(i))
+            label.setAlignment(Qt.AlignmentFlag.AlignCenter)
+            label.setStyleSheet(color)
+            label.setFixedSize(100, 30)
+
+            self.vboxLayout.addWidget(label)
+            self.vboxLayout.setAlignment(Qt.AlignmentFlag.AlignHCenter)
+    # }
+# }
diff --git a/Class-3/PyQt6/Class-1/07-VerticalLayout/README.md b/Class-3/PyQt6/Class-1/07-VerticalLayout/README.md
new file mode 100644
index 0000000..10c0f8d
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/07-VerticalLayout/README.md
@@ -0,0 +1,27 @@
+
+# Introduction
+
+PyQt6 QVBoxLayout example.
+
+
+# Screenshot
+
+![VBoxLayout](../res/08-VBoxLayout.png)
+
+
+# API
+
+English:
+
+- [QVBoxLayout](../../Class-0/QtWidget/QVBoxLayout.md)
+
+Chinese:
+
+- [QVBoxLayout](../../Class-0/QtWidget/QVBoxLayout.CN.md)
+
+
+# Usage
+
+```bash
+$ python main.py
+```
diff --git a/Class-3/PyQt6/Class-1/07-VerticalLayout/main.py b/Class-3/PyQt6/Class-1/07-VerticalLayout/main.py
new file mode 100644
index 0000000..0657e2c
--- /dev/null
+++ b/Class-3/PyQt6/Class-1/07-VerticalLayout/main.py
@@ -0,0 +1,30 @@
+###
+# PyQt6 QVBoxLayout example.
+#
+# License - MIT.
+###
+
+import sys
+from PyQt6.QtWidgets import QApplication
+
+from MainWindow import MainWindow
+
+
+def main():
+# {
+    app = QApplication([])
+
+    window = MainWindow()
+
+    window.resize(300, 200)
+    window.show()
+
+    # Access class variable.
+    print(window.title)
+
+    sys.exit(app.exec())
+# }
+
+
+if '__main__' == __name__:
+    main()
diff --git a/Class-3/PyQt6/Class-1/res/06-HBoxLayout.png b/Class-3/PyQt6/Class-1/res/06-HBoxLayout.png
new file mode 100644
index 0000000000000000000000000000000000000000..c238eb96ec5c6e9de3ba3cbd4a2218b3f4bf58c1
GIT binary patch
diff --git a/Class-3/PyQt6/Class-1/res/07-VBoxLayout.png b/Class-3/PyQt6/Class-1/res/07-VBoxLayout.png
new file mode 100644
index 0000000000000000000000000000000000000000..d97e3d6b304082466c02e6503830edd23c3bf1bf
GIT binary patch
