-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsequence.cpp
More file actions
28 lines (23 loc) · 738 Bytes
/
sequence.cpp
File metadata and controls
28 lines (23 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "sequence.h"
Sequence::Sequence(QWidget *parent, QLayout *layout, int id)
{
setParent(parent);
setLayout(layout);
QLabel *sequenceNumber = new QLabel(QString::number(id+1));
QLineEdit *answerText=new QLineEdit(this);
//QPushButton *deleteAnswerButton=new QPushButton("Удалить");
//answer->addWidget(deleteAnswerButton);
answer->addWidget(sequenceNumber);
answer->addWidget(answerText);
getLayout()->addWidget(this);
connect(answerText, SIGNAL(textChanged(QString)), this, SLOT(on_answerTextChanged(QString)));
setId(id);
}
Sequence::~Sequence()
{
}
void Sequence::on_answerTextChanged(const QString &s)
{
qDebug()<<"answerText #"<<getId()<<s;
this->answerText=s;
}