some fixes
This commit is contained in:
parent
60d10f056b
commit
0b053eaa88
2 changed files with 14 additions and 3 deletions
|
@ -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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue