Add a button to Topbar to call out WarningMessage above mainwindow , make the WarningMEssagewidget be popup widget.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "models/User.h"
|
||||
#include "appvals/AppGlobalValues.h"
|
||||
#include "components/UTextEdit.h"
|
||||
#include "components/WarningMessageWidget.h"
|
||||
#include "json/jsonobject.h"
|
||||
|
||||
|
||||
@@ -130,7 +131,14 @@ void MainWindow::initializeLayout()
|
||||
auto layout = new QVBoxLayout(mUI->mCentralWidget);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
QWidget* topBarWidget = new TopBarWidget(this);
|
||||
TopBarWidget* topBarWidget = new TopBarWidget(this);
|
||||
auto popNotifications = new WarningMessageWidget(this);
|
||||
popNotifications->hide();
|
||||
connect(topBarWidget,&TopBarWidget::warnBtnClicked,[=](){
|
||||
auto pos = topBarWidget->mapToGlobal(QPoint(topBarWidget->width(),topBarWidget->height()));
|
||||
popNotifications->setPopupArgs(height(),pos.x(),pos.y());
|
||||
popNotifications->show();
|
||||
});
|
||||
layout->addWidget(topBarWidget);
|
||||
layout->addWidget(mTabWidget);
|
||||
layout->addWidget(mInitializWidget);
|
||||
|
||||
Reference in New Issue
Block a user