In đậm chuỗi trong python

Trong bài viết này, chúng ta sẽ xem cách chúng ta có thể kiểm tra xem văn bản của hộp quay có được in đậm không, để đặt phông chữ, hãy sử dụng phương thức setFont lấy đối tượng QFont làm đối số. Để làm cho văn bản tôi. e phông chữ đậm, chúng ta phải lấy đối tượng QFont của hộp xoay, sau đó làm đậm nó rồi gán lại cho hộp xoay. Để có được thông tin về phông chữ, chúng ta phải lấy đối tượng QFontInfo của hộp xoay có thể được thực hiện bằng phương thức fontInfo

Để làm điều này, chúng tôi in đậm phương thức với đối tượng QFontInfo của hộp quay

cú pháp. font_info. in đậm[]

Tranh luận. Nó không có đối số

Trở lại. Nó trả về bool

Dưới đây là việc thực hiện

Python3




> Text that will be indented when the Markdown is rendered.
7

> Text that will be indented when the Markdown is rendered.
8
> Text that will be indented when the Markdown is rendered.
9
> Text that will be indented when the Markdown is rendered.
0
> Text that will be indented when the Markdown is rendered.
1

> Text that will be indented when the Markdown is rendered.
8
> Text that will be indented when the Markdown is rendered.
3
> Text that will be indented when the Markdown is rendered.
0
> Text that will be indented when the Markdown is rendered.
5

> Text that will be indented when the Markdown is rendered.
8
> Text that will be indented when the Markdown is rendered.
80
> Text that will be indented when the Markdown is rendered.
0
> Text that will be indented when the Markdown is rendered.
1

> Text that will be indented when the Markdown is rendered.
8
> Text that will be indented when the Markdown is rendered.
84
> Text that will be indented when the Markdown is rendered.
0
> Text that will be indented when the Markdown is rendered.
1

> Text that will be indented when the Markdown is rendered.
0
> Text that will be indented when the Markdown is rendered.
88

 

 

> Text that will be indented when the Markdown is rendered.
89
> Text that will be indented when the Markdown is rendered.
90

 

> Text that will be indented when the Markdown is rendered.
91
> Text that will be indented when the Markdown is rendered.
92
> Text that will be indented when the Markdown is rendered.
93
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
95

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
97______298

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
00

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
03

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
05

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
08
> Text that will be indented when the Markdown is rendered.
09
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
09
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
13
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
15
> Text that will be indented when the Markdown is rendered.
16

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
18

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
81

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
83

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
86

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
88

> Text that will be indented when the Markdown is rendered.
91
> Text that will be indented when the Markdown is rendered.
92
> Text that will be indented when the Markdown is rendered.
31
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
95

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
35

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94____338
> Text that will be indented when the Markdown is rendered.
39
> Text that will be indented when the Markdown is rendered.
00
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
16

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
04

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
07
> Text that will be indented when the Markdown is rendered.
09
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
09
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
52
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
54
> Text that will be indented when the Markdown is rendered.
16

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
57

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
80
> Text that will be indented when the Markdown is rendered.
81
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
83
> Text that will be indented when the Markdown is rendered.
16

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
86

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
89

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
801

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
804

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
806

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
808
> Text that will be indented when the Markdown is rendered.
39
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
811

> Text that will be indented when the Markdown is rendered.
96

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
814

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
816
> Text that will be indented when the Markdown is rendered.
817
> Text that will be indented when the Markdown is rendered.
16

> Text that will be indented when the Markdown is rendered.
96

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
821

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
824

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
826

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
828
> Text that will be indented when the Markdown is rendered.
39
> Text that will be indented when the Markdown is rendered.
830
> Text that will be indented when the Markdown is rendered.
94
> Text that will be indented when the Markdown is rendered.
16

 

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
834

> Text that will be indented when the Markdown is rendered.
96
> Text that will be indented when the Markdown is rendered.
836
> Text that will be indented when the Markdown is rendered.
09
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
839
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
841
> Text that will be indented when the Markdown is rendered.
10
> Text that will be indented when the Markdown is rendered.
843
> Text that will be indented when the Markdown is rendered.
16

Bạn có thể sử dụng phông chữ đơn cách cho đường dẫn tệp, tên tệp, văn bản thông báo mà người dùng nhìn thấy hoặc văn bản mà người dùng nhập vào

Ngắt dòng Đôi khi đánh dấu không thực hiện ngắt dòng khi bạn muốn. Để buộc ngắt dòng, hãy sử dụng đoạn mã sau.
> Text that will be indented when the Markdown is rendered.
6IndentingSử dụng dấu lớn hơn [>] theo sau là khoảng trắng, ví dụ.
> Text that will be indented when the Markdown is rendered.

Mọi văn bản tiếp theo được thụt lề cho đến khi xuống dòng tiếp theo

Dấu đầu dòng Để tạo dấu đầu dòng tròn, hãy sử dụng một trong các phương pháp sau. Mỗi gạch đầu dòng phải nằm trên một dòng riêng
  • Ví dụ: dấu gạch nối [-] theo sau là một hoặc hai dấu cách.
    > Text that will be indented when the Markdown is rendered.
    7
  • Ví dụ: dấu cách, dấu gạch ngang [-] và dấu cách.
    > Text that will be indented when the Markdown is rendered.
    7
  • Ví dụ: dấu hoa thị [*] theo sau là một hoặc hai dấu cách.
    > Text that will be indented when the Markdown is rendered.
    9

Để tạo dấu đầu dòng phụ, nhấn Tab trước khi nhập dấu đầu dòng bằng một trong các phương pháp được mô tả ở trên. Ví dụ.

- Main bullet point
     - Sub bullet point

Danh sách được đánh số Để tạo danh sách được đánh số, hãy nhập
- Main bullet point
     - Sub bullet point
0 theo sau là khoảng trắng, ví dụ.
1. Numbered item
1. Numbered item

Để đơn giản, bạn sử dụng

- Main bullet point
     - Sub bullet point
0 trước mỗi mục nhập. Danh sách sẽ được đánh số chính xác khi bạn chạy ô

Để tạo substep nhấn Tab trước khi vào mục đánh số chẳng hạn.

1. Numbered item
     1. Substep

Hộp ghi chú màuSử dụng một trong các thẻ
- Main bullet point
     - Sub bullet point
2 sau để hiển thị văn bản trong hộp màu

Hạn chế. Không phải tất cả mã Markdown đều hiển thị chính xác trong thẻ

- Main bullet point
     - Sub bullet point
2, vì vậy hãy xem xét cẩn thận các hộp màu của bạn.

Ví dụ: để in đậm một từ, hãy bao quanh từ đó bằng mã HTML để in đậm [

- Main bullet point
     - Sub bullet point
4 thay vì mã Markdown

Màu của hộp được xác định bởi loại cảnh báo mà bạn chỉ định

  • Hộp màu xanh [
    - Main bullet point
         - Sub bullet point
    5]
    > Text that will be indented when the Markdown is rendered.
    4
  • Ô màu vàng [
    - Main bullet point
         - Sub bullet point
    6]______16
  • Hộp màu xanh lá cây [______57]
    > Text that will be indented when the Markdown is rendered.
    8
  • Hộp màu đỏ [______58]
    > Text that will be indented when the Markdown is rendered.
    0

Đồ họaBạn có thể đính kèm tệp hình ảnh trực tiếp vào sổ ghi chép trong ô Markdown bằng cách kéo và thả sổ ghi chép vào ô

Để thêm hình ảnh vào các loại ô khác, bạn phải sử dụng đồ họa được lưu trữ trên web và sử dụng mã sau để chèn đồ họa.

> Text that will be indented when the Markdown is rendered.
10

Hạn chế. Bạn không thể thêm chú thích vào đồ họa.

Hình dạng hình học Sử dụng
- Main bullet point
     - Sub bullet point
9 theo sau là số tham chiếu thập phân hoặc hex cho hình dạng, ví dụ.
> Text that will be indented when the Markdown is rendered.
11

Để biết danh sách các số tham chiếu, hãy xem UTF-8 Hình dạng hình học

Các đường kẻ ngang Trên một dòng mới, nhập ba dấu hoa thị.
> Text that will be indented when the Markdown is rendered.
12Liên kết nội bộ Để liên kết đến một phần trong sổ ghi chép của bạn, hãy sử dụng mã sau.
> Text that will be indented when the Markdown is rendered.
13

Đối với văn bản bên trong dấu ngoặc đơn, hãy thay thế bất kỳ dấu cách và ký tự đặc biệt nào bằng dấu gạch nối. Ví dụ: nếu phần của bạn có tên là Phân tích thói quen mua hàng của khách hàng, bạn sẽ nhập.

> Text that will be indented when the Markdown is rendered.
14

Chủ Đề