The python package library used here is qgis.PyQt.QtWidgets.
QAction is a PyQt class that represents an action that can be taken by a user on a toolbar, menu, or contextual menu. The setText method is used to set the text of the action.
Example:
# importing required libraries from qgis.PyQt.QtWidgets import QAction
# creating a new QAction instance action = QAction()
# setting the text of the action action.setText("New Action")
# adding the action to a toolbar toolbar.addAction(action)
In this example, we are creating a new QAction instance and setting its text to "New Action". Then we are adding the action to a toolbar.
From the example, it can be determined that the package library used is qgis.PyQt.QtWidgets.
Python QAction.setText - 17 examples found. These are the top rated real world Python examples of qgis.PyQt.QtWidgets.QAction.setText extracted from open source projects. You can rate examples to help us improve the quality of examples.