Limited log window size
parent
c5fbe764a6
commit
6a23b6a4ae
|
@ -46,6 +46,11 @@ void NeuroUI::on_runButton_clicked()
|
|||
|
||||
void NeuroUI::logMessage(const QString &logMessage)
|
||||
{
|
||||
if (ui->logView->count() == static_cast<int>(m_logSize))
|
||||
{
|
||||
delete ui->logView->item(0);
|
||||
}
|
||||
|
||||
ui->logView->addItem(logMessage);
|
||||
ui->logView->scrollToBottom();
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ class NeuroUI : public QMainWindow
|
|||
|
||||
private:
|
||||
std::unique_ptr<NetLearner> m_netLearner;
|
||||
size_t m_logSize = 128;
|
||||
|
||||
public:
|
||||
explicit NeuroUI(QWidget *parent = 0);
|
||||
|
|
Loading…
Reference in New Issue