#include "tools_Index0.h" #include "ui_tools_Index0.h" Tools_Index0::Tools_Index0(QWidget *parent) : ToolsWidget(parent), ui(new Ui::Tools_Index0) { ui->setupUi(this); setWindowTitle(tr("MavlinkInspector")); //load qss QFile file(":/qss/ToolsUI.qss"); file.open(QFile::ReadOnly); QTextStream filetext(&file); QString stylesheet = filetext.readAll(); this->setStyleSheet(stylesheet); file.close(); mavlinkinspector = new MAVLinkInspector("mavlink inspector",nullptr,nullptr); mavlinkinspector->setParent(this); mavlinkinspector->show(); //scope = new Scope(this); //scope->setGeometry(ui->frame->geometry()); //scope->show(); } Tools_Index0::~Tools_Index0() { delete ui; } void Tools_Index0::resizeEvent(QResizeEvent *event) { Q_UNUSED(event) if(mavlinkinspector) { mavlinkinspector->setGeometry(0,0,ui->frame->width(),ui->frame->height()); } update(); } void Tools_Index0::setInstallWidget(QWidget *w) { Inspect = w; Inspect->setParent(this); if(Inspect) { Inspect->setGeometry(0,0,ui->frame->width(),ui->frame->height()); Inspect->show(); } }