QT控件基本用法介绍
QT6 6.7.2
所有代码github链接
01-helloWorld
控件类:QLabel
作用:helloWorld
结果展示:
02-PictureToIcon
控件类:QLabel
QGroupBox
QPushButton
作用:将图片(.jpg, .png, .bmp)转换为图标(.ico)
结果展示:
点击选择图片
会出现下面弹窗,选择一张图片
最终效果展示:
03-TextToSpeech
控件类:QLabel
QGroupBox
QPushButton
QDoubleSpinBox
QTextEdit
QTextToSpeech
作用:将文本转换为语音
QTextToSpeech
应用细节
结果展示:
04-MutiIntterfaces
控件类: QPushButton
作用:多界面交互
结果展示:
点击打开界面2
,会关闭主界面,打开下面界面,点击关闭界面2
,会关闭界面2,打开主界面
04-MutiInterfaces-01
控件类: QPushButton
QTexBrowser
QTextEdit
作用:多界面交互, 并从主界面发送data到界面2,或者从界面2发送信息到主界面
结果展示:
05-switch
控件类: QPushButton
QComboBox
作用:下拉选项框应用
结果展示:
06-Chart
控件类: QChartView
类:QValueAxis
QLineSeries
作用:chart曲线展示
QChartView
应用细节
结果展示: