Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
354 views
in Technique[技术] by (71.8m points)

python - 使用QtCreator在PyQT5中插入自定义窗口小部件类[重复](insert custom widget class in PyQT5 using QtCreator [duplicate])

I need to somehow place my custom widget QfieldCell with QtCreator into some .ui file, and then use it in code.

(我需要以某种方式将我的自定义小部件QfieldCell和QtCreator放入某个.ui文件中,然后在代码中使用它。)

class QFieldCell(QtWidgets.QPushButton):
    def __init__(self, column, row):
        QtWidgets.QPushButton.__init__(self)
        self.x = column
        self.y = row
        self.clicked.connect(self.click)

    def click(self):
        print "me"

I found some articles about this, but all I get is this:

(我找到了一些有关此的文章,但我得到的只是:)

推广小部件

now I have no idea how to connect this 2 together.

(现在我不知道如何将这2连接在一起。)

  ask by Rreit translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...