2016-09-20 6 views

答えて

0

私はすべてQWindowを繰り返し実行し、isExposed() == trueで複数のチェックを行っていると、ネイティブMacダイアログ([名前を付けて保存]、[印刷]、および[ファイルを開く])を除く)を処理しています。だから私のニーズには十分だと思われます。

bool found_exposed_window = false; 
    foreach (QWindow *window, qApp->allWindows()) { 
    if (window->isExposed()) { 
     if (found_exposed_window) { 
     // This is the second exposed window, meaning the user has something 
     // open in addition to the main form. 
     // So, don't try to load a file. 
     return; 
     } 

     found_exposed_window = true; 
    } 
    } 
関連する問題