Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User trandinhduy's Avatar
    Join Date
    Mar 2009
    Posts
    14
    Hi,

    My questions are:

    1/how can I modify the function of the close button (at the top right corner, in the status bar) to become the back button like this:



    2/ or How can I add the back button next to the close button (at the top right corner)???

    Thanks in advanced.

  2. #2
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Quote Originally Posted by trandinhduy View Post
    1/how can I modify the function of the close button (at the top right corner, in the status bar) to become the back button like this:
    Read these articles about stackable windows:
    http://wiki.forum.nokia.com/index.ph...ows_in_Maemo_5
    http://wiki.forum.nokia.com/index.ph...ows_in_Maemo_5

    Quote Originally Posted by trandinhduy View Post
    2/ or How can I add the back button next to the close button (at the top right corner)???
    To achieve this strange goal you can hack QMaemo5EditBar by inserting extra widget in its layout
    http://doc.qt.nokia.com/qt-maemo-4.6...o5editbar.html

  3. #3
    Registered User trandinhduy's Avatar
    Join Date
    Mar 2009
    Posts
    14
    Thanks for your answers.

    Just one more question if you don't mind.

    I am using QMainWindow as a main container, then I add a QStackedLayout as a centralwidget.

    Code:
    _stackedLayout = new QStackedLayout ( ui->centralwidget );
    When I click on an icon, I show its widget as follow:

    Code:
    void MainWindow::moveToScreen ( QWidget * screen )
    {
        if ( screen != NULL )
        {
            if ( _stackedLayout->indexOf ( screen ) < 0 )
            {
                _stackedLayout->addWidget ( screen );
            }
            _stackedLayout->setCurrentWidget ( screen );
        }
    }
    So my question is how can I modify these codes to become a stackable windows as your hint?

    Thanks.

  4. #4
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Probably something like this, but apparently it's good idea to keep all existing windows in QList or QVector.
    Code:
    QStack<QMainWindow*> stack;
    
    void QWindowStack::moveToScreen(QMainWindow *window)
    {
        if (stack.contains(window)) {
           while (stack.top() != window) {
              stack.top().close();
              stack.pop();
           }
        } else {
            window.setParent(stack(top));
            window.show();
            stack.push(window);
        }
    }

Similar Threads

  1. Scroll bar problem
    By RockyM in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-09-24, 10:32
  2. Application created using Flash lite packaging tool does not close with End button
    By pasi.hytonen@starcut.com in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2009-09-03, 22:57
  3. How to close and continue progress bar?
    By saniat.rasel in forum Symbian User Interface
    Replies: 5
    Last Post: 2009-06-29, 09:25
  4. Forum Nokia Supports maemo
    By Nokia Ron in forum News, Announcements and Job Listings
    Replies: 3
    Last Post: 2007-10-23, 09:33

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