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();
相关文章