mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 00:35:27 +08:00
qt 6.6.0 clean
This commit is contained in:
20
tests/auto/tools/qt_cmake_create/testdata/qrc_project/CMakeLists.txt.expected
vendored
Normal file
20
tests/auto/tools/qt_cmake_create/testdata/qrc_project/CMakeLists.txt.expected
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(qrc_project LANGUAGES CXX)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core)
|
||||
qt_standard_project_setup()
|
||||
|
||||
qt_add_executable(qrc_project
|
||||
main.cpp
|
||||
)
|
||||
|
||||
qt_add_resources(qrc_project_resources test.qrc)
|
||||
target_sources(qrc_project
|
||||
PRIVATE
|
||||
${qrc_project_resources}
|
||||
)
|
||||
|
||||
target_link_libraries(qrc_project
|
||||
PRIVATE
|
||||
Qt::Core
|
||||
)
|
13
tests/auto/tools/qt_cmake_create/testdata/qrc_project/main.cpp
vendored
Normal file
13
tests/auto/tools/qt_cmake_create/testdata/qrc_project/main.cpp
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
QFile file(":/test.txt");
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
return 1;
|
||||
|
||||
QString data = QString::fromUtf8(file.readAll());
|
||||
qDebug() << data;
|
||||
return 0;
|
||||
}
|
5
tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.qrc
vendored
Normal file
5
tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.qrc
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>test.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
1
tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.txt
vendored
Normal file
1
tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
Now I have CMakeLists.txt. Thanks!
|
Reference in New Issue
Block a user