Answer the question
In order to leave comments, you need to log in
How to make a message appear above lineedit?
We need the showText function to show a message near the cell (like a tooltip, but with a different text). The first argument is the coordinates. On the line shown in the code, it outputs it above the cell, but well above it. Does anyone understand this?
QtWidgets.QToolTip.showText(window.mapToGlobal(self.ui.lineEdit.pos()), "Текст ", self.ui.lineEdit)
Answer the question
In order to leave comments, you need to log in
And so?
QtWidgets.QToolTip.showText(self.ui.lineEdit.mapToGlobal(QPoint(), …)
…(QPoint(0, self.ui.lineEdit.height))…
. The docs say that the coordinates are for the "point of interest" and that the text is shown "at a platform-specificDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question