My ultimate goal is to have application controlling bluetooth equipped device - amateur radio.
I have working standard main window template with tab widget.
I have successfully cloned and have working qtconncetivinty / btsanner example.

I need help putting these together, especially how to add btscanner class to the main class.

Basically how to physically add / modify btscaner application to main application - as a class.

Here is my standard main code

Qt Code:
  1. #include "mainwindow.h"
  2. #include <QApplication>
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. MainWindow w;
  11. return a.exec();
  12. }
To copy to clipboard, switch view to plain text mode 

Here is btsanner main
Qt Code:
  1. #include "device.h"
  3. #include <QApplication>
  5. int main(int argc, char *argv[])
  6. {
  7. QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
  9. QApplication app(argc, argv);
  11. DeviceDiscoveryDialog d;
  12. QObject::connect(&d, SIGNAL(accepted()), &app, SLOT(quit()));
  15. app.exec();
  17. return 0;
  18. }
To copy to clipboard, switch view to plain text mode 

Points of misunderstanding
1. what is the purpose of this line ?
QApplication::setAttribute(Qt::AA_EnableHighDpiSca ling);
2. do I have to implement it when btscanner QDilog is added to main -> tab ?

3. I have limited understanding of "connect" - I know how to implement it in simple ui control.
I do understand how most of the btscanner slot/signals works.

4. What is the purpose of this line of code AND how to implement it - in main window or tab ?
QObject::connect(&d, SIGNAL(accepted()), &app, SLOT(quit()));

My guess it allows to process "quit" button and quits entire btscanner application.

I be happy to add additional info if needed.

Many thanks for help.