#include <DApplication>
#include <DMainWindow>
#include <DWidgetUtil>
#include <DMessageManager>
#include <QPushButton>
#include <QVBoxLayout>
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
w.setMinimumSize(QSize(600, 200));
QPushButton *showMessageButton = new QPushButton("显示消息");
QObject::connect(showMessageButton, &QPushButton::clicked, [&w, messageManager]() {
QIcon icon;
QString message = "halo我是一条通知消息哇";
});
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(showMessageButton);
QWidget *widget = new QWidget();
widget->setLayout(layout);
w.setCentralWidget(widget);
w.show();
Dtk::Widget::moveToCenter(&w);
return a.exec();
}
The DMainWindow class provides a main application window.
Definition dmainwindow.h:20