I created this slot:
public slots:
void openNSelect();
then in the function :
QFileDialog::getOpenFileName(this,tr("select file"),"/home/",tr("text file(*.txt)"));
it doesn’t show me the dialog,if I write that line in some other function like in the QMainWindow constructor,it did show me the window. the project is created using kdevelop with mainwindow object.
Put some debugs to ensure the slot is actually firing. Half the time its a typo in the signal/slot connect that fails to wire up.
If not post more code so we can get a better idea.