Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QT状态机框架 中的 QHistoryState的问题
Forum Updated to NodeBB v4.3 + New Features

QT状态机框架 中的 QHistoryState的问题

Scheduled Pinned Locked Moved Chinese
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tcsjzdnlh
    wrote on last edited by
    #1

    QT状态机框架 中的 QHistoryState的问题

    //------------------------------------------------------------------------------------------
    @ QHistoryState *s1h = new QHistoryState(s1);

    QState *s3 = new QState();
    s3->assignProperty(label, "text", "In s3");
    QMessageBox *mbox = new QMessageBox(mainWindow);
    mbox->addButton(QMessageBox::Ok);
    mbox->setText("Interrupted!");
    mbox->setIcon(QMessageBox::Information);
    QObject::connect(s3, SIGNAL(entered()), mbox, SLOT(exec()));
    s3->addTransition(s1h);
    machine.addState(s3);
    
    s1->addTransition(interruptButton, SIGNAL(clicked()), s3);@
    

    //----------------------------------------------------------------------------------------

    --
    这是库文档里面给出的 关于 QHistoryState的例子片段,
    我想问一下 这一句 s3->addTransition(s1h); ,
    s3迁移 到 s1h的 触发条件是什么?
    (就想这样的:s3->addTransition( button, SIGNAL(clicked()), s1h ); )

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved