class_docstr: Form Dialog
class_docstr_tok: ["Form","Dialog"]
code: def __init__(
      self,
      data,
      title="",
      comment="",
      icon=None,
      parent=None,
      apply=None,
  ):
      QtWidgets.QDialog.__init__(self, parent)
  
      self.apply_callback = apply
  
      # Form
      if isinstance(data[0][0], (list, tuple)):
          self.formwidget = FormTabWidget(
              data, comment=comment, parent=self
          )
      elif len(data[0]) == 3:
          self.formwidget = FormComboWidget(
              data, comment=comment, parent=self
          )
      else:
          self.formwidget = FormWidget(
              data, comment=comment, parent=self
          )
      layout = QtWidgets.QVBoxLayout()
      layout.addWidget(self.formwidget)
  
      self.float_fields = []
      self.formwidget.setup()
  
      # Button box
      self.bbox = bbox = QtWidgets.QDialogButtonBox(
          QtWidgets.QDialogButtonBox.Ok
          | QtWidgets.QDialogButtonBox.Cancel
      )
      self.formwidget.update_buttons.connect(self.update_buttons)
      if self.apply_callback is not None:
          apply_btn = bbox.addButton(QtWidgets.QDialogButtonBox.Apply)
          apply_btn.clicked.connect(self.apply)
  
      bbox.accepted.connect(self.accept)
      bbox.rejected.connect(self.reject)
      layout.addWidget(bbox)
  
      self.setLayout(layout)
  
      self.setWindowTitle(title)
      if not isinstance(icon, QtGui.QIcon):
          icon = (
              QtWidgets.QWidget()
              .style()
              .standardIcon(QtWidgets.QStyle.SP_MessageBoxQuestion)
          )
      self.setWindowIcon(icon)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import copy
  import datetime
  import warnings
  import six
  from matplotlib import colors
  from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
label_desc: Use image node_id 1 to create a new FormDialog object from inherited base classes: QtWidgets with example: obj = FormDialog(data, title, comment, icon, parent, apply)