-4

I have a code like this:

ui->labelRead->setText(QString::fromUtf8(pData).remove(cDataLength.toInt(),8));

I read data from stream and put into pData. I know my data length is 16 character. Now in above code there is a number (8). What is it?

When I move my mouse on the number 8, I read as; (const QRegExp &rx)

Can someone explain to me what is the last part for?

demonplus
  • 5,613
  • 12
  • 49
  • 68
NTMS
  • 816
  • 7
  • 22

1 Answers1

2

There is many overloaded implementations of remove

QString &   remove(int position, int n)
QString &   remove(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive)
QString &   remove(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive)
QString &   remove(const QRegExp & rx)
QString &   remove(const QRegularExpression & re)

you can see const QRegExp & rx because your ide can not resolve your parameters