RCC with QT's meta object system.

50 views
Skip to first unread message

Daniel Moodie

unread,
Apr 25, 2016, 11:59:59 AM4/25/16
to Runtime-Compiled C++
Hi all,

I was wondering if anyone has taken a look at tackling using RCC with QT?

Currently I restrict myself to not using QT objects and instead using non-RCC QT proxy objects which generally convert QT signals to boost signals which are compatible with RCC.  However I'd be interested in cleaning up this solution.
I believe all that would be required is an additional macro that RCC can pick up to determine if a header file needs to be MOC'd, then have rcc run the QT MOC processor on the specified files, then just add the MOC'd file into the compile list.

Doug, could you provide any input from your end on what would be the best way of accomplishing this in RCC?

Doug Binks

unread,
Apr 25, 2016, 2:13:02 PM4/25/16
to Runtime-Compiled C++
I know very little about Qt unfortunately.

Looking at the documentation, the Qt Meta-Object Compiler has a command line tool, so this could be integrated, but there are apparently limitations on template classes not having signals and slots, so you wouldn't be able to use the Qt classes as RCC++ classes.

Wolfie Wolf

unread,
Jul 11, 2016, 4:06:30 PM7/11/16
to Runtime-Compiled C++
Hi Daniel,

I recently started looking at RCC and I also had the same question about using it with Qt; Doug was kind enough to direct me to your post.  I haven't looked into this in any detail whatsoever yet but I wondered if you had made any progress on this and if so would you be willing to share any results.  Also, if this is still of interest to you, perhaps we could collaborate and contribute back to the project.

Kind Regards

/W

Daniel Moodie

unread,
Aug 11, 2016, 11:16:46 AM8/11/16
to Runtime-Compiled C++
Hi Wolfie,

I haven't actually worked on this in hopes that verdigris will solve this problem for me. https://github.com/woboq/verdigris

The problem I've run into is that if I have a runtime modifiable class that is also a QObject, then it's difficult to swap the object in after a recompile.  Instead I've been using proxy objects that are shared across recompiles that interface to qt for me.
I've also built a MetaObject system that provides many of the niceties of Qt's object system; it's currently still a work in progress but it provides a very low barrier to entry to create complex runtime modifiable systems.
Reply all
Reply to author
Forward
0 new messages