日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

利用Accepted信號(hào)判斷enterBtn是否被按下

 遇見云 2010-08-19
【摘要】
      這篇文檔主要是在qtcreator編程時(shí)碰到這條語句   if(my1.exec()==QDialog::Accepted) ,程序在D:\Qt\2010.04\qt\nGui里面;
【思路】
myl這個(gè)對(duì)象是在main.cpp文件中定義的:myDlg myl; //建立自己新建的類的對(duì)象myl;
 
Edit->Find/Replace->Adavanced  Find ->current Project   在里面進(jìn)行搜索myDlg;
在第三行的D:\Qt\2010.04\qt\nGui\mydlg.h下的第10行:class myDlg : public QDialog ;這表明這個(gè)myDlg是繼承QDialog這個(gè)類的;所有QDialog這個(gè)類的函數(shù)myDlg都可以拿來用;
welcome ->edit--->design--->debug---->projects--->help  進(jìn)入help,在look for 輸入QDialog;在下面找到這個(gè)函數(shù)exec();

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

void QDialog::accepted ()   [signal]//這是個(gè)信號(hào),本質(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.

 
 
 

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多