利用Accepted信号判断enterBtn是否被按下
来源:百度文库 编辑:神马文学网 时间:2024/04/23 20:24:26
【摘要】 这篇文档主要是在qtcreator编程时碰到这条语句 if(my1.exec()==QDialog::Accepted) ,程序在D:\Qt\2010.04\qt\nGui里面;【思路】myl这个对象是在main.cpp文件中定义的:myDlg myl; //建立自己新建的类的对象myl; Edit->Find/Replace->Adavanced Find ->current Project 在里面进行搜索myDlg;在第三行的D:\Qt\2010.04\qt\nGui\mydlg.h下的第10行:class myDlg : public QDialog ;这表明这个myDlg是继承QDialog这个类的;所有QDialog这个类的函数myDlg都可以拿来用;welcome ->edit--->design--->debug---->projects--->help 进入help,在look for 输入QDialog;在下面找到这个函数exec();
int QDialog::exec () [slot] //这是个槽,本质上就是一普通的成员函数
Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.
If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.中文翻译:如果这个对话框是程序模式,用户不能在同一个应用程序里访问其它窗口,除非我们把这个对话框关闭; 如果这个对话框是窗口模式,只要这个对话框是处于打开状态的,它就不能和父窗口进行通信;PS:modal dialog包括window modal,application modal;void QDialog::accepted () [signal]//这是个信号,本质上也就是成员函数
This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.
Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.
利用Accepted信号判断enterBtn是否被按下
政策面依然积极向好 两大信号判断调整是否结束
判断气血是否充足
判断目录是否存在
录取通知书Accepted
如何判断见底信号
如何判断女性是否风骚
如何判断身材是否标准?
如何判断女性是否风骚
怎么判断一个人是否说谎?
如何判断庄家是否出货
如何判断庄家是否出货
如何判断酒是否变质
判断女人是否健康的
如何判断脊椎是否健康
SQL中判断是否存在..........
如何判断精液是否正常
如何判断电脑是否中毒?
判断网络地址是否可达
如何判断是否有庄家
如何判断丸药是否变质
如何判断固定资产是否减值
怎样判断女方是否高潮
怎样判断女方是否高潮