Hi!
I trying load ui form using QFormBuilder from file and it's ok!
But I need to do this from QString (contain *.ui file xml marking)
Is it possible load form from QString? (I'am convert QString to byte array but it's fail!)
Thanks for help!
QFormBuilder builder;
QBuffer buf;
QWidget *wgt = 0;
//QFile file("c:/form.ui");
//file.open(QFile::ReadOnly);
QBuffer buf;
QString content = "ui xml marking here"; //here ui xml content from DB for example
buf.write(content.toUtf8());
QWidget *myWidget = builder.load(&buf, this); // and here error: loading is fail from buffer!
//file.close();
myWidget->show();
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(myWidget);
setLayout(layout);
Bookmarks