Përfunduar

C++: Create a simple QT example to trigger a function in the main-thread by a signal from QThread

I need a simple QT example to trigger a function in the main-thread by a signal from QThread. Use the Signal/Slot principle.

As the base, just use in QT-Creator the standard QWidget application (QMainWindow).

1. start a new QThread.

2. in the QThread start a while(1) loop that should trigger every 3 seconds a funktion call in the MainThread.

3. The function in the MainThread is triggert by the trigger in the while(1) loop in the Qthread. This update the lable on [url removed, login to view]

int count = 0; // counted label updates

// The loop in the QThread:

while(1)

{

count++;

QThread::sleep(3);

// trigger the function in Main-Thread here !

}

// The function in the mainwindow-Thread(mainwindow):

ui→label→setText(count); // update the label

Thank you for looking, I look forward to hearing from you

Aftësitë: Programim në gjuhën C++ , Qt

Shiko më shumë: qt thread example, qthread example, qtimer, qthread deletelater, qt move object to thread, simple custom encryption decryption function example iphone, create simple hello world component joomla, create simple banner using css, create simple access database using, create simple chart vbnet using dundas, create simple flash website, joomla create simple module, create simple web site, create simple flash video jukebox, create simple php website

Rreth Punëdhënësit:
( 5 përshtypje ) Frankfurt, Germany

ID Projekti: #16678135

Fituar nga:

pkotlyarov1988

Hello. I have experience with Qt and can help you. P.s. It's a promo price, because I am a novice on this platform.

€8 EUR pёr 1 ditë
(0 Përshtypje)
0.0

9 profesionistë freelancer dërguan një ofertë mesatare prej €18 për këtë punë

polto

hi when you free just give me teamviewer and I will make it

€23 EUR pёr 1 ditë
(6 Përshtypje)
5.1
€29 EUR pёr 1 ditë
(23 Përshtypje)
4.9
JMITSolution

I'm very interest in your project. I have a lot of experience with qt programming. Please contact me to discuss in detail. Thank you in advance.

€29 EUR pёr 1 ditë
(18 Përshtypje)
4.3
PDCA

Hi there, We can help you. This is quite a simple assignment. We have been working with Qt for more than 5 years. Looking forward to working with you. Thanks and best regards,

€14 EUR pёr 1 ditë
(0 Përshtypje)
0.0
sjseries18

A proposal has not yet been provided

€19 EUR pёr 1 ditë
(0 Përshtypje)
0.0
deepgovind4

I am QT with C++ expert and I can easily handle this work. I have already created some projects with qt visit my website to see my QT projects.

€14 EUR për 2 ditë
(0 Përshtypje)
0.0
hydra13

I have almost 5 years experience with QT/C++. It's a very simple project for me. I can do it, if you want it.

€14 EUR pёr 1 ditë
(0 Përshtypje)
0.0
rlf1

A proposal has not yet been provided

€10 EUR pёr 1 ditë
(0 Përshtypje)
0.0