The Python Code Analyzer does not know about Squish’s Qt Convenience API functions (Qt.LeftButton, etc.), which results in the Undefined variable Qt warning.
Configure the Code Analysis to ignore Qt.* as an undefined variable
Select Edit > Preferences (Mac: Squish IDE > Preferences)
Expand PyDev > Editor and select Code Analysis
Append ,Qt to the existing content in the Consider the following names as globals box
When you close and re-open the script you were working with, or fresh the code analysis by making changes to your script, the Undefined variable Qt warning no longer appears.
While disabling warnings (especially globally) is not an advised approach, in this case, the Qt warning can be ignored.