title: Qt Bluetooth scanning not working
body: <p>I am implementing a Qt Bluetooth Application for android. my requirements are as follows :</p>
  
  <ol>
  <li><p>I want to turn the Bluetooth ON</p></li>
  <li><p>I need to scan for the device which Bluetooth is on for that we need to check.</p></li>
  <li><p>I need to show all devices that are on in a list.</p></li>
  </ol>
  
  <p>Currently, my first requirement is to make my code run. :)</p>
  
  <p>I am struggling to scan for devices. Firstly it doesn't find all devices. Secondly, my code shows a blank list.
  Would appreciate if you could let me know what am I doing wrong?</p>
  
  <p>Here is my code </p>
  
  <pre><code>Listview::Listview(QWidget *parent):QDialog(parent)
  {
      listModel = new QStringListModel(*stringList, NULL);
      stringList = new QStringList();
  
      BluetoothMain *btmain = BluetoothMain::getInstance();
  
      connect(btmain,SIGNAL(discovered(QString,QString,bool)),this,
  
      SLOT(addToList(QString,QString,bool)));
      btmain-&gt;startScan();
  
      qDebug()&lt;&lt;"bluetooth is scanning the list";
  
      // list_add-&gt;setModel(listModel);
      // list_add-&gt;show();
  }
  
  /*
  
  for(int i=0;i&lt;100;i++)
  {
    stringList-&gt;append(QString::number(i)+"hi everyone");
  }
  
  list_add-&gt;setModel(listModel);
  list_add-&gt;show();
  
  */
  
  
  
   void Listview::addToList(QString address,QString name,bool paired)
   {
      list_add-&gt;setModel(listModel);
  
      stringList-&gt;append(address);
      stringList-&gt;append(name);
      stringList-&gt;append("hi");
  
      list_add-&gt;show();
   }
  
   Listview::~Listview()
   {
  
   }
  </code></pre>
  
  <p>I searched for related questions but i didn't find proper solution.</p>
  
  <p>Thanks in advance.</p>