From 804fa07c9cc31b767f26d888b17ad0c5f7337db6 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Mon, 21 Oct 2024 19:11:44 -0400 Subject: [PATCH] add QCoreApplication::processEvent() to solve the GUI lagging --- SingleSpectra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SingleSpectra.cpp b/SingleSpectra.cpp index 25d08b7..432561b 100644 --- a/SingleSpectra.cpp +++ b/SingleSpectra.cpp @@ -343,7 +343,7 @@ void SingleSpectra::FillHistograms(){ } hist2D[ID]->Fill(ch, data); - usleep(10); + QCoreApplication::processEvents(); clock_gettime(CLOCK_REALTIME, &tb); }while( isFillingHistograms && (tb.tv_nsec - ta.tv_nsec)/1e6 + (tb.tv_sec - ta.tv_sec)*1e3 < maxFillTimeinMilliSec );