diff options
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r-- | src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp index 15cfe047..812d3679 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp @@ -31,6 +31,7 @@ TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindo tabWidget->setTabsClosable(true); tabWidget->setMovable(true); tabWidget->setUsesScrollButtons(true); + tabWidget->setFocusPolicy(Qt::ClickFocus); this->layout()->addWidget(tabWidget); //Setup the animation ANIM = new QPropertyAnimation(this, "geometry", this); @@ -99,7 +100,7 @@ void TermWindow::OpenDirs(QStringList dirs){ page->setWhatsThis(ID); tabWidget->addTab(page, ID); tabWidget->setCurrentWidget(page); - page->setFocus(); + QTimer::singleShot(500, this, SLOT(focusOnWidget()));//page->setFocus(); qDebug() << "New Tab:" << ID << dirs[i]; connect(page, SIGNAL(ProcessClosed(QString)), this, SLOT(Close_Tab(QString)) ); } @@ -255,6 +256,7 @@ void TermWindow::Prev_Tab(){ void TermWindow::focusOnWidget(){ if(tabWidget->currentWidget()!=0){ + //qDebug() << "Focus on Widget"; tabWidget->currentWidget()->setFocus(); } } diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index 906252cf..7601ae9f 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -30,6 +30,7 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent) this->setOverwriteMode(true); this->setFocusPolicy(Qt::StrongFocus); this->setTabStopWidth( 8 * this->fontMetrics().width(" ") ); //8 character spaces per tab (UNIX standard) + this->setTabChangesFocus(false); //this->setWordWrapMode(QTextOption::NoWrap); this->setContextMenuPolicy(Qt::CustomContextMenu); resizeTimer = new QTimer(this); |