pyqt在控件上創建圖片

# text=self.UserName.text()
        # if  text.isEmpty():
        #     imgpath=r'Image/lineclose.png'
        #     self.ButtonShowKeyboard = QToolButton(self)
        #     self.ButtonShowKeyboard.setCursor(Qt.PointingHandCursor)
        #     self.ButtonShowKeyboard.setFocusPolicy(Qt.NoFocus)
        #     self.ButtonShowKeyboard.setIcon(QIcon(imgpath))
        #     self.ButtonShowKeyboard.setStyleSheet("background: transparent; border:

none;")
        #     layout = QHBoxLayout(self)
        #     layout.addWidget(self.ButtonShowKeyboard,0,Qt.AlignRight)
        #     layout.setSpacing(0)
        #     layout.setMargin(5)
        #
        #     self.UserName.setLayout(layout)
        #     layout.addWidget(self.ButtonShowKeyboard,0,Qt.AlignRight)
        #     self.PassWords.setLayout(layout)
        #
        #     self.ButtonShowKeyboard.setToolTip(QApplication.translate("None", "Show

virtual keyboard", None, QApplication.UnicodeUTF8))



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章