Since we have covered the topic about message boxes, let's also learn about the other type of dialog—the File Selection Dialog. The File Selection Dialog is also very useful, especially if your application frequently deals with files. It is extremely unpleasant to ask users to key in the absolute path of the file they wanted to open, so the File Selection Dialog is very handy in this kind of situation.
Qt provides us with a built-in File Selection Dialog that looks exactly the same as the one we see in our operating system, and therefore, it won't feel unfamiliar to the users. The File Selection Dialog essentially only does one thing—it lets the user pick the file(s) or folder they want and return the path(s) of the selected file(s) or folder; that's all. In fact, it is not in charge of opening the file and reading its...