Results 1 to 5 of 5

Thread: connecting two wizards

  1. #1
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Platforms
    Unix/X11

    Default connecting two wizards

    I have created two wizards , i want that when i clicked finish of one wizard another wizard gets opened.. Is there any way of connecting finish button of first wizard to 2nd wizard?? please help

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: connecting two wizards

    signal/slot mechanism - pretty handy!

    finished slot on one wizard -> exec() / open() / show() slot on the next
    Last edited by amleto; 14th November 2012 at 18:46.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Platforms
    Unix/X11

    Default Re: connecting two wizards

    as you said me to use signal and slots, it is giving me error..
    no matching function for call to 'dynamic::connect(QWizard::WizardButton, const char [11], edges*, const char [11])'
    code..
    I am trying to connect finish button of dynamic to edge wizard..
    Qt Code:
    1. //dynamic.h
    2. class dynamic : public QWizard
    3. {
    4. Q_OBJECT
    5.  
    6. public:
    7. explicit dynamic(QWidget *parent = 0);
    8. ~dynamic(){}
    9.  
    10. };
    11. //dynamic.cpp
    12. #include "dynamic.h"
    13. #include "edges.h"
    14. #include <QtGui>
    15. dynamic::dynamic(QWidget *parent)
    16. : QWizard(parent)
    17. {
    18.  
    19. edges e;
    20. connect(FinishButton,SIGNAL(clicked()),&e,SLOT(e.show()));
    21. }
    22. //edges.h
    23. class edges : public QWizard
    24. {
    25. Q_OBJECT
    26.  
    27. public:
    28. explicit edges(QWidget *parent = 0);
    29. ~edges(){}
    30. public slots:
    31. void app_run();
    32.  
    33. };
    34. //edges.cpp
    35. #include "edges.h"
    36. class QLineEdit;
    37. edges::edges(QWidget *parent)
    38. : QWizard(parent)
    39. {
    40.  
    41. setOption(QWizard::NoBackButtonOnLastPage,true);
    42. setWindowTitle(tr("Edge Wizard"));
    43.  
    44. }
    45. void edges::app_run()
    46. {
    47. this->show();
    48. }
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: connecting two wizards

    The first argument of connect() has to be an object instance, not an enum.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: connecting two wizards

    object instance pointer
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Connecting Qt with PostgreSql
    By JonathanVeg in forum Newbie
    Replies: 10
    Last Post: 19th May 2012, 17:52
  2. Connecting 2 points using QML
    By aya_lawliet in forum Qt Quick
    Replies: 0
    Last Post: 4th November 2011, 08:05
  3. connecting lines?
    By konvex in forum Qt Programming
    Replies: 8
    Last Post: 16th December 2008, 09:00
  4. Sharing same widget between 2 wizards
    By Equilibrium in forum Qt Programming
    Replies: 3
    Last Post: 11th September 2006, 10:27
  5. QTCPSocket not connecting
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 25th August 2006, 07:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.