[Qt-interest] Problem with getExistingDirectory....Please advise
Usman Ajmal
uzmanajmal at gmail.com
Tue May 12 19:29:09 CEST 2009
@ Alexis
did that too but if i inherit from both then it says
No such slot QMainWindow::saddDirectory :)
Anyways...better to look in tutorials, as you suggested.
Thanks.
On Tue, May 12, 2009 at 4:06 PM, Alexis Ménard
<alexis.menard at trolltech.com>wrote:
> 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/c5ac00c8/attachment.html
More information about the Qt-interest-old
mailing list