Skip to content

Commit 79b7ab6

Browse files
committed
rename project
1 parent 952bd27 commit 79b7ab6

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

Qt.Widgets/CommonControls/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ add_subdirectory(Label)
1212
add_subdirectory(LCDNumber)
1313
add_subdirectory(LineEdit)
1414
add_subdirectory(ListView)
15+
add_subdirectory(ListView2)
1516
add_subdirectory(ListWidget)
1617
add_subdirectory(PictureBox)
1718
add_subdirectory(PictureBox2)
@@ -23,5 +24,4 @@ add_subdirectory(SpinBox)
2324
add_subdirectory(SpinButton)
2425
add_subdirectory(ToggleButton)
2526
add_subdirectory(TreeView)
26-
add_subdirectory(TreeView2)
2727
add_subdirectory(Widget)

Qt.Widgets/CommonControls/CommonControls.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SUBDIRS = \
77
LCDNumber \
88
LineEdit \
99
ListView \
10+
ListView2 \
1011
ListWidget \
1112
PictureBox \
1213
PictureBox2 \
@@ -18,5 +19,4 @@ SUBDIRS = \
1819
SpinButton \
1920
ToggleButton \
2021
TreeView \
21-
TreeView2 \
2222
Widget \

Qt.Widgets/CommonControls/ListView/src/ListView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace Examples {
4141
QFrame frame;
4242
QVBoxLayout layout {&frame};
4343
QListView listView1;
44-
QStandardItemModel model;;
44+
QStandardItemModel model;
4545
QComboBox comboBoxMode;
4646
};
4747
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.1)
22

33
# Project
4-
project(TreeView2)
4+
project(ListView2)
55
find_package(Qt5Widgets CONFIG REQUIRED)
66

77
# Options
@@ -12,5 +12,5 @@ set(CMAKE_CXX_STANDARD 17)
1212
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1313

1414
# Application
15-
add_executable(TreeView2 WIN32 MACOSX_BUNDLE src/TreeView2.cpp src/TreeView2.h)
16-
target_link_libraries(TreeView2 Qt5::Widgets)
15+
add_executable(ListView2 WIN32 MACOSX_BUNDLE src/ListView2.cpp src/ListView2.h)
16+
target_link_libraries(ListView2 Qt5::Widgets)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG += c++17
2+
QT = widgets
3+
SOURCES = src/ListView2.cpp
4+
HEADERS = src/ListView2.h

Qt.Widgets/CommonControls/TreeView2/src/TreeView2.cpp renamed to Qt.Widgets/CommonControls/ListView2/src/ListView2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <QApplication>
2-
#include "TreeView2.h"
2+
#include "ListView2.h"
33

44
using namespace Examples;
55

Qt.Widgets/CommonControls/TreeView2/src/TreeView2.h renamed to Qt.Widgets/CommonControls/ListView2/src/ListView2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ namespace Examples {
4040
QFrame frame;
4141
QVBoxLayout layout {&frame};
4242
QTreeView treeView1;
43-
QStandardItemModel model;;
43+
QStandardItemModel model;
4444
};
4545
}

Qt.Widgets/CommonControls/TreeView/src/TreeView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ namespace Examples {
4343
QFrame frame;
4444
QVBoxLayout layout {&frame};
4545
QTreeView treeView1;
46-
QStandardItemModel model;;
46+
QStandardItemModel model;
4747
};
4848
}

Qt.Widgets/CommonControls/TreeView2/TreeView2.pro

-4
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ shows how to use Qt widgets only by programming code (c++17).
3737

3838
[ListView](Qt.Widgets/CommonControls/ListWidget) shows how to create a list view with QListView.
3939

40+
[ListView2](Qt.Widgets/CommonControls/ListView2) shows how to create a list view with QTreeView.
41+
4042
[ListWidget](Qt.Widgets/CommonControls/ListWidget) shows how to create a list widget with QListWidget.
4143

4244
[PictureBox](Qt.Widgets/CommonControls/PictureBox) shows how to create a picture box with QLabel.
@@ -59,8 +61,6 @@ shows how to use Qt widgets only by programming code (c++17).
5961

6062
[TreeView](Qt.Widgets/CommonControls/TreeView) shows how to create a three view with QTreeView.
6163

62-
[TreeView2](Qt.Widgets/CommonControls/TreeView2) shows how to create a list view with QTreeView.
63-
6464
[Widget](Qt.Widgets/CommonControls/ToggleButton) shows how to create a widget with QWidget.
6565

6666
## Containers

0 commit comments

Comments
 (0)