本文整理汇总了C++中Q3BoxLayout::add方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3BoxLayout::add方法的具体用法?C++ Q3BoxLayout::add怎么用?C++ Q3BoxLayout::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3BoxLayout
的用法示例。
在下文中一共展示了Q3BoxLayout::add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
//************************************************
ReplaceWord::ReplaceWord(string word,int OldGroupNum, int NewGroupNum, QWidget *parent, QString name )
: QDialog( parent, name, TRUE ,Qt::WDestructiveClose)
{
setCaption("Replace word");
Q3BoxLayout *all = new Q3VBoxLayout(this,10);
sprintf(tmp,"The word %s already exists in group %d of the currently open file.",word.c_str(),OldGroupNum);
QLabel *l1 = new QLabel(tmp,this);
all->add(l1);
sprintf(tmp,"Do you wish to replace it with the occurance in the merge file (group %d )?",NewGroupNum);
QLabel *l2 = new QLabel(tmp,this);
all->add(l2);
Q3BoxLayout *b = new Q3HBoxLayout(all,10);
QPushButton *yes = new QPushButton( "Yes", this );
connect( yes, SIGNAL(clicked()), SLOT(yes() ));
b->addWidget(yes);
QPushButton *yes_to_all = new QPushButton( "Yes to all", this );
connect( yes_to_all, SIGNAL(clicked()), SLOT(yes_to_all() ));
b->addWidget(yes_to_all);
QPushButton *no = new QPushButton( "No", this );
connect( no, SIGNAL(clicked()), SLOT(no() ));
b->addWidget(no);
QPushButton *no_to_all = new QPushButton( "No to all", this );
connect( no_to_all, SIGNAL(clicked()), SLOT(no_to_all() ));
b->addWidget(no_to_all);
adjustSize();
}