5 ms·
From my experience using Qt, the MOC wasn't a pain point for me. All the generations that I saw were very straightforward and I never had to mess with it. That
by yellow_lead 7y ago
From my experience using Qt, the MOC wasn't a pain point for me. All the generations that I saw were very straightforward and I never had to mess with it.
That's just my experience though, so I'd love to hear where people have found shortcomings.
Also, I am happy to see this project and may try it out nonetheless. Always happy to see work around Qt.
- arketyp 7y agoThe convenience of the MOC is its raison d'être. The minor pain point for me is practically being forced to use the Qt Creator IDE. I'm happy to see a possible best of both worlds solution like this.
- slavik81 7y agoWhy do you feel forced to use Qt Creator? I used Visual Studio for years, and these days I just use Vim. While Qt Creator is a great IDE, it has never felt necessary to me.
- likeliv 7y agoNo need to use Qt creator. Most C++ build systems support moc out of the box, or with minor adjustments.
- ailideex 7y agoI was trying to figure out how to do MOC from gnu make when I came across this, the only other option I saw was to run qmake and then run that generated makefile from my makefile. Of those two options verdigris seemed to be the better choice to me.
- marmaduke 7y agohttps://doc.qt.io/qt-5/moc.html#writing-make-rules-for-invoking-moc https://doc.qt.io/qt-5/moc.html#writing-make-rules-for-invok... Like that?
- ailideex 7y agoThanks, I guess I should have kept on looking.
- ahartmetz 7y agoCMake also has automoc built-in. You need to do next to nothing for moc support with CMake.
- ahartmetz 7y agoQt Creator doesn't even get involved in the build once it has started qmake - a qmake .pro[ject] file is nothing like a Visual Studio project file. You are supposed to make edits other than adding or removing source files by hand. So you really don't need Qt Creator for moc. Note that qmake is generally easiest for tiny programs such as bug reproducers. For anything nontrivial, it's better to use CMake. Most advanced functionality in qmake is undocumented and weird. Qt itself is moving to CMake with Qt 6.
- berkut 7y agoMost C++ build systems have support for moc generation - CMake even has CMAKE_AUTOMOC which can automatically do it for you with no further intervention with some caveats.
- tjoff 7y agoI've coded QT for a few years. Have never even opened the QT Creator IDE.
- cheez 7y agoI used to do this too but I started using the form designer and uic + uiloader and it was a nice boost to productivity for creating lame but necessary dialogs.
- bfrog 7y agoYeah, I've never personally used creator... with a decade of Qt usage
- ahartmetz 7y agoI know the author. The project is part tech demo for fun, part shut up the people who complain about moc. And no, moc isn't a pain point in practice.
- ailideex 7y agohttps://github.com/woboq/verdigris#who-uses-verdigris- https://github.com/woboq/verdigris#who-uses-verdigris-
- ahartmetz 7y agoI never said that it doesn't work. Okay, maybe tech demo sounds like it doesn't. It does work.
- ailideex 7y agohttps://en.wikipedia.org/wiki/Technology_demonstration https://en.wikipedia.org/wiki/Technology_demonstration > A technology demonstration or demonstrator model, informally known as a tech demo, is a prototype, rough example or an otherwise incomplete version of a conceivable product or future system, put together as proof of concept with the primary purpose of showcasing the possible applications, feasibility, performance and method of an idea for a new technology. Verdigris has been developed and maintained now for over 4 years. Not only does it work - it has unit tests, CI and issues are addressed by the maintainers. While verdigris does demonstrate that something is technically possible, so does Apache httpd - does not make Apache httpd a tech demo.
- ogoffart 7y agoIt started out as a tech demo. Then people started using it and reported bugs and features request. So support for MSVC was added, and version 1.0 was released. It is relatively low maintenance given that Qt maintain binary compatibility anyway (Qt 6 will be another story).
- 7y ago