Include Header xxxxx.h is not used directly
-
@Imman_Manny There is a system system.h header file. I guess QtCreator thinks you're including that one, but not using. You should avoid using names for header files which are already used for system header files.
-
@Imman_Manny
You show you have a Sources > Controllers > system.cpp file. Do you even have a Headers > Controllers > system.h file? Otherwise as @jsulm says you might be best avoiding asystem.h
named file and possibly asystem
class.While we are on this one of my bug-bears about code written here by beginners. The C++ "standard" is for class names to begin with an uppercase letter, and Qt observes that everywhere. Why people then choose to write classes with lowercase first character is quite beyond me, it goes against convention and makes code harder to read. I would not recommend "system" as a class name, but if you do why in the world don't you make it
System
? -
@Imman_Manny said in Include Header xxxxx.h is not used directly:
I changed the Header name still error remains .
Now that you have changed off it being named
system.h
. I am not sure what that IDE message is trying to tell you here. It says "fix available", if you click on that or try Alt+Enter or whatever it is that "applies" the suggested fix, what is it that the IDE changes in your code? -
@Imman_Manny
Now classsystem
is undefined. Presumably it is declared inonesystem.h
? Put the#include "onesystem.h"
back in, and if the IDE still complains ignore it. Try compiling your code and verify that works. -
Bro .. actually i need your help for another Task
- I have multiple qml file (converted from svg Drawing )
- I want to list like grid view but its in different size .
- And If OnDoubleclicked it should be fit to the screen.
Please give me some tips to try.
-
@Imman_Manny
Then ask a new question, presumably in the QML sub-forum. You don't want my help because I have never used QML. -
false positives for this are so common, it doesn't look like it actually will look past includes that include macros that refer to other symbols in the same subset, this was the case with ncurses, which (unfortunately) loves to declare function-macros (or 'funcros'). My ballpark is that they are expanding the macro, and the since the end result is technically not in the same file, but deeper in, it is missed altogether.
Funny how it fails the minute you remove the #include... its almost comical :p
-
@osirisgothra this is a last warning - stop reviving old posts.