PySide/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 22: Line 22:
[[File:PySideScreenSnapshot2.jpg]]
[[File:PySideScreenSnapshot2.jpg]]


'''Familiarize yourself with some real-world examples of PySide'''
PySide is described in the following 3 pages which should follow on one from each other:
* [[PySide Beginner Examples]] (Hello World, announcements, enter text, enter number)

* [[PySide_Beginner_Examples|Beginner PySide Examples]] (Hello World, announcements, enter text, enter number)
* [[PySide Intermediate Examples]] (window sizing, hiding widgets, popup menus, mouse position, mouse events)
* [[PySide_Medium_Examples|Medium PySide Examples]] (window sizing, hiding widgets, popup menus, mouse position, mouse events)
* [[PySide Advanced Examples]] (widgets etc.)
* [[PySide_Advanced_Examples|Advanced PySide Examples]] (widgets etc.)


They divide the subject matter into 3 parts, differentiated by level of exposure to PySide, Python and the FreeCAD internals. The first page has overview and background material giving a description of PySide and how it is put together while the second and third pages are mostly code examples at different levels.
They divide the subject matter into 3 parts, differentiated by level of exposure to PySide, Python and the FreeCAD internals. The first page has overview and background material giving a description of PySide and how it is put together while the second and third pages are mostly code examples at different levels.
Line 39: Line 38:


[[Category:Poweruser Documentation]]
[[Category:Poweruser Documentation]]

[[Category:Developer]]

[[Category:Developer Documentation]]
{{clear}}
{{clear}}

Revision as of 10:27, 26 July 2019

Pivy
FeaturePython Objects

PySide

PySide это привязка Python кросс-платформенного инструментария GUI Qt. FreeCAD использует PySide для всех целей GUI (графический интерфейс пользователя) внутри Python. PySide является альтернативой пакету PyQt, который ранее использовался FreeCAD для своего графического интерфейса. PySide имеет более допустимую лицензию. Увидеть Differences Between PySide and PyQt для получения дополнительной информации о различиях.

Пользователи FreeCAD часто добиваются всего, используя встроенный интерфейс. Но для пользователей, которые хотят настроить свои операции, существует интерфейс Python, который описан в Python Scripting Tutorial. Интерфейс Python для FreeCAD обладает большой гибкостью и мощью. Для взаимодействия с пользователем Python с FreeCAD использует PySide, что описано на этой странице.

Python предлагает оператор 'print', который дает код:

print 'Hello World'

С оператором 'print' Python вы имеете только ограниченный контроль над внешним видом и поведением. PySide предоставляет отсутствующий элемент управления, а также обрабатывает среды (такие как среда макрофайловых файлов FreeCAD), где встроенных средств Python недостаточно.

Возможности PySide варьируются от:

до:

Familiarize yourself with some real-world examples of PySide

They divide the subject matter into 3 parts, differentiated by level of exposure to PySide, Python and the FreeCAD internals. The first page has overview and background material giving a description of PySide and how it is put together while the second and third pages are mostly code examples at different levels.

The intention is that the associated pages will provide simple Python code to run PySide so that the user working on a problem can easily copy the code, paste it into their own work, adapt it as necessary and return to their problem solving with FreeCAD. Hopefully they don't have to go chasing off across the internet looking for answers to PySide questions. At the same time this page is not intended to replace the various comprehensive PySide tutorials and reference sites available on the web.

Pivy
Scripted objects