Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A questions about function parameter #18

Open
NEKO-ii opened this issue Oct 26, 2022 · 1 comment
Open

A questions about function parameter #18

NEKO-ii opened this issue Oct 26, 2022 · 1 comment

Comments

@NEKO-ii
Copy link

NEKO-ii commented Oct 26, 2022

在setup_main_window.py文件中有一个名为setup_gui的函数. 我认为它的参数不应该是self,而是一个类型为MainWindow的参数.我按照我的想法修改后程序依旧良好运行,修改后编辑器能够正常识别ui等属性.

In the setup_main_window.py file there is a function called setup_gui. I don't think the argument should be self, but a parameter of type MainWindow. I modified the program according to my idea and it still works well. After modification, the editor can recognize ui and other properties normally.

English is translated by software, hope it can convey my meaning, THANKS :)

def setup_gui(mainw: MainWindow):

@le-cheng
Copy link

le-cheng commented Apr 7, 2024

I don't think it's canonical to call the instance method directly in the code, the "self" passed to SetupMainWindow.setup_btns(self) should be "MainWindow", which could be This may cause misunderstanding. I don't know if I understand correctly. @Wanderson-Magalhaes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants