An IP address widget for Qt, Similar to MFC#39;s IP address control(Qt 的 IP 地址小部件,类似于 MFC 的 IP 地址控制)
问题描述
我正在Qt 中寻找一个类似于MFC 的IP 地址控制的小部件.有谁知道这样的小部件,或者我可以如何创建一个?
I am looking for a widget in Qt which is similar to MFC's IP address control. Does anyone know of such a widget, or perhaps how I can create one?
推荐答案
我不知道什么是MFC IP Widget,但看起来它是一个输入IP 地址的Widget.您需要使用带有 inputMask "000.000.000.000;_" 的 QLineEdit
I have no idea what's an MFC IP Widget, but looks like it is a Widget to enter an IP address. You need to use a QLineEdit with a inputMask "000.000.000.000;_"
QLineEdit *ipEdit = new QLineEdit();
ipEdit->setInputMask("000.000.000.000;_");
ipEdit->show();
这篇关于Qt 的 IP 地址小部件,类似于 MFC 的 IP 地址控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Qt 的 IP 地址小部件,类似于 MFC 的 IP 地址控制


- 从python回调到c++的选项 2022-11-16
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- STL 中有 dereference_iterator 吗? 2022-01-01
- 静态初始化顺序失败 2022-01-01
- C++ 协变模板 2021-01-01
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- 近似搜索的工作原理 2021-01-01
- Stroustrup 的 Simple_window.h 2022-01-01
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01