mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
add profiler gui
This commit is contained in:
parent
a056a68e5b
commit
3d2ed40f54
@ -38,3 +38,4 @@ endif(UNIX)
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(sample)
|
add_subdirectory(sample)
|
||||||
add_subdirectory(reader)
|
add_subdirectory(reader)
|
||||||
|
add_subdirectory(profiler_gui)
|
||||||
|
10
profiler_gui/CMakeLists.txt
Normal file
10
profiler_gui/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
|
||||||
|
|
||||||
|
project(profiler_gui)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
add_executable(${PROJECT_NAME} main.cpp)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
18
profiler_gui/main.cpp
Normal file
18
profiler_gui/main.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include <QApplication>
|
||||||
|
#include <QTreeView>
|
||||||
|
#include <QFileSystemModel>
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
|
||||||
|
QFileSystemModel *model = new QFileSystemModel;
|
||||||
|
model->setRootPath(QDir::currentPath());
|
||||||
|
QTreeView *tree = new QTreeView();
|
||||||
|
tree->setModel(model);
|
||||||
|
|
||||||
|
tree->show();
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user