myDlg->setWindowTitle(tr("创建socket服务器"));
QLabel *mylisthenPortlabel = new (QLabel);
QLineEdit *mylisthenPortLineEdit = new (QLineEdit);
QVBoxLayout *myMainLayout = new (QVBoxLayout);
mylisthenPortlabel->setText(tr("监听端口"));
mylisthenPortLineEdit->setText(tr(""));
QHBoxLayout *myTopLayout = new QHBoxLayout;
QHBoxLayout *myButtonLayout = new QHBoxLayout;
QDialogButtonBox *myBtnBox = new QDialogButtonBox;
myBtnBox = new QDialogButtonBox;
myBtnBox->setObjectName(QStringLiteral("buttonBox"));
myBtnBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
myBtnBox->button(QDialogButtonBox::Ok)->setText(tr("确定"));
myBtnBox->button(QDialogButtonBox::Cancel)->setText(tr("取消"));
myTopLayout->addWidget(mylisthenPortlabel);
QT 代码创建对话框
最新推荐文章于 2024-08-14 16:24:16 发布