質問

QTのモーダルダイアログが "Dialogexec" としてProSucousEventFlagsを設定してローカルQeventLoopを使用することに気づいた。

eventLoop.exec(QEventLoop::DialogExec);
.

QTアシスタントには、この列挙体についての情報はありません。EventLoopexecという別のものがあります。誰かが彼らが実際に意味するもの、そしてなぜ彼らが文書化されていないのかという理由は何ですか?

ありがとう

役に立ちましたか?

解決

I did some poking around and this is what I found:

  • This enum is intentionally omitted from the documentation, along with several other QEventLoop::ProcessEventsFlag enum values (X11ExcludeTimers, ExcludeUserInput, WaitForMore, EventLoopExec) as there is an \omitvalue in front of each one in the comments that generate the docs.

  • There is only one place in all of Qt that actually uses it, in qeventdispatcher_mac.mm in which it appears to be some kind of mac-specific optimization according to the in-line comments

The intentional omission of these values from the docs leads me to conclude that they're for internal Qt use only, and that you shouldn't need to use them or worry about them.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top