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

Alexis Ménard alexis.menard at trolltech.com
Tue May 12 13:06:49 CEST 2009


On Tuesday 12 May 2009 12:45:07 Usman Ajmal wrote:
> 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

Inherits both from UI::MainWindow and QMainWindow.

And please read Qt docs and tutorials, it is explained.

Thanks.

>
>
> 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

-- 

Alexis Ménard
Software Engineer, Widgets Team 1
Qt Software, Nokia Norge AS, Sandakerveien 116, 0484 Oslo, Norway
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090512/5d1dbc63/attachment.html 


More information about the Qt-interest-old mailing list