我正在使用以下代码在我的应用程序中显示消息对话框:
MessageDialog dialog = new MessageDialog(null,
DialogFlags.Modal,
MessageType.Error,
ButtonsType.Ok,
"An error occured: " );
dialog.Run();
问题是窗口上的“确定”按钮没有做任何事情......只有当我点击右上角的X按钮时,窗口才会消失。
有什么想法吗?
答案 0 :(得分:6)
您需要在致电dialog.Destroy();
dialog.Run();
答案 1 :(得分:1)
您还可以挂钩
I/qtVlmApp(22971): onCreate qtVlmApp
D/ACRA (22971): ACRA is enabled for org.meltemus.qtvlm, initializing...
D/ACRA (22971): Using default Mail Report Fields
W/ACRA (22971): org.meltemus.qtvlm reports will be sent by email (if accepted by user).
D/ACRA (22971): Looking for error files in /data/data/org.meltemus.qtvlm/files
I/Qt (22971): qt start
I/QtPositioning(22971): Positioning start
.....
.....
F/libc (22971): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xb9ce2008 in tid 7981 (Thread (pooled))
事件以获得点击按钮的通知:
Response