-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f50f132
commit aabbca8
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# ListView | ||
|
||
Shows how to create a list view with QListView. | ||
|
||
## Sources | ||
|
||
[src/ListView.h](src/ListView.h) | ||
|
||
[src/ListView.cpp](src/ListView.cpp) | ||
|
||
[CMakeLists.txt](CMakeLists.txt) | ||
|
||
## Output | ||
|
||
 | ||
|
||
## Generate and build | ||
|
||
### Qt Creator | ||
|
||
To build these projects, open `ListView.pro` file with Qt Creator. | ||
|
||
### CMake | ||
|
||
To build this project, open "Terminal" and type following lines: | ||
|
||
Set `CMAKE_PREFIX_PATH` with Qt6 install path. | ||
|
||
#### Windows : | ||
|
||
``` cmake | ||
mkdir build | ||
cd build | ||
cmake .. | ||
start ./ListView.sln | ||
``` | ||
|
||
#### macOS : | ||
|
||
``` cmake | ||
mkdir build | ||
cd build | ||
cmake .. -G "Xcode" | ||
open ./ListView.xcodeproj | ||
``` | ||
|
||
#### Linux with Code::Blocks : | ||
|
||
``` cmake | ||
mkdir build | ||
cd build | ||
cmake .. -G "CodeBlocks - Unix Makefiles" | ||
xdg-open ./ListView.cbp > /dev/null 2>&1 | ||
``` | ||
|
||
#### Linux : | ||
|
||
``` cmake | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . --config Debug | ||
./ListView | ||
``` |