[Embedded] Use Qt to add a software keyboard to ARM9 (mini2440) and add a dynamic link library

Publisher:SparklingSunLatest update time:2024-08-02 Source: elecfansKeywords:Qt  ARM9  mini2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The following four files can be downloaded from the embedded folder KeyPad in the Quickdisk


The methods for adding other dynamic link libraries are the same


Account: sharefromfox@163.com Password: 3.1415926


The following four files can be downloaded from the embedded folder KeyPad in the Quickdisk


The methods for adding other dynamic link libraries are the same


Account: sharefromfox@163.com Password: 3.1415926

first step:


First modify the usage permissions of the five files, preferably all 777


(sudo)Chomd 777 + (filename)


Copy the libQSoftKeypad.so.1.0.0 library file to the /usr/local/lib/ directory


sudo cp libQSoftKeypad.so.1.0.0 /usr/local/lib/


Enter the /usr/local/lib/ directory


Create three connections for the library file: *.so,*.so.1,*.so.1.0,


You can use the following command:


1 ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so.1.0

2

3 ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so.1

4

5 ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so

(sudo ldconfig –v can view all dynamic link libraries)


sudo ldconfig –v |grep libQ to view the library containing libQ

The next step is to copy the other four header files to the cross-environment compiler library


1 sudo cp keyboard.h qsoftkeypad.h keyunit.h QSoftKeypad_global.h /usr/local/Trolltech/Qt-4.6.3-arm/include/QtGui/


Of course, you also need to copy the library file card to the cross-compilation environment library and create 3 connections


1 sudo cp libQSoftKeypad.so.1.0.0 /usr/local/Trolltech/Qt-4.6.3-arm/lib/

2 sudo ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so.1.0

3 sudo ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so.1

4 sudo ln -s libQSoftKeypad.so.1.0.0 libQSoftKeypad.so

Next, add libQSoftKeypad.so.1.0.0 to the system compilation environment library of the development board


And perform dynamic linking, the steps are the same as above, pay attention to the path

Okay, that's it. Let's write a Qt program to test it.


Running the following program in qt fails


You can only use the command line to cross compile. This requires setting up the Qt environment for the development board first.


First add LIBS += -lQSoftKeypad to the project's .pro file


7 QT += core gui

8

9 TARGET = KeyPad

10 TEMPLATE = app

11

12

13 SOURCES += main.cpp

14 mainwindow.cpp

15

16 HEADERS += mainwindow.h

17

18 FORMS += mainwindow.ui

19

20 LIBS += -lQSoftKeypad


1 #ifndef MAINWINDOW_H

2 #define MAINWINDOW_H

3

4 #include

5 #include "qsoftkeypad.h"

6 #include

7

8 namespace Ui {

9 class MainWindow;

10 }

11

12 class MainWindow : public QMainWindow

13 {

14 Q_OBJECT

15

16 public:

17 explicit MainWindow(QWidget *parent = 0);

18~MainWindow();

private:


Ui::MainWindow *ui;


private slots:


void on_pushButton_clicked();


};


1 #include "mainwindow.h"

2 #include "ui_mainwindow.h"

3

4 MainWindow::MainWindow(QWidget *parent):

5 QMainWindow(parent),

6 ui(new Ui::MainWindow)

7 {

8 ui->setupUi(this);

9 setWindowFlags(Qt::FramelessWindowHint);

10 setFocusPolicy(Qt::StrongFocus);

11 }

12

13 MainWindow::~MainWindow()

14 {

15 delete ui;

16 }

17

18 void MainWindow::on_pushButton_clicked()

19 {

20 ui->label->setText(ui->lineEdit->text());

twenty one }


After cross-compiling, copy the KeyPad in the KeyPad file to the development board system environment. In my quick disk, I have sent all the files generated after cross-compiling. You can use it directly, but the effect may be a little bit wrong. Pay attention to adding #include "qsoftkeypad.h" header file in the program. The program is simple and the interface is easy to implement without detailed description.

Keywords:Qt  ARM9  mini2440 Reference address:[Embedded] Use Qt to add a software keyboard to ARM9 (mini2440) and add a dynamic link library

Previous article:【Technical Support】Building the Qt environment for ARM9 development board
Next article:S3C2440 WINCE6 changes USB DEVICE to USB HOST and implements two USB HOSTs

Recommended ReadingLatest update time:2024-11-16 09:29

Mini2440 bare metal experiment LED program, buttons, interrupts
Test platform: Mini2440 Win7 64 ADS development environment test This program mainly considers the relationship between buttons, LED lighting, and interrupt mode (IRQ) The following is the main.c code part. For other information, please refer to the 2440 use case code provided by Samsung. #define GLOBAL_CLK 1
[Microcontroller]
Mini2440 bare metal experiment LED program, buttons, interrupts
Qt joins hands with LG, webOS is expected to become the preferred platform for future embedded smart devices
introduction    After LG announced that it would turn to open source again in 2018, the webOS smart operating system has been reborn and attracted the attention of the industry. Recently, webOS has ushered in another milestone development opportunity. The Qt Company announced that it has selected webOS as the Qt
[Internet of Things]
Qt joins hands with LG, webOS is expected to become the preferred platform for future embedded smart devices
mini2440 development board network settings (permanent changes, not restored after restart)
The simplest way to set up the network of the mini2440 development board is to use ifconfig. However, after this setting, the IP and gateway after ifconfig is restarted will still be the same as before. So how can we set it so that ifconfig sees the ideal IP after resetting or restarting the development board? The fol
[Microcontroller]
ARM9(S3C2440) UART
Data communication method The data communication methods are basically divided into: (1) Parallel communication: Multiple data lines transmit each bit of data in the same manner. Features: fast transmission speed, suitable for short-distance communication. (2) Serial communication: A data line transmits data o
[Microcontroller]
Mini2440 porting qt-extended4.4.3
Due to project requirements, I ported qt-extended4.4.3 to Mini2440 some time ago. I will now briefly describe the porting process, hoping that it will be helpful to friends who are doing related work. 1. Development Environment Host computer: Fedora 9.0 Cross compiler version: arm-linux-gcc4.4
[Microcontroller]
Mini2440 porting qt-extended4.4.3
Nor Flash boot and Nand Flash boot of mini2440
CPU Processor - Samsung S3C2440A, main frequency 400MHz, maximum 533Mhz   SDRAM Memory - On-board 64M SDRAM - 32-bit data bus - SDRAM clock frequency up to 100MHz  FLASH storage - On-board 128M Nand Flash, non-volatile when power off - On-board 2M Nor Flash, non-volatile when power off, BIOS already installed  T
[Microcontroller]
Fingerprint recognition access control system based on ARM9
Fingerprint access control system is a high-tech security facility based on biometric recognition technology. In recent years, it has been widely used at home and abroad and has become one of the symbols of modern building intelligence. For some core confidential departments, such as important agencies, scientific res
[Microcontroller]
Fingerprint recognition access control system based on ARM9
Porting Qt graphical interface application to S3C2440 arm development board
1. Enter a GUI application directory that has been written by Qt. For example, my application directory is /home/czd/qt_project/mp3player/. $ cd /home/czd/qt_project/mp3player/. I found that there is a mp3player.pro file in it. In the qt-embedded-linux environment configured above, a Trolltech directory is automatical
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号