Although your address book application is useful in its own right, it would be useful if you could exchange contact data with other applications. The vCard format is a popular file format that can be used for this purpose. In this chapter, you extend our address book client to allow contacts to be exported to vCard .vcf files.
Add a push button into our layout by dragging and dropping it in, with exportButton as its objectName. The toolTip property is set to Export as vCard.
Declare a public slot, exportAsVCard(), in your header file.
Within the AddressBook constructor, connect exportButton's clicked() signal to exportAsVCard().