#include "lpDebugUI.h" lpDebugUI::lpDebugUI(QWidget *parent) : QWidget(parent) { ui.setupUi(this); connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(onButtonClicked())); setWindowIcon(QIcon(":/Resources/icon.png")); } lpDebugUI::~lpDebugUI() { } Q_SLOT void lpDebugUI::onButtonClicked() { QString strObj = sender()->objectName(); if (strObj == "pushButton") { emit sgButtonClicked(1); } }