×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    19

    Menu is not closed when opening a fullscreen stacked window

    Hi,

    In Qt4.6 with Maemo5 widgets, I would like to open from a menu item of a main window, a new fullscreen stacked window containing a QMaemo5EditBar.

    I have followed example qt/x11-maemo/examples/maemo5/widgets and changed window.cpp like that:

    void MainWindow::showExpose()
    {
    showWidgets4();
    return;

    QDBusConnection c = QDBusConnection::sessionBus();
    QDBusMessage m = QDBusMessage::createSignal("/","com.nokia.hildon_desktop","exit_app_view");
    c.send(m);
    }

    I get problem, that menu from main window is still opened until new stacked window is closed.
    How can I close a menu right after clicking a menu item in that case ?

    Thanks

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Menu is not closed when opening a fullscreen stacked window

    I've tried the example with the following change (never produce any bad code):

    Code:
    diff -ru qt-x11-maemo-examples-maemo5-widgets.orig/window.cpp qt-x11-maemo-examples-maemo5-widgets/window.cpp
    --- qt-x11-maemo-examples-maemo5-widgets.orig/window.cpp	2010-01-10 16:56:47.000000000 +0200
    +++ qt-x11-maemo-examples-maemo5-widgets/window.cpp	2010-01-10 17:22:11.000000000 +0200
    @@ -206,6 +206,7 @@
         menuBar()->addAction(tr("Show a Note"), this, SLOT(showNote()));
         menuBar()->addAction(tr("Show a Expose"), this, SLOT(showExpose()));
         menuBar()->addAction(tr("Show a Complex Note"), this, SLOT(showComplexNote()));
    +    menuBar()->addAction(tr("Show a List"), this, SLOT(showWidgets4()));
     
         // add a checkbox action
         QAction *checkAction = new QAction(tr("Busy"), this);
    And it works just perfect for me. I have Qt 4.6.0~git20091218-0maemo1 installed.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    19

    Re: Menu is not closed when opening a fullscreen stacked window

    I use too Qt 4.6.0~git20091218-0maemo1, but in Fremantle SDK on my desktop.
    Even with your proposal, I still can see that the Menu will start to be closed only when a press the Cancel arrow of the fullscreen stacked window "Show List"

    I

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Menu is not closed when opening a fullscreen stacked window

    Quote Originally Posted by foo6321 View Post
    I use too Qt 4.6.0~git20091218-0maemo1, but in Fremantle SDK on my desktop.
    Even with your proposal, I still can see that the Menu will start to be closed only when a press the Cancel arrow of the fullscreen stacked window "Show List"

    I
    I don't use Xephyr. It's working properly on N900 device.

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    19

    Re: Menu is not closed when opening a fullscreen stacked window

    ok, I trust you if it works on the device.

    About customizing the closing of a stacked window, is it a good choice to use closeEvent like for example in ListWindow:

    class ListWindow : public Window
    {
    Q_OBJECT

    public:
    ListWindow(MainWindow *parent);

    private slots:
    void actionClicked();

    protected:
    void closeEvent(QCloseEvent *event);

    };


    void ListWindow::closeEvent(QCloseEvent *event)
    {
    //My code


    event->accept();
    }


    Or there is a better way.

    Thanks

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Menu is not closed when opening a fullscreen stacked window

    Quote Originally Posted by foo6321 View Post
    About customizing the closing of a stacked window, is it a good choice to use closeEvent.
    Or there is a better way.
    It depends on what kind of customizing you do. You can prevent your window from being closed by
    calling event->ignore();

Similar Threads

  1. EGL window surface not fullscreen
    By storsjo in forum Symbian Media (Closed)
    Replies: 17
    Last Post: 2007-01-02, 08:14
  2. Problem Creating Window Using RWindow and putting More controls on it
    By er_gps212 in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-10-28, 06:22
  3. About window views
    By thodime_guru in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-06-17, 18:00
  4. Replies: 1
    Last Post: 2003-07-08, 04:48
  5. Application window "moves" with menu
    By colinward in forum Symbian
    Replies: 1
    Last Post: 2002-11-11, 14:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×