Running an application with Qt 6.7 on Android reduced functionalities for QList

I am creating an application that will search for Bluetooth devices and then connect to one sensor of mine and display the sensor data. I have my main widget, and the search of the devices happens in a second widget. I built my application first with MSVC2019 and in my Computer (Windows 11) it can do everything (I have the Qt6.7 version).

Now, I tried to run it in my Android device (With Clang arm64-v8a), but there are some features that are not working as they were in the desktop app. I also tried setting a list in the MainWidget, but I have the same problems. The main one is the QList:

  • When I press on my button, nothing happens, it should be clearing the list and adding a new item.
  • I simply can not select any items.
  • My layout makes everything go to the left after opening the widget

I get the following warning:

(:-1: warning: Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.)

scanwindow.h:

#ifndef SCANWINDOW_H
#define SCANWINDOW_H

#include <QMainWindow>
#include <QBluetoothDeviceDiscoveryAgent>
#include <QBluetoothDeviceInfo>
#include <QLowEnergyController>
#include <QListWidgetItem>

namespace Ui {
class ScanWindow;
}

class ScanWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit ScanWindow(QWidget *parent = nullptr);
    ~ScanWindow();

private slots:
    void on_startScanButton_clicked();
    void deviceDiscovered(const QBluetoothDeviceInfo &device);
    void on_deviceList_itemClicked(QListWidgetItem *item);
    void on_connectButton_clicked();

    void on_clearButton_clicked();

signals:
    void characteristicValueChanged(const QString &value);
    void deviceSelected(const QBluetoothDeviceInfo &device);

private:
    Ui::ScanWindow *ui;
    QBluetoothDeviceDiscoveryAgent *discoveryAgent;
    QBluetoothDeviceInfo selectedDevice;
    QList<QLowEnergyService*> services;
};

#endif

scanwindow.cpp:

#include "scanwindow.h"
#include "ui_scanwindow.h"
#include <QMessageBox>
#include <QPermissions>
#include <QCoreApplication>

ScanWindow::ScanWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::ScanWindow)
    , discoveryAgent(new QBluetoothDeviceDiscoveryAgent(this))
{
    ui->setupUi(this);

    ui->connectButton->setDisabled(true);

    connect(discoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, this, &ScanWindow::deviceDiscovered);
}

ScanWindow::~ScanWindow()
{

    qDeleteAll(services);
    services.clear();

    delete ui;

}

void ScanWindow::on_startScanButton_clicked()
{
    ui->deviceList->clear();

#if QT_CONFIG(permissions)
    QBluetoothPermission permission;
    permission.setCommunicationModes(QBluetoothPermission::Access);

    switch (qApp->checkPermission((permission))) {
    case Qt::PermissionStatus::Undetermined:
        qDebug() << "Undetermined";
        qApp->requestPermission(permission, this,  &ScanWindow::on_startScanButton_clicked);
    break;
    case Qt::PermissionStatus::Denied:
        qDebug() << "Denied";
    break;
    case Qt::PermissionStatus::Granted:
        qDebug() << "Granted";
    break;

    }
#endif

    discoveryAgent->setLowEnergyDiscoveryTimeout(15000);
    discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
}

void ScanWindow::deviceDiscovered(const QBluetoothDeviceInfo &device){

    if (device.coreConfigurations() & QBluetoothDeviceInfo::LowEnergyCoreConfiguration) {
        qDebug() << "Added";
        QString label = device.name();
        QListWidgetItem *item = new QListWidgetItem(label, ui->deviceList);
        item->setData(Qt::UserRole,QVariant::fromValue(device));
    }

}

void ScanWindow::on_deviceList_itemClicked(QListWidgetItem *item) {
    QBluetoothDeviceInfo device = item->data(Qt::UserRole).value<QBluetoothDeviceInfo>();

    selectedDevice = device;

    ui->connectButton->setEnabled(true);

    qDebug() << "Selected device:" << device.name() << device.address().toString();
}

void ScanWindow::on_connectButton_clicked()
{
    if(!selectedDevice.isValid()){
        qDebug() << "No device selected or device info is invalid";
        return;
    }

    emit deviceSelected(selectedDevice);
}

void ScanWindow::on_clearButton_clicked()
{
    ui->deviceList2->clear();
    new QListWidgetItem(tr("Oak2"), ui->deviceList2);
    ui->deviceList2->repaint();
    ui->deviceList2->updateGeometry();
    ui->deviceList2->update();
    QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}

I tried to repaint the widget, process the events, and to update. None of these work.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật