Qt does not see the icon
-

When I show main.cpp to my file path like this, it sees my icon.

When I show my file path this way, I don't see my icon.
what's the problem? -
Hi @ceydasimsekk, and welcome!
Are you certain that your icon is at that resource path? Run the following lines to check:
QDirIterator qrc(":", QDirIterator::Subdirectories); while(qrc.hasNext()) qDebug() << qrc.next();@JKSH Hi! Thank you

When I did as you said and typed my file path as seen in the picture above, I saw my icon.
But there are people who do it this way and get results. What could be the reason for this? -
Hi @ceydasimsekk, and welcome!
Are you certain that your icon is at that resource path? Run the following lines to check:
QDirIterator qrc(":", QDirIterator::Subdirectories); while(qrc.hasNext()) qDebug() << qrc.next(); -
Hi @ceydasimsekk, and welcome!
Are you certain that your icon is at that resource path? Run the following lines to check:
QDirIterator qrc(":", QDirIterator::Subdirectories); while(qrc.hasNext()) qDebug() << qrc.next();@JKSH Hi! Thank you

When I did as you said and typed my file path as seen in the picture above, I saw my icon.
But there are people who do it this way and get results. What could be the reason for this? -
@JKSH Hi! Thank you

When I did as you said and typed my file path as seen in the picture above, I saw my icon.
But there are people who do it this way and get results. What could be the reason for this?@ceydasimsekk said in Qt does not see the icon:
When I did as you said and typed my file path as seen in the picture above, I saw my icon.
Great!
But there are people who do it this way and get results. What could be the reason for this?
They placed their resources at a path that has the
/prefix, while you placed your resources at a path that has the/qt/qml/prefix. That's the only reason.And your resources are under the
/qt/qml/prefix because they are part of a QML module. This was introduced in Qt 6.5: https://www.qt.io/blog/whats-new-for-qml-modules-in-6.5 -
@ceydasimsekk said in Qt does not see the icon:
When I did as you said and typed my file path as seen in the picture above, I saw my icon.
Great!
But there are people who do it this way and get results. What could be the reason for this?
They placed their resources at a path that has the
/prefix, while you placed your resources at a path that has the/qt/qml/prefix. That's the only reason.And your resources are under the
/qt/qml/prefix because they are part of a QML module. This was introduced in Qt 6.5: https://www.qt.io/blog/whats-new-for-qml-modules-in-6.5@JKSH I understand, thank you very much. I'm new to Qt.
-
@JKSH I understand, thank you very much. I'm new to Qt.
@ceydasimsekk said in Qt does not see the icon:
@JKSH I understand, thank you very much. I'm new to Qt.
You're most welcome. And great choice! 😄
-
J JKSH has marked this topic as solved on