Inside Qt for Symbian QApplication: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
AutoSpider (talk | contribs) (Mark Outdated: Symbian no longer supported) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Outdated|reason=The Symbian platform is no longer supported.}} | |||
{{Cleanup | reason=Auto-imported from ExpressionEngine.}} | |||
We all know that the application is started after we create a QApplication like the following: | == How is the application started? == | ||
We all know that the application is started after we create a QApplication like the following: | |||
<code>QApplication app(argv, args);<code> | |||
wow, thats really much easier than symbian, you know, you have to know so much about the AVKON application framework when using Symbian C++, and for now, all you have to know is creating a QApplication. But Im the person who always wanna know more, so lets look inside the source code. | |||
First, let us take a look at QApplication's ctor: | First, let us take a look at QApplication's ctor: | ||
</code>QApplication::QApplication(int &argc, char **argv) | |||
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient) //create a QApplicationPrivate | |||
{ | |||
Q_D(QApplication); //just Q_D macro, so we can just the following d | |||
d->construct(); //call d's construct() | |||
}<code> | |||
Line 2 creates a QApplicationPrivate with argc, argv and GuiClient. Here GuiClient is an enum, and we use it to tell QCoreApplication what type of application we wanna create. | Line 2 creates a QApplicationPrivate with argc, argv and GuiClient. Here GuiClient is an enum, and we use it to tell QCoreApplication what type of application we wanna create. |
Latest revision as of 15:17, 19 March 2015
IMPORTANT: The content of this page is outdated. Reason: The Symbian platform is no longer supported. If you have checked or updated this page and found the content to be suitable, please remove this notice. |
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine. Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean. |
How is the application started?
We all know that the application is started after we create a QApplication like the following:
QApplication app(argv, args);<code>
wow, thats really much easier than symbian, you know, you have to know so much about the AVKON application framework when using Symbian C++, and for now, all you have to know is creating a QApplication. But Im the person who always wanna know more, so lets look inside the source code.
First, let us take a look at QApplication's ctor:
QApplication::QApplication(int &argc, char **argv)
: QCoreApplication(*new QApplicationPrivate(argc, argv, GuiClient) //create a QApplicationPrivate
{
Q_D(QApplication); //just Q_D macro, so we can just the following d d->construct(); //call d's construct()
}
Line 2 creates a QApplicationPrivate with argc, argv and GuiClient. Here GuiClient is an enum, and we use it to tell QCoreApplication what type of application we wanna create.