7 ms·
wxWidgets seems to strike the best balance between documentation, activity, and having native widgets. It's also true that the API is weird, and some of the wr
by timw4mail 7y ago
wxWidgets seems to strike the best balance between documentation, activity, and having native widgets.
It's also true that the API is weird, and some of the wrapped native APIS are deprecated, or work weirdly with modern features.
Now if the qt branch for Linux was stable...
But really, C++ has so much choice compared to say, Rust.
- badsectoracula 7y agoYeah, of all the popular C++ tookits listed in the site, my personal "favorite" is wxWidgets (favorite in quotes because i do not really like it, it is just the one i found myself being more comfortable with). We're using Qt at my current job and while i'm ok with it, i still like working with wxWidgets more than Qt (even if Qt is certainly more polished). I found documentation fine with both toolkits, although i really like that wxWidgets's docs are in CHM format so i can quickly search and scan them locally with a handy tree of contents at the side. With Qt i have to use the online docs and searching goes through Google which slows things down (...there might be some offline docs at the Qt site to download, but i couldn't find it).
- slezyr 7y agoQt Assistant(Offline doc browser) comes with Qt. You can also use Zeal(supports offline docs for JS/HTML/CSS/TS/Vue/..., OpenGL, Qt, and many others)
- badsectoracula 7y agoIt does, but it doesn't contain the Qt documentation. It only has documentation for itself. It might be that something is missing, i just cannot figure out what.
- ahartmetz 7y agoYou are missing some documentation packages or they somehow went missing from the index. You can add them (.qch files) in the settings menu of Assistant.
- slezyr 7y agoLook for qt-doc as separate package in your distro. It's size 30Mb, so many distro split it into dedicated package.
- detaro 7y agoIf you install Qt through the installer (which would be the main way of getting it on Windows), your installation should have a "Docs" folder containing HTML files. Many Linux distros package it separately, e.g. on OpenSuSE it's in "libqt5-qtdoc" and its subpackages.
- badsectoracula 7y agoI didn't installed Qt myself, it is part of the repository (gamedev, we put everything in the repository :-P). Perhaps i'll try to install the same version of Qt somewhere separately and see if the docs are there.
- int_19h 7y agoI'm curious if it might make sense to port FCL (FreePascal / Lazarus take on VCL replacement) to C++.
- badsectoracula 7y agoNote that the Free Pascal/Lazarus equivalent to VCL is two libraries: FCL and LCL, with the former being part and developed by the developers of Free Pascal and the latter being part and developed by the developers of Lazarus (while there is an overlap, they are two different projects with different teams). FCL is also used by other projects (e.g. FPGUI uses FCL but not LCL) and if you install just Free Pascal you only get FCL, not LCL. With that in mind and considering the context i guess you meant LCL. Now, LCL would be very hard to port to C++ because it is really built around Object Pascal features like a rich RTTI with explicitly exported properties, component streaming, "default" accessors, enums, sets, object instance method pointers and other features that C++ does not support at a language level. In C++ Builder the VCL is written in Object Pascal (and it even includes a Pascal compiler and linker), the language has been extended considerably to support Object Pascal-isms (e.g. __published section in classes, __property declarations, __fastcall calling convention that is Delphi-compatible, __delegate types for pointers to object instance methods, etc) and the runtime and library are written with some internal representation in mind (e.g. Pascal sets and strings are exposed to C++ using classes that have the same memory layout as the values the Pascal compiler creates). Of course some of those could be avoided if you do not care about a 1-to-1 port of FCL/LCL and compatibility with it, but still a lot of the functionality comes out of core Object Pascal features (since Borland had full control of the language, they designed both the language and API to complement each other, which is why it feels so weird in C++ Builder). Beyond that, you'd really need an IDE with a visual designer like Lazarus as the entire API is designed to be manipulated in a visual way (e.g. while LCL does provide Qt/Gtk/Java/etc layout managers, they are really an afterthought in case you really want them and layout is mainly handled via anchors which have a dedicated visual editor - similarly the API uses a lot of custom collections that are meant to be edited with collection-specific editors in the IDE). You could use Lazarus for that, but since Lazarus is meant to work with Free Pascal and does a lot of parsing (it essentially keeps the entire codebase, including all units and libraries as parsed nodes in memory) and automatic code editing (e.g. filling in the handler methods when you double click an event handler - or a component which fills the default event handler, navigating around the code, refactoring, removing empty handler methods, etc) you'll need to teach it enough C++ to be similar to writing a C++ compiler. You could avoid the "porting to C++" part and using FCL/LCL directly from C++ in a similar way to what C++ Builder does... but then you'd need to convince some C++ compiler to include C++ Builder-like extensions and Free Pascal's developers to cooperate with said compiler's developers to ensure compatibility. You'd still need the Lazarus-needs-to-learn-C++ par though. You could avoid all the above by making an "LCL inspired" (really, VCL inspired) library which vaguely resembles LCL for those who already know it but sticks with C++'s strengths. It wont be LCL/VCL though and wont take advantage of Lazarus, at which point you might as well make something that avoids the warts that LCL/Lazarus has. Ah btw, did i mention the part where since LCL is essentially a cross-platform VCL reimplementation and VCL was designed only with Windows in mind, it has to implement a small subset of the Windows API for every platform and widgetset it supports? Yeah, are you sure you want to port that part too? Honestly i'd love to see C++ Builder-like support in Lazarus and LCL, but practically i think it would be easier to make a new C++ Builder-like tool from scratch than make Lazarus, LCL, Clang (or GCC) and Free Pascal work together - even if we ignore the social/political side of convincing the developers behind those projects to work with the other projects.