I was working with Qt designer and I wanted to be able to add a QFileDialog from within it.

Since I didn't see the QFileDialog as one of the items in the widget box, I tried the following to see if I could get it to work:

1) added a QLineEdit where the QFileDialog should be
2) promoted it and entered the following:
cusomclassname = QFileDialog
header file = qfiledialog.h
3) saved the ui file.

When I did this and compiled the program, it worked with no errors, however there is nothing showing where the QFileDialog should be, not even a QLineEdit.

What is the correct method I should use to have access to other widgets that are not in the designer by default? Also is there a way I can add QFileDialog to the widget box so I can drag and drop it like the other included widgets?