Skip to content
  • Problem with the QCheckBox

    Unsolved General and Desktop
    4
    0 Votes
    4 Posts
    932 Views
    SGaistS

    What does condition contain ?

  • 0 Votes
    4 Posts
    2k Views
    _

    Thanks a zillion. For the record:

    qtexttospeech.h already has on line 118 Q_DECLARE_METATYPE(QTextToSpeech::State)

    Hence, what's missing is the qRegisterMetaType part. Which I am adding in main.cpp before the QTextToSpeech module is loaded.

    qRegisterMetaType<QTextToSpeech::State>("State"); QTextToSpeech* speech = new QTextToSpeech;

    Then, in main.qml, I am catching the state changed signals and the state like this:

    Connections { target: speech onStateChanged: { console.log("speech.state "+ speech.state); if (speech.state == 1){ console.log("--- we are speaking! ---"); } else if (speech.state == 0){ console.log("--- speaking stopped! ---"); } } }
  • 0 Votes
    2 Posts
    800 Views
    J

    Think of 'entering' a state as crossing the boundary between the outside into the box that corresponds to the new state. Or even more concrete, think of a state 'InsideTheHouse', and entering that state as going through some door. You need to enter before you are actually in the new state, just as you have to pass the door, in order to get to the actual state of 'InsideTheHouse'.

    This is a quite general pattern used by any state machine implementation I ever came across. I'm not entirely sure though whether the default texts about software patterns explain this very clearly though, as it really is more of an implementation detail than a generic pattern.

  • 0 Votes
    1 Posts
    889 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    D

    @jsulm Hmm I'm not trying to launch ps... I launch /usr/bin/asterisk. I do the ps in a terminal just to check if the process has been created and is running.

  • 0 Votes
    4 Posts
    2k Views
    p3c0P

    @Maxim-DC Yes it is possible. You can find an example here. The exact file in it where it is used.