I found a strange bug. Maybe I'm doing something wrong.
1. In Designer create ui file. Read file to QString, send to client app.
2. Get in client and load:
...
m_pForm = loader.load(xmlForm.device());
...
m_addForm->setParent(ui.centralWidget());
...
...
QFormBuilder loader;
QDataStream xmlForm(cOut.toLatin1());
m_pForm = loader.load(xmlForm.device());
...
m_addForm->setParent(ui.centralWidget());
...
To copy to clipboard, switch view to plain text mode
ok. Works well. and i am realy saw my form
3. Save:
...
QFile file("D:/save.ui");
return;
saver.save(&file, m_addForm);
...
...
QFile file("D:/save.ui");
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QFormBuilder saver;
saver.save(&file, m_addForm);
...
To copy to clipboard, switch view to plain text mode
But when I load a saved form, I do not see any items!
Saved form:
saved_form.png
Source form:
loaded_form.png
Bookmarks