// Double-clicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
- rpcConsole = new RPCConsole(this);
+ rpcConsole = new RPCConsole(0);
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
// Clicking on "Verify Message" in the address book sends you to the verify message tab
#ifdef Q_OS_MAC
delete appMenuBar;
#endif
+
+ delete rpcConsole;
}
void BitcoinGUI::createActions()
}
#endif
}
+ // close rpcConsole in case it was open to make some space for the shutdown window
+ rpcConsole->close();
+
QMainWindow::closeEvent(event);
}
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RPCConsole</class>
- <widget class="QDialog" name="RPCConsole">
+ <widget class="QWidget" name="RPCConsole">
<property name="geometry">
<rect>
<x>0</x>
}
RPCConsole::RPCConsole(QWidget *parent) :
- QDialog(parent, DIALOGWINDOWHINTS),
+ QWidget(parent),
ui(new Ui::RPCConsole),
historyPtr(0)
{
}
}
}
- return QDialog::eventFilter(obj, event);
+ return QWidget::eventFilter(obj, event);
}
void RPCConsole::setClientModel(ClientModel *model)
if (!clientModel)
return;
}
+
+void RPCConsole::keyPressEvent(QKeyEvent *event)
+{
+ if(windowType() != Qt::Widget && event->key() == Qt::Key_Escape)
+ {
+ close();
+ }
+}
\ No newline at end of file
#ifndef RPCCONSOLE_H
#define RPCCONSOLE_H
-#include <QDialog>
+#include <QWidget>
namespace Ui {
class RPCConsole;
class ClientModel;
/** Local Bitcoin RPC console. */
-class RPCConsole: public QDialog
+class RPCConsole: public QWidget
{
Q_OBJECT
protected:
virtual bool eventFilter(QObject* obj, QEvent *event);
+ void keyPressEvent(QKeyEvent *);
private slots:
void on_lineEdit_returnPressed();