From 270b5519ae944aade8909d972e58a36a1b154399 Mon Sep 17 00:00:00 2001 From: 13195980010 <1512161085@qq.com> Date: Tue, 17 May 2022 09:41:16 -0700 Subject: [PATCH] ui --- src/main/mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/mainwindow.cpp b/src/main/mainwindow.cpp index 8e44df4..640d4c6 100644 --- a/src/main/mainwindow.cpp +++ b/src/main/mainwindow.cpp @@ -10,7 +10,11 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : qnode.init(); ui->setupUi(this); initUis(); + timer = new QTimer(this); + connections(); + + } MainWindow::~MainWindow() @@ -151,6 +155,9 @@ void MainWindow::connections(){ ui->stackedWidget_ros_control->setCurrentIndex(0); }); + //label -> stream + connect(timer, SIGNAL(timeout()), this, SLOT(importFrame())); + /* * 绑定速度控制按钮 */ @@ -374,7 +381,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); }