Updated README.md with qt color example
This commit is contained in:
		
							
								
								
									
										15
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								README.md
									
									
									
									
									
								
							@@ -420,6 +420,21 @@ void replace_default_logger_example()
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					#### Log to Qt with nice colors
 | 
				
			||||||
 | 
					```c++
 | 
				
			||||||
 | 
					#include "spdlog/spdlog.h"
 | 
				
			||||||
 | 
					#include "spdlog/sinks/qt_sinks.h"
 | 
				
			||||||
 | 
					MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    setMinimumSize(640, 480);
 | 
				
			||||||
 | 
					    auto log_widget = new QTextEdit(this);
 | 
				
			||||||
 | 
					    setCentralWidget(log_widget);
 | 
				
			||||||
 | 
					    auto logger = spdlog::qt_color_logger_mt("qt_logger", log_widget);
 | 
				
			||||||
 | 
					    logger->info("Some info message");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
## Benchmarks
 | 
					## Benchmarks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user