My PyCharm IDE is telling me it does not recognize QtWidgets, even though I have this import:
from PyQt5.QtWidgets import QMainWindow, QMenu, QLineEdit, QComboBox, QFileDialog, QMessageBox, QPushButton, QToolTip, QWidget
To copy to clipboard, switch view to plain text mode
I then added: (below import above):
from PyQt5 import QtWidgets
from PyQt5 import QtWidgets
To copy to clipboard, switch view to plain text mode
That import got rid of the 'not recognized' issue, and no errors when run. I changed the event to MouseButtonRelease so the message would show for the 5 seconds. However, 1) the tooltip shows well away from the line edit. Is the source.pos() supposed to make the tooltip show next to the line edit that was clicked?
thanks for your response
Bookmarks