some fixes

This commit is contained in:
Dorian Zedler 2020-10-11 21:01:01 +02:00
parent 60d10f056b
commit 0b053eaa88
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37
2 changed files with 14 additions and 3 deletions

View file

@ -19,7 +19,7 @@
* \section intro_sec Introduction
*
* This library can be used to talk to BLE devices via UART in Qt.
* It was designed to make taklking to device like the ESP32 from Qt easier.
* It was designed to make talking to devices like the ESP32 from Qt easier.
*
* \section section Installation
* \code{.sh}
@ -35,6 +35,12 @@
* # Include library
* include($$PWD/QBluetoothLeUart/QBluetoothLeUart.pri)
* \endcode
*
* To enable the QML module you need to call
* \code{.cpp}
* QBluetoothLeUart::init();
* \endcode
* somewhere before app.exec(); in your main.cpp.
*/
/*!

View file

@ -59,6 +59,11 @@ void QBluetoothLeUartDeviceModel::remove(int row)
}
void QBluetoothLeUartDeviceModel::clear() {
for(int i = 0; i < this->availableDevices.length(); i++)
this->remove(i);
this->beginResetModel();
this->resetInternalData();
this->availableDevices.clear();
this->endResetModel();
}