Yes.
Actually many dialogs are updated by threads.
Is there any thing to consider to update GUI for the multiple threads?
Thanks.
Yes.
Actually many dialogs are updated by threads.
Is there any thing to consider to update GUI for the multiple threads?
Thanks.
You can't access GUI objects (dialogs included) from within worker threads.
I cannot understand I can't access GUIs in worker thread.
CUIGOCIImgStatus is a class which inherits QWidget. It also includes <ui_gociimgstatus.h> generated by qmake.
I updates by using a thread which check status of other system.
If status is changed,
I set values in member variables in CUIGOCIImgStatus to update , then I call updates().
Then paintEvent() is called.
CUIGOCIImgStatus objects is a global variable to share.
It is created by main thread but is updated by only one other threads.
Usually, this works well.
but 1 out of 10, segment fault happens.
anything wrong??
Well... you just can't.
Sorry, that's forbidden.I updates by using a thread which check status of other system.
If status is changed,
I set values in member variables in CUIGOCIImgStatus to update , then I call updates().
Yes... usuallyUsually, this works well.That's the key word here.
Ok... I think I understand what you meant.
You mean I should call 'update()' in the main GUI thread?
But how do I call update() in the main GUI thread if the content of the GUI is changed from the other thread?
If I use timer thread by using QTimer, it is also forbidden. right?
Do you have any suggestion for the current my situation??
Thank you very much for your reply.
Yes, that too.
Use signals and slots or custom events.But how do I call update() in the main GUI thread if the content of the GUI is changed from the other thread?
I'm not sure I understand what you mean. You can use timers in other threads.If I use timer thread by using QTimer, it is also forbidden. right?
Bookmarks