QtColorLineEdit::QtColorLineEdit(QWidget * parent) : QLineEdit(parent) { QRegExpValidator *validator = new QRegExpValidator(); validator->setRegExp(QRegExp("#[A-F0-9]{8}", Qt::CaseInsensitive)); setValidator(validator); QObject::connect(this, SIGNAL(editingFinished()), this, SLOT(EditFinished())); }
void TableEntryDatarate::AssignSocket(Socket *pSocket) { if(pSocket != mSocket) { mSocket = pSocket; QoSSettings tQoSSettings; mSocket->GetQoS(tQoSSettings); mLineEdit->setText(QString("%1").arg(tQoSSettings.DataRate)); connect(mLineEdit, SIGNAL(returnPressed()), this, SLOT(EditFinished())); } }