Hi Matthias, thanks to your input I solved with a try-except loop. Just for information:
test_dict = {} test_dict = dd.fromkeys(dd) # test_dict has the same keys of dd but values are all empty for i, k in enumerate(dd.keys()): try: map(int, dd.values()[i]) test_dict[k] = QVariant.Int except: try: map(float, dd.values()[i]) test_dict[k] = QVariant.Double except: map(str, dd.values()[i]) test_dict[k] = QVariant.String Thanks again! Cheers Matteo _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user