Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加 qrc 文件到VS工程文件 #4100

Closed
zhin2929 opened this issue Aug 20, 2023 · 7 comments
Closed

添加 qrc 文件到VS工程文件 #4100

zhin2929 opened this issue Aug 20, 2023 · 7 comments

Comments

@zhin2929
Copy link

你在什么场景下需要该功能?

创建qt项目时,通过add_files("src/res/res.qrc")添加 qrc 文件,生成 VS 工程文件后,能显示在VS IDE的文件夹里。
如图那个res.qrc文件,现在是不会添加到项目里的。
image

描述可能的解决方案

对待qrc文件就和ui文件一样处理应该可以。

描述你认为的候选方案

No response

其他信息

add_frameworks("QtNetwork")
target("qtTest")
    add_rules("qt.widgetapp", "qt.qrc")
    add_headerfiles("src/**.h")
    add_files("src/*.cpp")
    add_files("src/**.h")
    add_files("src/ui/*.ui")
    add_files("src/res/res.qrc")
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Add qrc file to VS project file

In what scenario do you need this function?

When creating a qt project, add the qrc file through add_files("src/res/res.qrc"), and after generating the VS project file, it can be displayed in the VS IDE folder.
The res.qrc file shown in the picture will not be added to the project now.
image

describe possible solutions

It should be possible to treat the qrc file the same as the ui file.

Describe what you think is a candidate

No response

other information

add_frameworks("QtNetwork")
target("qtTest")
    add_rules("qt.widgetapp", "qt.qrc")
    add_headerfiles("src/**.h")
    add_files("src/*.cpp")
    add_files("src/**.h")
    add_files("src/ui/*.ui")
    add_files("src/res/res.qrc")

@waruqi
Copy link
Member

waruqi commented Aug 20, 2023

用 add_headerfiles 加一下 qrc 就能显示了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Use add_headerfiles to add qrc to display

@zhin2929
Copy link
Author

用 add_headerfiles 加一下 qrc 就能显示了

OK,那没问题了。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Use add_headerfiles to add qrc to display

OK, that's fine.

@waruqi
Copy link
Member

waruqi commented Aug 21, 2023

extrafiles 分支,我加了个接口,也可以试试 add_extrafiles #2384 (comment)

@waruqi waruqi added this to the v2.8.2 milestone Aug 21, 2023
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Extrafiles branch, I added an interface, you can also try add_extrafiles #2384 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants