View Full Version : QFormBuilder save BAD *ui files (they not loaded in QtDesigner)

3rd June 2010, 15:15

I create in QtDesigner standart QWidget and add standart widgets (QPushButtons, QLineEdit and etc.)
Then save it to "formIn.ui" file. Next, load and save it with QFormBuilder in "formOut.ui" BUT size of dest file ("formOut.ui") more then 126kb!!!!
Scr file "formIn.ui" created with QtDesigner is 2kb only!!! Also then I open "formOut.ui" in QtDesigner it's opened incorrect!

It's trouble me! May be some people know how to solve it?

QFormBuilder fb;
QFile fileIn("c:/formIn.ui"); //file created in Qtdesigner
QFile fileOut("c:/formOut.ui");

bool isOk =false;
isOk = fileIn.open(QIODevice::ReadOnly);
isOk = fileOut.open(QIODevice::ReadWrite);

QWidget *w = fb.load(&fileIn, 0);
fb.save(&fileOut, w);

Using Qt4.4.3