title: matplotlib fedit formdialog does not work when there is no float field
body: <pre><code>from matplotlib.backend_tools import ToolBase
  from matplotlib.backends.qt_editor._formlayout import fedit
  import matplotlib.pyplot as plt
  import matplotlib
  import pandas as pd
  import os
  
  class Save(ToolBase):
      &quot;&quot;&quot;
      Save dataframe to csv, xlsx, json, ubin, or hdf
  
      &quot;&quot;&quot;
      default_keymap = 'X'
      description = 'Save dataframe to csv, xlsx, json, ubin, or hdf'
      image = ''
      df = pd.read_hdf('C:\Python\PY3810_64v1\Lib\site-packages\mpa_prod\data\sample.h5')
  
      def __init__(self, *args, **kwargs):
          super().__init__(*args, **kwargs)
  
      def trigger(self, *args):
          datalist = [('File Type', ['', '', 'xlsx', 'csv', 'json', 'ubin', 'hdf']),
                      ('', 0.0), # if this line is commented out, the code stops working with matplotlib plot
                      ('File Path', os.getcwd())]
  
          def apply_callback(data):
              (file, path) = data
              if file == 'csv':
                  Save.df.to_csv('path')
  
          fedit(datalist, 'Save', 'Save the current dataframe', parent=None, apply=apply_callback)
  
  if __name__ == '__main__':
      matplotlib.use('Qt5Agg', force=True)
      plt.rcParams['toolbar'] = 'toolmanager'
      fig, ax = plt.subplots()
      fig.canvas.manager.toolmanager.add_tool('Save', Save)
      fig.canvas.manager.toolbar.add_tool('Save', 1, -1)
      plt.show()
  </code></pre>
  <p>I want to use everything this amazing tool has to offer but i want to remove the float field. If i remove the float field in the datalist, the dialog box does not appear. Has anyone encountered this issue and fixed it?</p>