PDA

View Full Version : QTreeWidget



Kazuma
19th February 2011, 05:12
Hello, well i'm working on an IDE. It's simple, it haves line numbers, highlight, etc. The project main file have #include's which include all files to the project. But... How i can do a QTreeWidget that adds the #included files to the Tree? Only included.
I have no idea about this Widget. No examples, nothing. ;(

stampede
19th February 2011, 07:07
How i can do a QTreeWidget that adds the #included files to the Tree? Only included.
What's the problem exactly ? QTreeWidget is a class, include it by #include <QTreeWidget>.

I have no idea about this Widget. No examples, nothing
Then read documentation, there is an example of using QTreeWidget (http://doc.qt.nokia.com/latest/tools-settingseditor.html).

Kazuma
19th February 2011, 08:16
No, i meant the project file has the #include for the files to add.

Project file.ideproject
>Test1.prog
>Test2.prog

Let's taking that ideproject is the main file of the project and test1 & 2 are the programmed files.

squidge
19th February 2011, 09:58
The link stampede gave you is an example of QTreeWidget.

So just parse your "main file of the project", extract your required data and add them as child items to a parent which is the name of the "main file of the project".

Simples.