2
我已經實現了一個Python簡單的應用程序,沒有任何動畫。 現在我想添加一個簡單的動畫,由一個信號觸發(例如一個按鈕點擊),觸發時會放大窗口的寬度並顯示一個新文本區域,其中包含一些文本。PyQt4 - 添加文本編輯區域動畫示例
老實說,我對python/pyqt4相當陌生,對動畫框架我不太瞭解。
我想這在一個名爲點擊有關菜單:)上的方法添加到我的類代碼,例如:
self.anim = QPropertyAnimation(self, "size")
self.anim.setDuration(2500)
self.anim.setStartValue(QSize(self.width(), self.height()))
self.anim.setEndValue(QSize(self.width()+100, self.height()))
self.anim.start()
,這擴大了我的窗前,我想。
不幸的是我不知道如何插入一個新的文本區域,避免已經存在,以填補新的空間小部件(實際上,當窗口放大,窗口小部件使用 所有的空間,從而擴大自己)
有人可以幫助我知道如何添加文本區域外觀動畫?
任何幫助表示讚賞......真的達到這個