I will teach you how to port konqueror (1)

Source: Internet
Author: User
Tags emit

KonquerorMany people use it. It is much better than some browsers. This article will teach you how to port konqueror.

1. Compile the QTE Library

Generally, If You Want To develop Qt/Embedded, you 'd better compile Qt/Embedded into two versions: the host version and the target version.

2. After obtaining the source code of Qt/Embeded, decompress it to two directories respectively.

3. Compile the host version

1) export environment variable

Export QTDIR =/usr/local/qtopia/work/qt-2.3.5

Export QTEDIR = $ QTDIR

Export PATH = $ QTDIR/bin: $ PATH

Export LD_LIBRARY_PATH = $ QTDIR/lib: $ LD_LIBRARY_PATH

2) Run./configure

./Configure-depths 16.32,-no-ipv6-no-cups-no-pch-qvfb

3) Compile the Qt/Embedded function library

Make sub-src

4) Compile Qt/Embedded auxiliary development tools

Cd tools; make

In this step, a uic command that can be run in the host environment (x86) is placed in the $ QTDIR/bin directory.

In this case, you can use the qvfb tool provided by qte to run the example in examples in the qvfb window.

4. Compile the target version

First install the cross-compilation tool

Qte version is qt-2.3.5

Because I am using a PXA255 board, the touch screen driver is inconsistent with the touch screen interface in qt-embedded.

You must modify src/kernel/qwsmouse_qws.cpp in the qte directory.

Add a member variable unsigned char prevstate when defining the QCustomTPanelHandlerPrivate class.

The modified class definition is as follows:

Class QCustomTPanelHandlerPrivate: public QWSMouseHandler {

Q_OBJECT

Public:

QCustomTPanelHandlerPrivate (MouseProtocol, QString dev );

~ QCustomTPanelHandlerPrivate ();

Private:

Int mouseFD;

Unsigned char prevstate;

Private slots:

Void readMouseData ();

};

Then modify the member function readMouseData.

To:

Void QCustomTPanelHandlerPrivate: readMouseData ()

{

If (! Qt_screen)

Return;

CustomTPdata data;

Short data2 [4] = {0 };

Int ret;

Ret = read (mouseFD, data2, sizeof (data2 ));

If (ret ){

Data. status = data2 [0];

Data. xpos = data2 [1];

Data. ypos = data2 [2];

QPoint q;

Q. setX (data. xpos );

Q. setY (data. ypos );

MousePos = q;

If (data. status &&! Prevstate ){

Emit mouseChanged (mousePos, Qt: LeftButton );

} Else if (! Data. status & prevstate ){

Emit mouseChanged (mousePos, 0 );

}

Prevstate = data. status;

}

If (ret <0 ){

QDebug ("Error % s", strerror (errno ));

}

}

Then compile qte

The compilation script is as follows:

#! /Bin/sh

Export QTDIR = 'pwd'

Export CC = arm-linux-gcc

Export AR = arm-linux-ar

Export NM = arm-linux-nm

Export RANLIB = arm-linux-ranlib

Export CXX = arm-linux-g ++

Export LINKER = arm-linux-g ++

Export STIRP = arm-linux-strip

Export OPTIONS = "-DQT_QWS_IPAQ-DQWS-dno-exceptions-fno-rtti-pipe"

Make clean

Echo yes |. /configure-release-shared-gif-no-sm-no-thread-system-zlib-system-libpng-no-mng-system-jpeg-no-nas-sound-no -opengl-no-xft-qconfig qpe-depths 16-no-qvfb-vnc-xplatform linux-ipaq-g ++ &&

Make


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.