How to convert stringVar() from tk to pyqt

后端 未结 1 1406
时光取名叫无心
时光取名叫无心 2021-01-23 21:09

I have this function as part of my code and I am trying to move from tk to pyqt, but I do not have much experience in pyqt. I am trying to generate a list of Tkinter string vari

1条回答
  •  遥遥无期
    2021-01-23 21:52

    There are a few differences between pyQt and Qt. One important difference is that there is no explicit need for QString (see here). pyQt is fully compatible with Python built-in string type. Your code will look something like this.

    def generate_stringvars(self):
        temp_entriesx = []
        count = 0
        while count < 21:
            temp_entriesx.append("")
            count += 1
        return temp_entriesx
    

    0 讨论(0)
提交回复
热议问题