Qt 4.7 : error: call of overloaded ‘QString(int)’ is ambiguous
Hello,
today i tried to port my App from Qt 4.5.3 to Qt 4.7 (under ubuntu 32bit 10.04 )
I got several: error: call of overloaded ‘QString(int)’ is ambiguous
Detailed Error Message:
Astro_Diplom/ComaGui/ui_jobs.h: In member function ‘void Ui_Jobs::setupUi(QDialog*)’:
Astro_Diplom/ComaGui/ui_jobs.h:86: error: call of overloaded ‘QString(int)’ is ambiguous
qtsdk-2010.05/qt/include/QtCore/qstring.h:428: note: candidates are: QString::QString(const QByteArray&)
qtsdk-2010.05/qt/include/QtCore/qstring.h:426: note: QString::QString(const char*)
qtsdk-2010.05/qt/include/QtCore/qstring.h:727: note: QString::QString(const QString&)
qtsdk-2010.05/qt/include/QtCore/qstring.h:106: note: QString::QString(QChar)
qtsdk-2010.05/qt/include/QtCore/qstring.h:105: note: QString::QString(const QChar*)
Astro_Diplom/ComaGui/ui_jobs.h:89: error: call of overloaded ‘QString(int)’ is ambiguous
My custom widget "Form" is inherited from QWidget...
Many Form widgets are in Jobs and..
Jobs is inherited from QDialog and the compiler stops here..
ui_jobs.h
Code:
class Ui_Jobs
{
public:
...
Physical *widgetJobTemperatur;
...
{
...
widgetJobTemperatur = new Form(Jobs); //Compiler stops here..
widgetJobTemperatur
->setObjectName
(QString::fromUtf8("widgetJobTemperatur"));
widgetJobTemperatur
->setGeometry
(QRect(110,
197,
217,
117));
}
}
It seems that Qt4.7 is somehow more restrictive during compilation, than 4.5.3 ?
Under 4.5.3 everything is working fine..?
thank you for any hint,
Astronomy
__________________________________________________ ____________
(Form are physical widgets, i took a bad name and hadn't had time to change it..)
Re: Qt 4.7 : error: call of overloaded ‘QString(int)’ is ambiguous
Please post the constructor of the class Form.
Re: Qt 4.7 : error: call of overloaded ‘QString(int)’ is ambiguous
Header:
Code:
Q_OBJECT
public:
~Form();
...
...
}
and cpp:
Code:
#include "form.h"
#include "ui_form.h"
{
m_ui->setupUi(this);
//MyValue = 0.0;
IndexMin = 0;
IndexMax = 0;
IsStepsizeEnabled = true;
SetName(Name);
CheckConstVariy();
}
Form::~Form()
{
delete m_ui;
}
void Form
::SetName(QString strName
) {
m_ui->PhysName->setText( strName );
}
1 Attachment(s)
Re: Qt 4.7 : error: call of overloaded ‘QString(int)’ is ambiguous
Hmm...
Maybe i'd imported some false project settings from the previous build.
Now i have undefined References.. see pic..
QListData::detach(int)
QListData::detach_grow(int*,int) ???
i'll try qmake + clean all again..
Re: Qt 4.7 : error: call of overloaded ‘QString(int)’ is ambiguous
OK,
i have figured it out.
it was the red Line, which caused the error:
QString Dir = G_cWorkSpace.fiModelsDirectory.absoluteFilePath();
fiCalculatingDirectory is from Type: QFileInfo, in my class WORKSPACE...
Code:
void Tab1::on_pushButtonSelectFiles_clicked()
{
QString Dir
= G_cWorkSpace.
fiModelsDirectory.
absoluteFilePath();
//caused the error ...
}
changing it to:
Code:
void Tab1::on_pushButtonSelectFiles_clicked()
{
Dir = G_cWorkSpace.fiModelsDirectory.absoluteFilePath(); // problem solved
...
}
solved the problem :)
thanx & greetz to All,
Astronomy