rewrote debug message handler
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "debugdialog.h"
|
||||
|
||||
#include <QTextEdit>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
DebugDialog* debug_dialog = NULL;
|
||||
|
||||
DebugDialog::DebugDialog(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle("Debug Log");
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
||||
textEdit = new QTextEdit();
|
||||
layout->addWidget(textEdit);
|
||||
}
|
||||
|
||||
void DebugDialog::update_log() {
|
||||
textEdit->setHtml(get_debug_str());
|
||||
}
|
||||
|
||||
void DebugDialog::showEvent(QShowEvent *) {
|
||||
update_log();
|
||||
}
|
||||
Reference in New Issue
Block a user