daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //connect:
  2.  
  3. connect(sendCommand, SIGNAL(clicked()),this, SLOT(sendCommand()));
  4. connect(&sock, SIGNAL(readyRead()), this, SLOT(receiveData()));
  5. //------------------------------------------------------------
  6. void FindDialog::sendCommand()
  7. {
  8.     QString ba = lineEdit->text();
  9.     QByteArray bb("show q \r");
  10.     sock.write(bb);
  11.     qDebug() << " Wrote: " << bb;
  12. }
  13.  
  14. void FindDialog::receiveData()
  15. {
  16.    QByteArray ba;
  17.    ba.clear();
  18.    ba = sock.readAll();
  19.    display->setText(ba);
  20.    qDebug() << " Received: " << ba;
  21. }
RAW Paste Data
Top