diff --git a/src/main/mainwindow.cpp b/src/main/mainwindow.cpp index ad29714..3e6936b 100644 --- a/src/main/mainwindow.cpp +++ b/src/main/mainwindow.cpp @@ -14,7 +14,11 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : ui->setupUi(this); initUis(); + timer = new QTimer(this); + connections(); + + } MainWindow::~MainWindow() @@ -155,6 +159,9 @@ void MainWindow::connections(){ ui->stackedWidget_ros_control->setCurrentIndex(0); }); + //label -> stream + connect(timer, SIGNAL(timeout()), this, SLOT(importFrame())); + /* * 绑定速度控制按钮 */ @@ -378,7 +385,7 @@ void MainWindow::importFrame() void MainWindow::on_Open_receive_clicked() { - capture.open(1); + capture.open(0); //capture.open("udp://@0.0.0.0:11111"); timer->start(30); }