免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
利用Accepted信號判斷enterBtn是否被按下
【摘要】
      這篇文檔主要是在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   在里面進(jìn)行搜索myDlg;
在第三行的D:\Qt\2010.04\qt\nGui\mydlg.h下的第10行:class myDlg : public QDialog ;這表明這個myDlg是繼承QDialog這個類的;所有QDialog這個類的函數(shù)myDlg都可以拿來用;
welcome ->edit--->design--->debug---->projects--->help  進(jìn)入help,在look for 輸入QDialog;在下面找到這個函數(shù)exec();

int QDialog::exec ()   [slot] //這是個槽,本質(zhì)上就是一普通的成員函數(shù)

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.
中文翻譯:如果這個對話框是程序模式,用戶不能在同一個應(yīng)用程序里訪問其它窗口,除非我們把這個對話框關(guān)閉;
                  如果這個對話框是窗口模式,只要這個對話框是處于打開狀態(tài)的,它就不能和父窗口進(jìn)行通信;
PS:modal dialog包括window modal,application modal;

void QDialog::accepted ()   [signal]//這是個信號,本質(zhì)上也就是成員函數(shù)

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.

 
 
 
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Qtcreator教程二(編寫多窗口程序)
第2篇 Qt5基礎(chǔ)(二)編寫Qt多窗口程序
Qt中Ui文件的使用總結(jié)
Qt 5——對話框QDialog
QDialog的accept()函數(shù)和reject()函數(shù)
Qt - QDialog,QWidget實現(xiàn)模態(tài)及非模態(tài)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服