Results 1 to 5 of 5

Thread: Common buttons on a stacked widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Posts
    42
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Common buttons on a stacked widget

    I have a Gui that has few layers/steps. Currently i'm using a stacked widget. When u press next it goes to the next widget. When u press back it goes back to the previous one. Can i make the 'next' & 'back' button common to all widgets ie. i dont want to make a separate 'next' & 'back' button for every single widget

    This is the code.
    v
    Qt Code:
    1. oid MainWindow::on_pb_back_clicked()
    2. {
    3. curr = this->ui->stackedWidget->currentIndex();
    4. this->ui->stackedWidget->setCurrentIndex(curr-1);
    5. }
    6.  
    7. void MainWindow::on_pb_next_clicked()
    8. {
    9. curr = this->ui->stackedWidget->currentIndex();
    10. this->ui->stackedWidget->setCurrentIndex(curr+1);
    11. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 20th September 2011 at 23:16.

Similar Threads

  1. problem in stacked widget
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 24th February 2009, 08:28
  2. Stacked widget mouse propagation
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2008, 17:54
  3. Stacked Widget Scroll
    By csvivek in forum Qt Programming
    Replies: 6
    Last Post: 27th May 2008, 11:36
  4. Stacked Layout. & Widget.
    By csvivek in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2008, 08:56
  5. Acces a stacked widget...?
    By ucomesdag in forum Qt Programming
    Replies: 5
    Last Post: 25th November 2006, 14:05

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
  •  
Qt is a trademark of The Qt Company.