×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Cool How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    I want to keep" Exit" option for my application so that I/user can easily close the application or Exit

    from the application.


    My application is Qt based application and I want to keep "Option" and "Exit" button just as in

    symbian.c++ application.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    And what is the current problem ?

  3. #3
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Hi,

    You can have a look at this example here.

  4. #4
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Iam new to Qt . I have used copied and pasted both softkeys.cpp and softkeys.h and included in .pro . But it is showing errors as Error or stray"\" in program and Unable to encode softkeys.cpp and softkeys.h.

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    You should simply check on what line the error is reported for, and then open the file and check the line there.

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Cool Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    The error reflecting is "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
    {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 #ifndef SOFTKEYS_H\par
    \par"


    stray '\' in program


    My files softkeys.cpp and softkeys.h are in the attachmentss
    Attached Files Attached Files
    Last edited by GTO_India; 2012-04-13 at 10:32.

  7. #7
    Registered User
    Join Date
    Mar 2012
    Posts
    20

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian


  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    You should reload the cpp & header files, those appear to be corrupted with additional characters.

  9. #9
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    How to reload ?

  10. #10
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Did u see my attachments?

  11. #11
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    I have implemneted the code from the examples given


    But now errors shown are :

    C:\YTV-build-simulator\..\YTV_grid\main.cpp:9: error: 'MainWindow' was not declared in this scope

    C:\YTV-build-simulator\..\YTV_grid\main.cpp:9: error: expected ';' before 'mainWindow'

    C:\YTV-build-simulator\..\YTV_grid\main.cpp:10: error: 'mainWindow' was not declared in this scope


    My main.cpp appears as follows:


    #include <QtGui/QApplication>
    #include "qmlapplicationviewer.h"
    #include <QMainWindow>


    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    MainWindow mainWindow;
    mainWindow.showMaximized();
    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/YTV/main.qml"));
    viewer.showExpanded();
    app.setQuitOnLastWindowClosed(true);
    return app.exec();
    }

  12. #12
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Basically simply download the files where ever you downloaded them and see that you actually get just the code.

    And as the errors are describing MainWindow is not defined. So maybe you should just use teh wizard for making the base helloworld.

    Also I do not see the point on using Qt C++ based softkeys with QML apps, so maybe you should read tutorials on QML, and handle all screen items with it.

  13. #13
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Yes Now it is not shwoing any error as I have included as #include <QMainWindow> and defined as QMainWindow mainWindow; mainWindow.showMaximized()

  14. #14
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    Re: How to keep "Option" and "Exit" button in my Qt Application just as in Symbian

    Ok Now Iam able to quit the application using http://www.developer.nokia.com/Commu...ation_from_QML as advised by yucca

Similar Threads

  1. How to use "Back" option instead of "Exit"
    By anup007star in forum Symbian
    Replies: 3
    Last Post: 2009-06-30, 13:23
  2. Replies: 3
    Last Post: 2009-06-18, 21:42
  3. how to change text of "select" and "cancel" button of menu system
    By bigboy0918 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-11-21, 06:44
  4. Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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