diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-10-24 20:43:21 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-10-24 20:43:21 +0000 |
commit | feb359bb3b06f584838f880df35e9fbafef7c14f (patch) | |
tree | c3934aecc929871a78f8c1f9da80b1e0e387ea8a | |
parent | updated TODO und some refactoring (diff) | |
download | gpg4usb-feb359bb3b06f584838f880df35e9fbafef7c14f.tar.gz gpg4usb-feb359bb3b06f584838f880df35e9fbafef7c14f.zip |
newtab slot works again
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@996 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | mainwindow.cpp | 2 | ||||
-rw-r--r-- | textedit.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index abac5be..73cfb15 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -154,7 +154,7 @@ void MainWindow::createActions() newTabActShortcutList.append(QKeySequence (Qt::CTRL + Qt::Key_T)); newTabAct->setShortcuts(newTabActShortcutList); newTabAct->setToolTip(tr("Open a new file")); - connect(newTabAct, SIGNAL(triggered()), edit, SLOT(slotNewTab())); + connect(newTabAct, SIGNAL(triggered()), edit, SLOT(slotNewEditorPageTab())); openAct = new QAction(tr("&Open..."), this); openAct->setIcon(QIcon(":fileopen.png")); diff --git a/textedit.cpp b/textedit.cpp index 8753cd7..98d974f 100644 --- a/textedit.cpp +++ b/textedit.cpp @@ -38,8 +38,10 @@ TextEdit::TextEdit() connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(removeTab(int))); slotNewEditorPageTab(); setAcceptDrops(false); - QPushButton *newButton = new QPushButton("new",this); - tabWidget->setCornerWidget(newButton,Qt::TopRightCorner); + QPushButton *newButton = new QPushButton(QIcon(":button_plus.png"), ""); + tabWidget->setCornerWidget(newButton,Qt::TopLeftCorner); + connect(newButton, SIGNAL(clicked()), this, SLOT(slotNewEditorPageTab())); + } void TextEdit::slotNewEditorPageTab() |