[Qt-interest] Problem with getExistingDirectory....Please advise

Usman Ajmal uzmanajmal at gmail.com
Tue May 12 12:45:07 CEST 2009


Ahaan...right. Did not think of this.

Can you plz then suggest me some other option that i may use in my code,
related snippets of whose are:
http://pastebin.com/d3eb40a10
http://pastebin.com/d559a1d86


On Tue, May 12, 2009 at 2:04 PM, Srdjan Todorovic <
todorovic.s at googlemail.com> wrote:

> Hi,
>
> 2009/5/12 Usman Ajmal <uzmanajmal at gmail.com>:
> > Thank you very much Thiago...
> >
> > One more favor....am getting following error:
> >
> > error: no matching function for call to
> > ‘MyFileDialog::getExistingDirectory(Ui::MainWindow* const, const char
> [23],
> > QString, bool)’
> > filedialog.h:41: note: candidates are: static QString
> > MyFileDialog::getExistingDirectory(QWidget*, const char*, const QString&,
> > bool, bool)
>
> Ui_MainWindow is more like a panter. It's not an actual dialog. It
> creates the widgets and adds them to a dialog.
>
> Consider:
>   QDialog dlg;
>   Ui_MainWindow dialogPainter;
>
>   dialogPainter.setup(&dlg);
>
> The dialogPainter sets up the dialog's widgets on the supplied dialog.
> (Yes dialogPainter might not be a very good name for this.)
>
> > I know what the error says i.e. i have to use QWidget but don't know how
> to
> > resolve it. Following are the snippets of code...
>
> Best way is to stop treating Ui_MainWindow as a dialog. Have a look at
> the produced header to see what it does.
>
> Good luck,
>
> Srdjan
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090512/0d1b5e4e/attachment.html 


More information about the Qt-interest-old mailing list