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.
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.
And what is the current problem ?
Hi,
You can have a look at this example here.
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.
You should simply check on what line the error is reported for, and then open the file and check the line there.
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
Last edited by GTO_India; 2012-04-13 at 10:32.
You should reload the cpp & header files, those appear to be corrupted with additional characters.
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();
}
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.
Yes Now it is not shwoing any error as I have included as #include <QMainWindow> and defined as QMainWindow mainWindow; mainWindow.showMaximized()
Ok Now Iam able to quit the application using http://www.developer.nokia.com/Commu...ation_from_QML as advised by yucca