Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Include Header xxxxx.h is not used directly
Forum Updated to NodeBB v4.3 + New Features

Include Header xxxxx.h is not used directly

Scheduled Pinned Locked Moved Unsolved General and Desktop
c++
15 Posts 6 Posters 19.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Imman_Manny

    @andr

    80bccd72-bd27-4103-b754-e3e64d7af212-image.png
    Kindly help bro .....

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #6

    @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.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    I 1 Reply Last reply
    3
    • jsulmJ jsulm

      @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.

      I Offline
      I Offline
      Imman_Manny
      wrote on last edited by
      #7

      @jsulm 021df4c2-ca34-4475-a17e-8e00e28bc600-image.png

      I changed the Header name still error remains .

      JonBJ 1 Reply Last reply
      0
      • I Imman_Manny

        @andr

        80bccd72-bd27-4103-b754-e3e64d7af212-image.png
        Kindly help bro .....

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #8

        @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 a system.h named file and possibly a system 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?

        1 Reply Last reply
        0
        • I Imman_Manny

          @jsulm 021df4c2-ca34-4475-a17e-8e00e28bc600-image.png

          I changed the Header name still error remains .

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #9

          @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?

          I 1 Reply Last reply
          0
          • JonBJ JonB

            @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?

            I Offline
            I Offline
            Imman_Manny
            wrote on last edited by
            #10

            @JonB its remove the Include LoL. really dont have clue .Help
            66841996-e09d-4b04-9f96-1a64506a1853-image.png

            JonBJ 1 Reply Last reply
            0
            • I Imman_Manny

              @JonB its remove the Include LoL. really dont have clue .Help
              66841996-e09d-4b04-9f96-1a64506a1853-image.png

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #11

              @Imman_Manny
              Now class system is undefined. Presumably it is declared in onesystem.h? Put the #include "onesystem.h" back in, and if the IDE still complains ignore it. Try compiling your code and verify that works.

              I 1 Reply Last reply
              0
              • JonBJ JonB

                @Imman_Manny
                Now class system is undefined. Presumably it is declared in onesystem.h? Put the #include "onesystem.h" back in, and if the IDE still complains ignore it. Try compiling your code and verify that works.

                I Offline
                I Offline
                Imman_Manny
                wrote on last edited by
                #12

                @JonB

                Bro .. actually i need your help for another Task

                1. I have multiple qml file (converted from svg Drawing )
                2. I want to list like grid view but its in different size .
                3. And If OnDoubleclicked it should be fit to the screen.

                Please give me some tips to try.

                JonBJ 1 Reply Last reply
                0
                • I Imman_Manny

                  @JonB

                  Bro .. actually i need your help for another Task

                  1. I have multiple qml file (converted from svg Drawing )
                  2. I want to list like grid view but its in different size .
                  3. And If OnDoubleclicked it should be fit to the screen.

                  Please give me some tips to try.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #13

                  @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.

                  1 Reply Last reply
                  0
                  • osirisgothraO Offline
                    osirisgothraO Offline
                    osirisgothra
                    wrote on last edited by
                    #14

                    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

                    I'm truly glad you r/offmychess t finally, but please don't go too far, because you r/beyondvoxels and that implies that u r/donewithlife. Oh well time to git back to the lab, because azure sea here, I have a lot of work to do...

                    Christian EhrlicherC 1 Reply Last reply
                    0
                    • osirisgothraO osirisgothra

                      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

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      @osirisgothra this is a last warning - stop reviving old posts.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved