[Qt-interest] Problem with all the widgets in QT... every widget showing error

Neeraj Jhawar navderm at gmail.com
Sun Jan 11 05:22:06 CET 2009


Hie All,

I was working with a program.. I tried running it..(after checking it
meticulously for errors myself). but now it shows errors...

Whats bizzare is it is showing some error with each and every widget
placed in the program.
I am guessing it to be a problem with linking the header file which
contains the declaration with the .cpp file which contains the
definition and all the call to those in various layout.
Another thing which is bad is it shows errors with layouts as well...

I am posting the error with one of the widget... Please help me find a solution

*******************************************************************************************
/usr/local/qt/include/qlabel.h:163: candidates are: QLabel::QLabel(const
   QLabel&)
/usr/local/qt/include/qlabel.h:66:                 QLabel::QLabel(QWidget*,
   const QString&, QWidget*, const char* = 0, unsigned int = 0)
/usr/local/qt/include/qlabel.h:64:                 QLabel::QLabel(const
   QString&, QWidget*, const char* = 0, unsigned int = 0)
/usr/local/qt/include/qlabel.h:62:                 QLabel::QLabel(QWidget*,
   const char* = 0, unsigned int = 0)
controllerqt.cpp:165: no matching function for call to `QLabel::QLabel(QString)
   '
*******************************************************************************************

the point is i have seen the code and the exact place where the
problem occurs, i have written "this" to signify the main widget.
It should have taken it as QWidget* but is taking as QString.

ALSO : I AM USING QT3 AND HAD TRIED TO INSTALL QT4. SINCE IT DID NOT
INSTALL BECAUSE OF LACK OF PROPER DRIVERS..I HAD conf cleaned IT. HOPE
THERE ARE NO TRACES OF QT4 CREATING THIS PROBLEM. IF NOT I AM JUST NOT
ABLE TO FIND THE SOLUTION TO THIS.
please please help.

I am also sending all the 4 files
1. .h
2. .h (containing the definition of 2 structures)
3. .cpp
4. main.cpp

In case it may be required....

Sincerely,


-- 
Neeraj Jhawar
Senior Undergraduate
Mechanical Engineering Department
Punjab Engineering College
Chandigarh.
India
-------------- next part --------------
A non-text attachment was scrubbed...
Name: controllerqt.h
Type: application/octet-stream
Size: 3147 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090111/3eac44bc/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data_structs.h
Type: application/octet-stream
Size: 621 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090111/3eac44bc/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: controllerqt.cpp
Type: application/octet-stream
Size: 25396 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090111/3eac44bc/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 223 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090111/3eac44bc/attachment-0003.obj 


More information about the Qt-interest-old mailing list