zhuizhu 7 сар өмнө
parent
commit
8d426f2326
1 өөрчлөгдсөн 4 нэмэгдсэн , 0 устгасан
  1. 4 0
      MainPanel.cpp

+ 4 - 0
MainPanel.cpp

@@ -742,8 +742,11 @@ void MainPanel::onChatButtonClicked()
 
             chatView->setParent(m_chatFrame);
             m_chatFrame->setCentralWidget(chatView);
+            chatView->show();
             m_chatFrame->resize(380, 540);
             m_chatFrame->show();
+            m_chatFrame->raise();
+            m_chatFrame->activateWindow();
             connect(m_chatFrame, &QObject::destroyed, this, [this]() { m_chatFrame = nullptr; });
             if (m_chatButton) m_chatButton->setText(tr("隐藏聊天"));
             return; // 结束推流分支处理
@@ -754,6 +757,7 @@ void MainPanel::onChatButtonClicked()
                 if (m_chatFrame->centralWidget() != chatView)
                     m_chatFrame->setCentralWidget(chatView);
             }
+            chatView->show();
             if (m_chatFrame->isVisible()) {
                 m_chatFrame->hide();
                 if (m_chatButton) m_chatButton->setText(tr("显示聊天"));