QTie
31st May 2011, 08:35
Hi all,
I am new guy using a Qt. I am developing a HW testing SW (GUI) with Qt.
I need to develop a statemachine which has four states: stopped, running and paused.
On the mainwindow there are eight widgets which represents the components to be tested. User can enter test parameters for each of the eight component.
The main problem is that when statemachine goes to running state I need to loop in the switch case method (running state == switch case method) I have one case for each of the HW component to be tested.
Test procedure:
Start state-> (button pressed) -> Test component1->break from the switch case->loop back to switch case->test component2->break and so on until component8 is tested. When user presses Stop button statemachine goes to stopped state. I can manage all this by creating a simple switch case structure but the problem is that the loop is synchronous and user actions on the GUI are disabled (User can not stop the loop by pressing Stop button). So How to develop a asynchronous loop with QStateMachine? Thanks for a help!
I am new guy using a Qt. I am developing a HW testing SW (GUI) with Qt.
I need to develop a statemachine which has four states: stopped, running and paused.
On the mainwindow there are eight widgets which represents the components to be tested. User can enter test parameters for each of the eight component.
The main problem is that when statemachine goes to running state I need to loop in the switch case method (running state == switch case method) I have one case for each of the HW component to be tested.
Test procedure:
Start state-> (button pressed) -> Test component1->break from the switch case->loop back to switch case->test component2->break and so on until component8 is tested. When user presses Stop button statemachine goes to stopped state. I can manage all this by creating a simple switch case structure but the problem is that the loop is synchronous and user actions on the GUI are disabled (User can not stop the loop by pressing Stop button). So How to develop a asynchronous loop with QStateMachine? Thanks for a help!