Discussion Board

Results 1 to 14 of 14
  1. #1
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    And what is the current problem ?

  3. #3
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    Hi,

    You can have a look at this example here.

  4. #4
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    You should simply check on what line the error is reported for, and then open the file and check the line there.

  6. #6
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    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

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    You should reload the cpp & header files, those appear to be corrupted with additional characters.

  9. #9
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    How to reload ?

  10. #10
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    Did u see my attachments?

  11. #11
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    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
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    Yes Now it is not shwoing any error as I have included as #include <QMainWindow> and defined as QMainWindow mainWindow; mainWindow.showMaximized()

  14. #14
    Super Contributor GTO_India's Avatar
    Join Date
    Nov 2010
    Posts
    871
    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 C++
    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
  •  
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