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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Help on ADN8834 burning out
- Double 11 development board recommendation: MSP430 LaunchPad
- Characteristics and research analysis of wireless communications with examples
- 【RT-Thread Reading Notes】Reading Notes for Chapters 1~4
- A look inside the U.S. Army's counter-artillery radar system
- Qorvo Broadband Access CATV and FTTH Product Selection Guide
- Use MOS tube or triode?
- Award-winning live broadcast | Power supply, motor, electronic control, new energy vehicle power design technology is coming
- On the road to 5G, is GaN technology really important?
- Why is this TVS designed like this?