FAQs about qtopia

Source: Internet
Author: User

Which of the following FAQs come from http://www.qtcn.org/bbs/simple/index.php? T5096.html

What is the relationship between Qt-X11/qtembedded/qtopia and other common packages?
You can often see the following packages when building qtopia:
Qt-x11-2.3.2
Qt-x11-3.3.x
Qte-2.3.x
Qtopia-2.x
Tmake-1.3
Qmake, UIC, MoC
...

Qtopia compilation depends on QTE;
The qt-x11-2.3 is only related to compiling some tools, such as UIC, MOC, qvfb .. qtopia does not depend on the qt-x11;
Qt-x11-3.3.x is used to compile the lupdate and lrelease tools related to qtopia desktop (tool for qtopia and desktop synchronization) and i18n, so if you do not add the-no-qtopiadesktop option when configure qtopia or use the-versions parameter to prepare the qt-x11-3.x, and there is a modem simulation tool called phonesim in the phone version, also rely on qt-x11-3.x compilation, but most people are not used, huh, huh.

Tmake is used to generate makefile files for QTE applications;
Qmake is included in qtopia and used to generate a MAKEFILE file for the qtopia application;
When using UIC, MOC, qvfb, qmake, tmake, and designer, pay attention to version 2.x, 3.x, and 4. X is incompatible, but it is compatible between the same major version, so we often copy the ready-made UIC and MoC from the qt-x11-2.3 during the build qtopia process for qte use.
During compilation, some header files cannot be found, and the class is undefined. This is often caused by incorrect use of UIC and other tools in the default search path of the system. Pay attention to this issue.

Qtopia/qtembedded version ing?
Qtopia1.7.0/QTE 2.3.7
Qtopia2.1.1/QTE 2.3.10
Qtopia2.1.2/QTE 2.3.11
Qtopia2.2.0/QTE 2.3.12 (included in the qtopia2.2 source code package)

Qtopia/qtembedded source code package?
QT/QTE:
Ftp://ftp.trolltech.com/qt/source
Ftp://ftp.qtopia.org.cn/mirror/ftp.trolltech.com/qt/source

Qtopia (1.6-2.2 ):
Ftp://ftp.trolltech.com/qtopia/source
Ftp://ftp.qtopia.org.cn/mirror/ftp.trolltech.com/qtopia/source

Tmake:
Ftp://ftp.trolltech.com/freebies/tmake
Ftp://ftp.qtopia.org.cn/mirror/ftp.trolltech.com/freebies/tmake

Why are Chinese characters in my qtembedded program displayed as squares?
There are two possible reasons:
First, the QTE library is not compiled into the support for Chinese textcodec, solution: Modify the qconfig-qpe.h, remove the macros related to codec, re-configure and make

Second, the font selected in the program is not a Chinese font (the default font is Helvetica and there is no Chinese). You must specify a Chinese font in the program, for example, QTE's built-in uniont (which is generally regarded as defective). In qt4, the Unicode font of wenquanyi is added, which can be found in the source code package. It is pretty and recommended.

How can I port the qtembedded program to the qtopia program?
Qtopia provides a simple macro to create the main window and apply the style. The main change lies in the main function.
Refer to qtopia/src/applications/clock/Main. cpp
--------------------------------------------------
# Include "mymainwindow. H"
# Include <qtopia/qpeapplication. h>
Qtopia_add_application ("myappname", "mymainwindow ")
Qtopia_main
---------------------------------------------------
This step is very easy. It's okay to change the class name and binary name from CP.
Note that the constructor of your mainwindow must conform to the (qwidget * P, const char * Name, int f) format (three parameters)

Modify the pro file accordingly. Refer to qtopia/src/applications/clock. Pro
The most important line is config + = qtopiaapp
In this way, we compile the quicklaunch plug-in program (the default config of the program under the applications directory is quichlaunch, and other directories are not Oh ~)

To compile an independent application, add config-= buildquicklaunch.

Success!

How can I add my own applications to the qtopia desktop?
First, modify your application to the qtopia application (see the previous question ).
Then, run your program CP to the default search path of the qtopia program:
Put the application in srcdir/qtopia/image/opt/qtopia/bin. (srcdir/qtopia/image/opt/qtopia is abbreviated "...")
Put the quicklaunch plug-in under ../plugins/application.

If the compiled quicklauncher plug-in is called libmybin. So, you need to create a link file: ln-s quicklauncher mybin under ../bin.

In addition, you also need to create a desktop file (find a ready-made change) and put this desktop file in qtopia's
../Apps/applications.

The most important information in the desktop file is the associated execution file name and icon file name. The execution file name corresponds to mybin. If the icon is used, only one file name is written in the desktop file, however, when qtopia searches, it searches for the icon file in the subdirectory named after the execution file, that is, the icon file... /pics/mybin/xxx.png.

After the preceding environment is complete, you can view your applications on the applications page.

In qtopia1.7, the processing of Icon files is slightly different. The default icon search mainly involves two locations. One is the embedded icon, that is, the inlinepics_p.h generated by the qembed tool, in addition, files under the pics directory. If the corresponding icon array is not found in the inline header file, it will be searched under the pics directory. Others seem to be similar.

How do I set the font of qtopia?
2. There is a qpe. conf file under $ home/settings/In the runtime of the X Series version, where the fontfamily field under [apperance] sets the fontsize and fontsize sets the fontsize.

Both the qtopia and QTE programs will search for fonts in the $ qtdir/lib/fonts directory at runtime, so the fonts you want to use should also be placed here. Modify the fontdir file in the directory as needed. This file is the ing between the fontfamily (fontsize...) and the actual font file. You must write it correctly before you can find the font file.

Why can't the examples of qtembedded be compiled?
When compiling an example, this prompt message is often displayed, and compilation fails:
"# Make
Some of the required modules (full-config) are not available.
Skipped ."

What's going on?
I think you should know that the QTE library can add or delete some features by modifying qconfig. That is to say, by defining some macros, you can remove the class definition contained in the QTE library to reduce the QTE library size. Therefore, the QTE library compiled in different configurations is incompatible in most cases.

You can obtain some information (such as aclock) from the. Pro file in this example. This line is often found in the Pro file:
Requires + = Full-config
This statement indicates that the class used by this QTE application can be satisfied only in full-config. Therefore, if you use other config options, you will not be able to compile them. If you have to compile the file, it is not impossible to remove this restriction and regenerate the makefile. However, it is very likely that errors such as undefined reference or class cannot be found will occur, make preparations ......

Another way to compile a QTE is to use the-qconfig all parameter configure qtembedded. In this way, the QTE library contains all the features, so that all examples can be compiled.

How do I cut the qtembedded library?
Qtembedded defines a series of features
# Ifndef no_xxx
# Endif
In this way, the Code related to the feature is enclosed in a specific macro. If a no_xxx macro is defined, this feature is removed to reduce the compilation code, this reduces the size of libqte.

You have a-qconfig XXX parameter in configure QTE, which specifies the header file containing features macro, such as the qconfig-qpe.h in qtopia is a macro definition file tailored for qtopia, this file removes the unused feature (such as printing) of qtopia ). If the-qconfig parameter is not specified during configure, you will be prompted to select one from the pre-defined qconfig of QTE, such as small/large/full, which correspond to different qconfig-xxx files, each file contains different feature definitions. Location: $ qtedir/src/tools/qconfig-xxx.h

We want to reduce the QTE library, it is best to create a qconfig-myconfig.h file of our own, their program does not use the features of the corresponding macro definition in this file. Add the-qconfig myconfig option to configure QTE so that you can use your own feature definition file.

In addition, it should be noted that the feature is dependent on each other. You may disable a feature and some other features. For more information, see the description of feature dependency in $ qtedir/src/tools/qfeatures. h.

For more information about features of the feature macro, see:
Http://doc.trolltech.com/qtopia2.0/html/features.html

Good luck!

How can I change the default desktop color (green) of qvfb )?
QTE 2.x provides the following APIs:
Qwsserver: seteffectopbackground (const qcolor &);
Qwsserver: setjavastopbackground (const qimage &);

Qtopia Core 4 provides the following APIs:
Qwsserver: setbackground (const qbrush &);

The default color is in the qwindowsystem_qws.cpp file of the source code and assigned a value in the constructor of qwsserver. You can also directly modify the source code.

 

 

Qtopia supports Touch Screen

The following paragraph is excerpted from the http://blog.csdn.net/skalidis/archive/2006/03/04/615079.aspx

In order to make qtopia support touch level, these two naively exhausted their efforts and thoughts. I have been working for about 20 hours and still have no results. I am depressed, depressed, and extremely depressed! I have read some documents and the process is difficult. I will make a simple summary below:

In Linux, there are two types of touch flat drivers: one is to be located by the application; the other is to write the positioning information to the driver (which seems like this, not quite understandable ). For mizi 2410, the driver is the first type. So how can we make qtopia support touch screen when porting QT/E and qtopia? In my understanding, there are two methods.

First, modify the src/kernel/qwsxx_mouse.cpp file in QT/e ), the specific method is to first add # define customtouch to the file (this file has been annotated above, and you can just comment out), and then modify the program source code, the specific modification method can be found in the article pointer handling in qopia 2.1.1. At the same time, when configuring qtopia, it is best to add # define qws_need_calibration to the specific configuration file of the device. When qtopia is started, it will check whether there is a pointcal file in/etc. If not, the user correction process is generated first, and the correction information is stored in the/etc/pointcal file. Correction is no longer required when the file is started later. If the # define qws_need_calibration configuration is not added, you must correct the qtopia before starting the qtopia (the same algorithm as QT/e must be used) to enable the qtopia ), and generate the/etc/pointcal file. Otherwise, qtopia reports that the file cannot be opened during startup, and thus cannot touch the file.

The second method uses tslib instead of modifying QT/e. Add-tslib When configuring QT/e, and add # define qws_need_calibration When configuring qtopia (if not, you must correct the qtopia before starting the/etc/pointcal file ), in this way, when qtopia is started for the first time, it will call the correction function in QT/E for correction. The QT/e correction function uses the unified interface provided by tslib. So what is the order of compiling files? Because the structure of the touch plane driver is different, tslib encapsulates different touch plane drivers. When using tslib, you only need to write a small plugin according to the plugin example in tslib for your touch plane driver, then compile tslib, and then compile QT/e with the tslib library you compiled, and then compile qtopia.

According to the second method I have summarized, I have done everything well. As a result, due to the NFS of the Board and its poor performance, the connection is always interrupted during qpe execution and it has never been able to run normally. No way, I had to split the flash into 25 MB to form a jffs2 file system. I planned to copy the qtopia file to the Flash file. As a result, there was no jflash tool. I still had to use NFS to copy the file, my God! NFS is still not OK during copy! If you don't want to copy the file to flash, you can try again.

In a rush, I wrote these things in a mess. There may be many incorrect symbols. Let's do this first. Wait until the problem is solved and write a detailed process! God, help me! The problem is about to be solved!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.