qgis-sample-QgsNewNameDialog.py

# coding: utf-8
from qgis.gui import QgsNewNameDialog

new_name_dialog = QgsNewNameDialog()

new_name_dialog.show()