本文整理汇总了C++中Question::setText方法的典型用法代码示例。如果您正苦于以下问题:C++ Question::setText方法的具体用法?C++ Question::setText怎么用?C++ Question::setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question::setText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: add
void BftpMaker::add()
{
Question q;
q.setText(tr("empty"));
q.addAnswer(Answer(tr("empty"), false));
q.addAnswer(Answer(tr("empty"), false));
q.addAnswer(Answer(tr("empty"), false));
_test.insertQuestion(++_currentQ, q);
setQuestion(_currentQ);
}
示例2: prev
void BftpMaker::prev()
{
_test.removeQuestion(_currentQ);
Question q;
q.setText(textEdit->text());
for (int i = 0; i < ansList.size(); i++) {
q.addAnswer(ansList[i]->answer());
}
_test.insertQuestion(_currentQ, q);
if (_currentQ != 0)
setQuestion(--_currentQ);
}
示例3: next
void BftpMaker::next()
{
_test.removeQuestion(_currentQ);
Question q;
q.setText(textEdit->text());
for (int i = 0; i < ansList.size(); i++) {
q.addAnswer(ansList[i]->answer());
}
_test.insertQuestion(_currentQ, q);
if (_currentQ < _test.questions().size() - 1)
setQuestion(++_currentQ);
}
示例4: selectQuestion
Question Theme::selectQuestion( const QSqlQuery &query ) const
{ // reject into new method. Question makeQuestion(const QSqlQueru &query)
using namespace Tables::Question::Field;
Question issue;
QString id = query.value( query.record().indexOf( QUESTION_ID ) ).toString(),
text = query.value( query.record().indexOf( TEXT ) ).toString(),
type = query.value( query.record().indexOf( QUESTION_TYPE ) ).toString();
bool caseSens = query.value( query.record().indexOf( CASE_SENS ) ).toBool(),
stripSpace = query.value( query.record().indexOf( STRIP_SPACE ) ).toBool();
QTime time = query.value( query.record().indexOf( RECOMENDED_TIME ) ).toTime();
issue.setId( id );
issue.setText( text );
issue.setType( type );
issue.setTime( time );
issue.setCaseSensitivity( caseSens );
issue.setStripSpaces( stripSpace );
return issue;
}