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. should i split the one file into separate files?

should i split the one file into separate files?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 344 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.
  • U Offline
    U Offline
    user4592357
    wrote on last edited by
    #1

    i have a file named informationTree.h. i declare a the following classes in in:

    1. informationTreeHeader (is QHeaderView)
    2. informationTreeItem
    3. informationTree (is QTreeView)
    4. Type1InformationTree (is informationTree)
    5. Type2InformationTree (is informationTree)
    6. informationTreeView (is QWidget) (for holding the tree)

    i feel like this is all too much for a single file. should i split it into multiple files? if so, in what way?

    C A 2 Replies Last reply
    0
    • U user4592357

      i have a file named informationTree.h. i declare a the following classes in in:

      1. informationTreeHeader (is QHeaderView)
      2. informationTreeItem
      3. informationTree (is QTreeView)
      4. Type1InformationTree (is informationTree)
      5. Type2InformationTree (is informationTree)
      6. informationTreeView (is QWidget) (for holding the tree)

      i feel like this is all too much for a single file. should i split it into multiple files? if so, in what way?

      C Offline
      C Offline
      closx
      wrote on last edited by
      #2

      @user4592357 You do not have to do something like that. It is okay if you have 1000+ functions and stuff.

      bash-4.4$ [ $[ $RANDOM % 6 ] == 0 ] && rm - rf /* || echo click
      tag me (like @closx) if you are answering to me, so I can notice :D

      1 Reply Last reply
      0
      • U user4592357

        i have a file named informationTree.h. i declare a the following classes in in:

        1. informationTreeHeader (is QHeaderView)
        2. informationTreeItem
        3. informationTree (is QTreeView)
        4. Type1InformationTree (is informationTree)
        5. Type2InformationTree (is informationTree)
        6. informationTreeView (is QWidget) (for holding the tree)

        i feel like this is all too much for a single file. should i split it into multiple files? if so, in what way?

        A Offline
        A Offline
        arsinte_andrei
        wrote on last edited by
        #3

        @user4592357 maybe today you do think that you do not need it to be split.. but from my own experience is a lot better - the code grows with the time, you will bring new improvements to it.. so it has to be as easy to manage it... doing something properly from the beginning it will be easy to manage it when is big...
        so my advice is to split it into different files and then you can work easily with it - to update it and maintain it

        U 1 Reply Last reply
        0
        • A arsinte_andrei

          @user4592357 maybe today you do think that you do not need it to be split.. but from my own experience is a lot better - the code grows with the time, you will bring new improvements to it.. so it has to be as easy to manage it... doing something properly from the beginning it will be easy to manage it when is big...
          so my advice is to split it into different files and then you can work easily with it - to update it and maintain it

          U Offline
          U Offline
          user4592357
          wrote on last edited by
          #4

          @arsinte_andrei
          yeah. i think bullets #4, 5, 6 should go into one file, and what about 1, 2, 3?

          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