PDA

View Full Version : problem with designer



bashamehboob
7th April 2006, 13:25
operating system : windows Xp
version : Qt 4.1
compiler : MinGW


hai all,
1) designed a simple application with gui in mainwindow having comboBox in it.
2) i wrote main as follow :)



#include "ui_test1.h"
#include <QApplication>
#include <QtGui/QtGui>
int main(int argc, char *argv[])
{ QApplication app(argc, argv);
QDialog *window = new QDialog;
Ui::Dialog ui;
ui.setupUi(window);
ui.comboxBox->addItem(tr("123"));
window->show();
return app.exec();
}


3)i did qmake -project
then qmake test1.pro
then make
3.1) when i make , i was getting an error that
" tr funtion undeclared first use the function"

have i made any mistake in the above code??:confused:

basha :)

A FRIEND IS IN NEED.

wysota
7th April 2006, 13:31
Use QObject::tr() (static method) instead.

bashamehboob
12th April 2006, 08:46
thanks its working :)
bye
basha