Skip to content

Commit

Permalink
修复TAB聚焦问题,修复右键菜单选中高亮,支持在关于里直接打开链接。
Browse files Browse the repository at this point in the history
  • Loading branch information
CHN-STUDENT authored Dec 19, 2017
1 parent 46f3119 commit e13dc52
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 37 deletions.
7 changes: 5 additions & 2 deletions srun-3k-ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void MainWindow::Start(void)
AdvancedButton->setStyleSheet("QPushButton {border-image: url(:/titleButtons/advanced);}"
"QPushButton:hover {border-image: url(:/titleButtons/advanced_hover);}"
"QPushButton:pressed {border-image: url(:/titleButtons/advanced_pressed);}");
connect(ui->About_show, SIGNAL(anchorClicked(const QUrl&)),this, SLOT(anchorClickedSlot(const QUrl&)));
AboutButton->hide();//在获取公告前隐藏这两个按钮
AdvancedButton->hide();
QString serverconfig=QCoreApplication::applicationDirPath()+"/server.json";
Expand Down Expand Up @@ -257,8 +258,6 @@ void MainWindow::GET_INFO_Finished(QNetworkReply *reply)
{//如果检测不在线
state=0;
ui->stackedWidget->setCurrentIndex(2);
setTabOrder(ui->NAME_INPUT,ui->PASSWD_INPUT);
setTabOrder(ui->PASSWD_INPUT,ui->NAME_INPUT);
if(ui->AUTO_LOGIN->isChecked())
{
QTimer::singleShot(3000,[this](){ui->LoginButton->click();});
Expand Down Expand Up @@ -779,3 +778,7 @@ void MainWindow::on_ShowServerMessage_clicked()
ui->stackedWidget->setCurrentIndex(1);
}

void MainWindow::anchorClickedSlot(const QUrl &url)
{
QDesktopServices::openUrl(url);
}
2 changes: 1 addition & 1 deletion srun-3k-ui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private slots:
// void GET_ACID_Finished(QNetworkReply*);

void GET_INFO_Finished(QNetworkReply*);

void anchorClickedSlot(const QUrl &);
void TimeSlot();
// void AutoJumpTimeSlot();
void on_LogoutButton_clicked();
Expand Down
Loading

0 comments on commit e13dc52

Please sign in to comment.