最简单的Qt对话框
Simplest Qt Dialog
我有一个C++函数,用于检查蓝牙是否已激活。我想显示一个简单的对话框,告诉用户激活蓝牙并重试。由于我有一个QML接口,这可以通过C++或QML来完成。
您可以使用内置的信息消息框:
#include <QApplication>
#include <QDebug>
#include <QMessageBox>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QMessageBox::information(0, "Try Again", "Please try to activate your Bluetooth again.");
}
Qt组件有一些开箱即用的对话框:http://doc.qt.nokia.com/qt-components-symbian-1.0/qml-querydialog.html
相关文章:
- Qt为所有对话框设置通用背景
- 如何抓取指向Qt中弹出对话框的指针,该对话框阻止了QTest中的UI线程
- Qt 忙处理对话框
- Qt从主窗口打开对话框
- 模型对话框移动到主窗口后面的Qt错误
- 用静态版本的QT编译时,文件对话框崩溃
- QT如何显示,请等待对话框,而插座正在等待响应
- Qt - 创建主窗口前的非模态对话框
- 异步显示 Qt 对话框
- 使两个QT对话框相互关闭
- QT-如何处理对话框的内存管理
- 在我关闭刚开始的孩子对话框并进入父母对话框之后,我的QT桌面应用程序不断崩溃
- 在Qt中创建类,其中QDialog内置特定对话框
- 在QT对话框上布置图像
- 如何从另一个线程关闭对话框?QT
- 注销侏儒会话时如何从Qt应用程序执行"confirm" gnome会话管理器的对话框(不使用QSessionManager)
- 无法更新 qt 对话框中的按钮
- 无法从对话框中关闭应用程序(Qt 应用程序)
- QT对话框窗口禁用ewerningOntonop会导致窗口关闭
- Link2019:调用对话框qt的未解析的外部符号