QAbstractFormBuilder Class ReferenceThe QAbstractFormBuilder class provides a default implementation for classes that create user interfaces at run-time. Далее... #include <QAbstractFormBuilder> Inherited by: QFormBuilder. Открытые функции
Подробное описаниеThe QAbstractFormBuilder class provides a default implementation for classes that create user interfaces at run-time. QAbstractFormBuilder provides a standard interface and a default implementation for constructing forms from user interface files. It is not intended to be instantiated directly. Use the QFormBuilder class to create user interfaces from UI files at run-time. Например: MyForm::MyForm(QWidget *parent) : QWidget(parent) { QFormBuilder builder; QFile file(":/forms/myWidget.ui"); file.open(QFile::ReadOnly); QWidget *myWidget = builder.load(&file, this); file.close(); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(myWidget); setLayout(layout); } To override certain aspects of the form builder's behavior, subclass QAbstractFormBuilder and reimplement the relevant virtual functions:
The QFormBuilder class is typically used by custom components and applications that embed Qt Designer. Standalone applications that need to dynamically generate user interfaces at run-time use the QUiLoader, found in the QtUiTools module. See also QtUiTools Module. Описание функций-членовQAbstractFormBuilder::QAbstractFormBuilder ()Constructs a new form builder. QAbstractFormBuilder::~QAbstractFormBuilder () [virtual]Destroys the form builder. QWidget * QAbstractFormBuilder::load ( QIODevice * device, QWidget * parent = 0 ) [virtual]Loads an XML representation of a widget from the given device, and constructs a new widget with the specified parent. See also save(). void QAbstractFormBuilder::save ( QIODevice * device, QWidget * widget ) [virtual]Saves an XML representation of the given widget to the specified device in the standard UI file format. Смотрите также load(). void QAbstractFormBuilder::setWorkingDirectory ( const QDir & directory )Sets the current working directory of the form builder to the specified directory. See also workingDirectory(). QDir QAbstractFormBuilder::workingDirectory () constReturns the current working directory of the form builder. Смотрите также setWorkingDirectory(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |