Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create UE Blueprint with PyQt in python programming

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "python programming how to use PyQt to create UE blueprint", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "python programming how to use PyQt to create UE blueprint" bar!

Realization idea

1. Site deployment: we need a place where we can draw nodes! Take a closer look at the basic use of QGraphicsScene and QGraphicsView in this article. This article also uses the same method of PyQt to make a preview window (mini-map in the game).

2. Node creation: we need to customize the node, that is, what is in the box in the following figure, which is mainly related to QGraphicsItem in Qt. We can customize the node style by inheriting this class.

3. Connection: what is involved is QGraphicsLineItem in Qt. Inherit this class and customize the connection style in paint. For example, I use the Bezier curve of qt here.

The effect is as follows: nodes can be connected to each other through ports.

1. Site deployment class EditorView (QGraphicsView): def _ init__ (self, parent=None): super (EditorView, self). _ init__ (parent) self.parent = parent self.scaleFactor = 1 self.lastPos = QPointF () self.scene = EditorScene (self) self.setScene (self.scene) self.setSceneRect (- 1)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report