Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Problem about QHistoryState
Qt 6.11 is out! See what's new in the release blog

Problem about QHistoryState

Scheduled Pinned Locked Moved India
1 Posts 1 Posters 1.3k 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

    @ 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);@
    

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

    this snippet from Qt document about QHistoryState

    i wonder to know one of statements : s3->addTransition(s1h);

    how the s3 state transition to s1h (QHistoryState) without signal or event,
    it should be some thing like that: 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