diff --git a/src/UserInterface/ViewItem/itemdelegate.cpp b/src/UserInterface/ViewItem/itemdelegate.cpp index ba41cc7..1615b37 100755 --- a/src/UserInterface/ViewItem/itemdelegate.cpp +++ b/src/UserInterface/ViewItem/itemdelegate.cpp @@ -242,7 +242,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->restore(); if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) { - QToolTip::showText(QCursor::pos(), "为了刷新"); + QToolTip::hideText(); int len = fm.boundingRect(appname).width(); //富文本,tooltip可自动换行 QString tipString = QString(""); @@ -252,7 +252,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, tipString += tr("path:") + url; } tipString += QString(""); - QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right() + 20, rect.center().y())), tipString); + QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right(), rect.center().y())), tipString); } } else { QRect iconRect = QRect(rect.left() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32); diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp index adbce44..61c8da2 100755 --- a/src/UserInterface/Widget/full_commonuse_widget.cpp +++ b/src/UserInterface/Widget/full_commonuse_widget.cpp @@ -133,6 +133,7 @@ void FullCommonUseWidget::initVerticalScrollBar() void FullCommonUseWidget::on_powerOffButton_clicked() { QProcess::startDetached(QString("ukui-session-tools")); + Q_EMIT sendHideMainWindowSignal(); } void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos) diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp index 6e95e13..d1a9f69 100755 --- a/src/UserInterface/Widget/full_function_widget.cpp +++ b/src/UserInterface/Widget/full_function_widget.cpp @@ -153,6 +153,7 @@ void FullFunctionWidget::initVerticalScrollBar() void FullFunctionWidget::on_powerOffButton_clicked() { QProcess::startDetached(QString("ukui-session-tools")); + Q_EMIT sendHideMainWindowSignal(); } void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos) diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp index 6bf48bb..7ffc770 100755 --- a/src/UserInterface/Widget/full_letter_widget.cpp +++ b/src/UserInterface/Widget/full_letter_widget.cpp @@ -148,6 +148,7 @@ void FullLetterWidget::initVerticalScrollBar() void FullLetterWidget::on_powerOffButton_clicked() { QProcess::startDetached(QString("ukui-session-tools")); + Q_EMIT sendHideMainWindowSignal(); } void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos) diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp index 344add3..5b54614 100755 --- a/src/UserInterface/Widget/full_searchresult_widget.cpp +++ b/src/UserInterface/Widget/full_searchresult_widget.cpp @@ -122,6 +122,7 @@ void FullSearchResultWidget::initVerticalScrollBar() void FullSearchResultWidget::on_powerOffButton_clicked() { QProcess::startDetached(QString("ukui-session-tools")); + Q_EMIT sendHideMainWindowSignal(); } void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos) diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp index 42a5e78..feb225a 100755 --- a/src/UserInterface/mainwindow.cpp +++ b/src/UserInterface/mainwindow.cpp @@ -1426,6 +1426,7 @@ void MainWindow::showNormalWindowSlot() void MainWindow::on_powerOffButton_clicked() { QProcess::startDetached(QString("ukui-session-tools")); + hideWindow(); } void MainWindow::on_powerOffButton_customContextMenuRequested(const QPoint &pos) {