Creating a tabbed, tree-view text-editor using Qt
-
[quote author="AlecTaylor" date="1293191717"]I downloaded the 2nd edition and am scanning through it as we speak, if it has enough useful things, I'll purchase it.[/quote]
I have read it through it was really useful, but keep in mind (as it is mentioned "here":http://developer.qt.nokia.com/wiki/Books_and_Links_for_learning_C_and_advanced_topics too) it was written for 4.3 and it is a bit outdated (not too much, so it is still very good for learning)
-
I do want Syntax Highlighting, but I thought writing that myself would be best. - Also, not including it in my text-editor version, only in my IDE version.
If that's the case, then what's a good tutorial/book for learning how to create text-editors with Qt?
-
[quote author="AlecTaylor" date="1293195803"]I do want Syntax Highlighting, but I thought writing that myself would be best. - Also, not including it in my text-editor version, only in my IDE version.[/quote]
Qt use Scintilla based highlighter which is really good. I am not sure it is worth to write a new one (except want to have something different from the current mainstream solutions)
-
Okay, well I like the colour scheme used in Notepad2, which I plan to steal for my own rendition, however I also plan to add a new colour which will highlight user made/included classes.
-
[quote author="AlecTaylor" date="1293191717"]
Current list;
[...]- QTreeWidget
[...] - QTreeView
- QDirModel[/quote]
You shouldn't use "QDirModel":http://doc.qt.nokia.com/4.7/qdirmodel.html (it's obsolete) - you should use "QFileSystemModel":http://doc.qt.nokia.com/4.7/qfilesystemmodel.html instead. Also you've put down QTreeView and QTreeWidget. You probably won't need them both. Read more about "model/view concept":http://doc.qt.nokia.com/4.7/model-view-programming.html in Qt.
- QTreeWidget
-
When should QML be used, and why isn't my project a good platform for QML?
Updated list;
- QTextStream
- QTextEdit
- QTreeWidget
- QTabBar ⊕ CLTab
- QDockWidget
- QTreeView
- QFileSystemModel
- QTreeWidget
-
[quote author="AlecTaylor" date="1293201122"]When should QML be used, and why isn't my project a good platform for QML?
Updated list;
- QTextStream
- QTextEdit
- QTreeWidget
- QTabBar ⊕ CLTab
- QDockWidget
- QTreeView
- QFileSystemModel
- QTreeWidget[/quote]
In the link of your first thread,
here : http://doc.qt.nokia.com/latest/gettingstartedqml.htmlThere is one topic ,extending QML code using C++ , means you can add and take the advantage of C++ feature in QML code.
-
[quote author="AlecTaylor" date="1293201122"]Updated list;
[...]
- QTreeWidget
[...] - QTreeView
[...][/quote]
As maciek wrote above, these two are usually not required together as they provide almost the same functionality, but you can use your own model with QTreeView. As you want to use it for directory listing from which you can easily create a model I beleive QTreeView is better for you
- QTreeWidget
-
As VCsala say you can use QScintilla for syntax highlight, it is very good convenient tool for text-editor creation. You can know more "here":http://www.riverbankcomputing.co.uk/static/Docs/QScintilla2/index.html
-
Thanks, I'll see what I can put together.
I've already got the base application working; just need to add my custom features. I've followed your suggestion and am using QScintilla2 instead of TextEdit.
Please continue to help me gain the information necessary to complete this project.
Best regards,
Alec Taylor
BTW: The latest thread is — http://developer.qt.nokia.com/forums/viewthread/2924/
-
As the new thread is the continuation of this one, it will be closed now.