PDA

View Full Version : QMessageBox error



Salazaar
11th June 2007, 19:53
Hi. I've got a problem. I have a piece of code:

int ret = QMessageBox::Information(this, tr("Speed Units Converter"),
tr("You can't convert value to the same unit"),
QMessageBox::Ok | QMessageBox::Default);
if (ret == QMessageBox::Ok)
{
return false;
}

And I reach error that Information cannot be used as a function :eek:
Regards

jpn
11th June 2007, 20:03
QMessageBox::information() with lower case i.

Salazaar
11th June 2007, 20:07
Thanks, now's all right. But there's another problem. Here's piece of code

if (beaufortBox->isChecked() && knotBox_2->isChecked())
{
convertDialog->setWindowTitle("Converting value from Beaufort to Knot");// this is error line
toLabel->setText("Knot(s)");
displayConvertDialog();
}


And I've got error, that expected primary expression before -> token. What is this problem about? Regards

jpn
11th June 2007, 20:13
Where is "convertDialog" declared?

Salazaar
11th June 2007, 20:34
it is form created by designer, I was subclassing this form.