PySide6学习笔记01

一、背景说明

首先说句PySide6真的很强大,从今天开始学习。网上资料比较零散,都以实例的形式展示。根据资料写了几个,感觉无法深入。顾根据官网内容学习一下。同时也记录下学习历程。

        

二、主要模块

1、QtCore

一种非常强大的无缝对象通信机制,称为信号和槽

可查询和可设计的对象属性

分层且可查询的对象树

2、QtGui

Qt GUI 模块提供了用于窗口系统集成、事件处理、OpenGL 和 OpenGL ES 集成、2D 图形、基本成像、字体和文本的类。这些类由 Qt 的用户界面技术内部使用,也可以直接使用,例如使用低级 OpenGL ES 图形 API 编写应用程序。

对于编写用户界面的应用程序开发人员来说,Qt 提供了更高级别的 API,例如 Qt Quick,它们比 Qt GUI 模块中的启用程序更合适

3、QtWidgets

提供一组用于构建用户界面的 C++ 技术的模块

QtWidgets 模块提供了一组 UI 元素来创建经典的桌面式用户界面。

QtWidgets是学习第一阶段重点,本阶段主要熟悉这类API,进行一些客户端工具的编程。

三、QtWidgets一些使用方法

Properties

  • acceptMode - The accept mode of the dialog

  • defaultSuffix - Suffix added to the filename if no other suffix was specified

  • fileMode - The file mode of the dialog

  • options - The various options that affect the look and feel of the dialog

  • supportedSchemes - The URL schemes that the file dialog should allow navigating to

  • viewMode - The way files and directories are displayed in the dialog

Functions

Signals

Static functions

  • def getExistingDirectory ([parent=None[, caption=””[, dir=””[, options=QFileDialog.Option.ShowDirsOnly]]]])

  • def getExistingDirectoryUrl ([parent=None[, caption=””[, dir=QUrl()[, options=QFileDialog.Option.ShowDirsOnly[, supportedSchemes=list()]]]]])

  • def getOpenFileName ([parent=None[, caption=””[, dir=””[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()]]]]]])

  • def getOpenFileNames ([parent=None[, caption=””[, dir=””[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()]]]]]])

  • def getOpenFileUrl ([parent=None[, caption=””[, dir=QUrl()[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()[, supportedSchemes=list()]]]]]]])

  • def getOpenFileUrls ([parent=None[, caption=””[, dir=QUrl()[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()[, supportedSchemes=list()]]]]]]])

  • def getSaveFileName ([parent=None[, caption=””[, dir=””[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()]]]]]])

  • def getSaveFileUrl ([parent=None[, caption=””[, dir=QUrl()[, filter=””[, selectedFilter=””[, options=QFileDialog.Options()[, supportedSchemes=list()]]]]]]])

  • def saveFileContent (fileContent[, fileNameHint=””])

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值