小编kev*_*701的帖子

居中和顶部对齐 QVBoxLayout

我想让两个代码同时工作,但我不知道该怎么做。

self.botV.setAlignment(Qt.Aligntop)
self.botV.setAlignment(Qt.AlignCenter)
Run Code Online (Sandbox Code Playgroud)

它只做最后一项。

python pyqt python-3.x pyqt5

3
推荐指数
1
解决办法
5050
查看次数

类型错误:* 后的 start() 参数必须是可迭代的,而不是 int

我想在线程中运行一些计时器?但它显示错误TypeError: start() argument after * must be an iterable, not int?我该如何解决?

    while 1:
            try:
                _thread.start_new_thread(self.timer0.start,100)
                _thread.start_new_thread(self.timer1.start,150)
                _thread.start_new_thread(self.timer2.start,200)
                _thread.start_new_thread(self.timer3.start,250)
                _thread.start_new_thread(self.timer4.start,300)
                break
            except:
                print ("Error: unable to start thread")
            break
Run Code Online (Sandbox Code Playgroud)

python pyqt

1
推荐指数
1
解决办法
8672
查看次数

标签 统计

pyqt ×2

python ×2

pyqt5 ×1

python-3.x ×1