Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

no adapter checked...



  • Please help me troubleshoot this issue

    ui->localAdapterBox->setVisible(true);
    ui->firstAdapter->setText(tr("Default (%1)", "%1 = Bluetooth address").
    arg(localAdapters.at(0).address().toString()));
    ui->secondAdapter->setText(localAdapters.at(1).address().toString());
    ui->firstAdapter->setChecked(true);

    9fb0f3c6-0b20-4365-b5ed-634c6c24326d-image.png

    5fcc9a10-f343-4888-a8d5-bc5bc02205ac-image.png

    The first adapter should be checked by code and second adapter should show up.
    Should the "Default" also show up ?

    PS I am, not sure what the red rectctangle in form is telling me.

    Addendum
    Looks as the highlighted code is wrong
    It was setting the second adapter on;y....

    ui->localAdapterBox->setVisible(true);
    ui->firstAdapter->setText(tr("Default (%1)", "%1 = Bluetooth address").
    arg(localAdapters.at(1).address().toString()));

    ui->firstAdapter->setText(localAdapters.at(0).address().toString());
    ui->secondAdapter->setText(localAdapters.at(1).address().toString());
    ui->firstAdapter->setChecked(true);
    ui->secondAdapter->setChecked(true);

    SOLVED
    Something to do with not having the "layout rectangle" in correct place.


Log in to reply