[Qt-creator] Problem with Writing a Simple Program with Qt Creator
Sarah Smith
sarah.j.smith at nokia.com
Mon Jul 27 01:28:33 CEST 2009
Hi Nitesh,
Check that you have:
#include "ui_textfinder.h"
at the top of textfinder.cpp. Normally QtCreator will have put this
declaration there for you.
When QtCreator generates your textfinder.h it will put
namespace Ui {
class TextFinder;
};
at the top - this just forward declares Ui::TextFinder - it will show
up as an undefined type until the header is included.
If the #include is present, then check that you named the class in
your ui form correctly - it is case sensitive and should be exactly
"TextFinder" in the first line of the property sheet.
Hope that helps,
Sarah Smith
On 27/07/2009, at 4:07 AM, ext Nitesh wrote:
> I am new to Qt. I was trying around Qt Creator. I did exactly what
> its been wriiten here
>
>
> http://doc.qtsoftware.com/qtcreator-1.2/creator-writing-program.html
>
> but when I try to build it . I get this error. This is the first
> error. I don't seem to find a solution.
>
> C:/qtprojects/TextFinder/textfinder.cpp:9: error: invalid use of
> undefined type `struct Ui::TextFinder'
>
>
> Why is it showing error?
>
>
> Thanks in advance for your help.
>
> Nitesh
> <ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090727/e438dae9/attachment.html
More information about the Qt-creator-old
mailing list