Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor mkhpad's Avatar
    Join Date
    Nov 2011
    Posts
    104
    I have designed a page with four different buttons with four pages inside a stacked widget.What i am trying for is if i click anyone of those buttons it must navigate to a different page...


    For Example:If i click the first button it must open page1,if i click button 2 it must open page2 and so on..

    I have tried to write the code and when compiled its showing that [error: undefined reference to `checkin::setPage() in QT]

    I had tried my level best but still not able to found the result can anyone help me with this?

  2. #2
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    You can put all widget in QStackedWidget and then change current index using setCurrentIndex().

    Regarding error you talking about which class?

  3. #3
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,293
    Show us some part of your code ?

    Your concept is given as article using Qt quick components : http://doc.qt.nokia.com/qt-component...-overview.html

    regards,
    rahul

  4. #4
    Regular Contributor mkhpad's Avatar
    Join Date
    Nov 2011
    Posts
    104
    Hi savaj,
    I did the same thing which you have asked me to try,it got worked....
    Thank You for your answer and reply.....

  5. #5
    Regular Contributor mkhpad's Avatar
    Join Date
    Nov 2011
    Posts
    104
    #include "checkin.h"
    #include "ui_checkin.h"
    #include<QStackedWidget>
    #include<QtGui>


    checkin::checkin(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::checkin)
    {
    ui->setupUi(this);
    // ui->stackedWidget->setCurrentIndex(3);

    connect( ui->map, SIGNAL( clicked() ), this, SLOT( setPage1()));
    connect( ui->call , SIGNAL( clicked() ), this, SLOT( setPage2()));
    connect( ui->editinfo , SIGNAL( clicked() ), this, SLOT( setPage3()));
    connect( ui->venudetails , SIGNAL( clicked() ), this, SLOT( setPage4()));
    connect( ui->report , SIGNAL( clicked() ), this, SLOT( setPage5()));

    }

    checkin::~checkin()
    {

    delete ui;
    }


    void checkin :: setPage1()
    {

    ui->stackedWidget->setCurrentIndex(0);
    }

    void checkin:: setPage2()
    {
    ui->stackedWidget->setCurrentIndex(1);
    }

    void checkin:: setPage3()
    {
    ui->stackedWidget->setCurrentIndex(2);
    }

    void checkin:: setPage4()
    {
    ui->stackedWidget->setCurrentIndex(3);
    }

    void checkin:: setPage5()
    {
    ui->stackedWidget->setCurrentIndex(4);
    }

  6. #6
    Nokia Developer Champion james1980's Avatar
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    916
    @mkhpad : you can put this sample code on wiki.
    Jajal Mehul

Similar Threads

  1. Ensymble web pages have moved to Google Code
    By jethro.fn in forum Python
    Replies: 3
    Last Post: 2008-10-17, 21:05
  2. UTF-8 Supported code pages
    By nagkumar in forum Mobile Java General
    Replies: 3
    Last Post: 2008-09-05, 18:39
  3. Navigate back between WML pages
    By ernitingoel in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2004-09-30, 05:01
  4. code pages and SWITCH_PAGE
    By sbarlow in forum OMA DM/DS/CP
    Replies: 2
    Last Post: 2004-01-22, 09:34
  5. 6310, russian names, wrong code pages
    By vtimofeyuk in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-20, 11:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved