• 大小: 39KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-02
  • 语言: 其他
  • 标签: 软键盘  QT4.8  

资源简介

此资源为qt4.8软键盘代码(只完成了一个lineedit的功能),该软键盘类似于安卓系统键盘可点击输入框弹出软键盘

资源截图

代码片段和文件信息

#include “dialog.h“
#include “ui_dialog.h“
#include
QLineEdit *line;
Dialog::Dialog(QWidget *parent) :
    QDialog(parent)
    ui(new Ui::Dialog)
{
    ui->setupUi(this);

    ui->name->installEventFilter(this);
}

Dialog::~Dialog()
{
    delete ui;
}

bool Dialog::eventFilter(Qobject *obj QEvent *eve)
{
    if(obj==ui->name&&eve->type()==QEvent::MouseButtonPress)
    {
        line=ui->name;
        keyboard *key=new keyboard();
        key->show();
    }
    Qobject::eventFilter(objeve);
}


void Dialog::on_keyboard_clicked()
{
    keyboard *key=new keyboard();
    key->show();
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-01-24 03:48  test2112\
     目录           0  2019-01-24 09:05  test2112\demo\
     目录           0  2019-01-24 08:58  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\
     文件       35998  2019-01-24 08:58  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\demo
     文件        5928  2019-01-24 08:24  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\dialog.o
     文件       11316  2019-01-24 08:58  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\keyboard.o
     文件        1956  2019-01-24 08:27  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\main.o
     文件       10929  2019-01-24 03:48  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\Makefile
     文件        2735  2019-01-24 08:24  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\moc_dialog.cpp
     文件        6900  2019-01-24 08:24  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\moc_dialog.o
     文件        2745  2019-01-24 08:24  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\moc_keyboard.cpp
     文件        6928  2019-01-24 08:24  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\moc_keyboard.o
     文件        1917  2019-01-24 03:48  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\ui_dialog.h
     文件        1742  2019-01-24 08:07  test2112\demo-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK____\ui_keyboard.h
     文件         350  2019-01-24 03:22  test2112\demo\demo.pro
     文件       27659  2019-01-24 09:05  test2112\demo\demo.pro.user
     文件         600  2019-01-24 05:11  test2112\demo\dialog.cpp
     文件         379  2019-01-24 04:54  test2112\demo\dialog.h
     文件        1095  2019-01-24 03:48  test2112\demo\dialog.ui
     文件        1363  2019-01-24 09:01  test2112\demo\keyboard.cpp
     文件         345  2019-01-24 08:22  test2112\demo\keyboard.h
     文件         660  2019-01-24 08:07  test2112\demo\keyboard.ui
     文件         266  2019-01-24 08:27  test2112\demo\main.cpp

评论

共有 条评论