Home

OFF-SOFT.net

OFF-SOFT.net

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]

qmake in VC + + 2008 Express to create a project file

Published on| May 10th, 2009 | No Comment.
Description:
About Qt preferences, recently wrote the article.
There is create a MEIKUFAIRUPUROJEKUTO would like to compile and debug. However, in a way that is stalled in the various causes. Even if I want to add additional libraries are listed individually as in the article, in the first article is not successful. For example, writing a Makefile spew, it will be overwritten with the next build. To the common (common projects) if, Qt's "qmake.conf" hand that I have to change.

However, this is the best bet, I do not know. So, VC + + MEIKUFAIRUPUROJEKUTO not the normal run (exe) file to create a project file would not?
The answer is, as in the manual, "is available, version of the product" Visual Studio integration facilities "it is better to buy" There are descriptive.
This time around I would like to write a little.

Related Articles: VC + + 2008 Express and using the sample compiled Qt Preferences

Immediately, VC + + 2008 Express lets you create a project file
Previous article "VC + + 2008 Express to compile Qt using the sample configuration and the" let's create sample.cpp based on use.

1
2
3
4
C:\Program Files\Microsoft Visual Studio 9.0\VC> cd C:\temp
C:\temp> qmake -project
C:\temp> qmake -tp vc temp.pro
C:\temp> 
The last "qmake-tp vc temp.pro" in "temp.pro" of the Qt project files for VC + + project file.

The problem is, this created a VC + + project files of various colors and they change with Qt project is managed by state and become heavy. Qt is also the one that destroyed the project, in fact, too, and not through this Makefile, you can not. For example, MOC. Usually, MOC is, "qmake-tp vc temp.pro" command when you enter a project file in Qt (temp.pro) at the MOC as you could've run, run to the front of the building, Otherwise, you do nothing.
In other words, the finished project to VC + + and MOC also added to the source must run the MOC must be careful that does not run.

[Qt quote from the manual]
MOC: META OBJECT COMPILER

Qt META OBJECT SYSTEM of signals for communication between the object / structure and run-time type information of the slot provides a dynamic PUROPATISHISUTEMU.

META OBJECT SYSTEM is based on the following three:

* QObject class
* The definition of the private class "Q_OBJECT" macro
* META OBJECT COMPILER (moc)

The moc reads C + + source files, "Q_OBJECT" and find a class definition contains a macro, including META OBJECT different classes for the C + + source file. Source file that was created in the source file or class # include and link the implementation of the class to compile.

Signal and Slot for communication between objects (which are the main reasons to use the META OBJECT SYSTEM), other META OBJECT CODE the QObject implements several functions:

* Function className () - Returns the string name of the class running. C + + compiler for run-time type information (RTTI) support is not required.
* Function inherits () - returns the object if the QObject class is the class inheritance hierarchy in the tree.
* Function tr () - translation of the string with the scope for internationalization
* Two functions setProperty () and property () - will be set and retrieved by the dynamic OBUJEKUTOPUROPATI name.
* Function metaObject () - Returns the meta object associated with the class.

Without the use of Q_OBJECT macro META OBJECT CODE QObject and can be used as the basic class, and features described here will not be able to use signals and slots. The terms of META OBJECT SYSTEM, QObject subclass without meta code is equivalent to the super class with the closest META OBJECT CODE. This means, for example className () that returns the name of the superclass, not the actual name of the class. Signals and slots, regardless of whether you use the QObject property is highly recommended that you use this macro in all subclasses.

※ Qt does, Win32 SDK and MFC to the callback function to process and are replaced by the concept of signals and slots.
UNIX system, standard, signal, and I sense there is a sense, Windows is in the system, signal the most, I would not be treated. If you have not done a Windows-only, some may読MI返SHITA the manual is better.

Other
UIC: USER INTERFACE COMPILER
IDC: There are also INTERFACE DISCRIPTION COMPILER.

During project creation, you have configured all Phil, you have very little?
So this way, I believe very fragile.
Manual "It is better to buy the full version" That is, I think that it will be around to support this. (I do not know what we can or not the retail version. )


  • はてなブックマークへ追加する
  • Facebookでシェアする
  • twitter でつぶやく
  • Google Plusでシェアする
  • Pocketでシェアする
ページトップへ