Hi,

I have background in Java and I am slowly trying to learn Qt.

I would like to understand the Qt's equivalent of Java's packages.

I know that namespaces are the closest to Java's packages, but I would like to
see a concrete example, for instance, how would I express the code below in Qt:

Qt Code:
  1. //File my/first/package/MyFirstClass.java
  2. package my.first.package;
  3.  
  4. class MyFirstClass {}
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //File my/second/package/MySecondClass.java
  2. package my.second.package;
  3.  
  4. class MySecondClass {}
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //File my/main/package/MyMainClass.java
  2. package my.main.package;
  3.  
  4. import my.first.package.MyFirstClass;
  5. import my.second.package.MySecondClass;
  6.  
  7. class MyMainClass {
  8. //Use MyFirstClass and MySecondClass here
  9. MyFirstClass myFirst = new MyFirstClass();
  10. MySecondClass mySecond = new MySecondClass;
  11. }
To copy to clipboard, switch view to plain text mode 

I would like to see how the corresponding Qt headers and classes are stored in the
directories on the disk, from which they are included.

If someone could provide my with an example of this, I would be very thankfull.

Thank you in advance!

Kind Regards,
Veroslav