PDA

View Full Version : Hiding code from the user



Plixil
19th July 2010, 03:23
I've never used Qt. I want to make it so users can edit one particular GUI and its relevant code using Qt Creator without being allowed to see my code for the rest of the program. Is this possible?

aamer4yu
19th July 2010, 07:44
Why dont you ship the editable gui as a library / dll. You can give the user code only for that gui and he can edit and build it again.
You will need to provide some architecture in your design where you load the dll for the gui.

SixDegrees
19th July 2010, 10:03
Correct; either build everything using dynamic libraries, and ship only the libraries you don't want the user to have access to, or use Qt's plugin framework to load bits and pieces at runtime. Both approaches are essentially identical, but the plugin framework shields you from the details of dynamic linking somewhat.

Plixil
19th July 2010, 12:14
Both of those ideas sound great . DLLs scare the hell out of me and the plugin option sounds easier so I'll look into that. Thank you both very much :)

Edit: Which base class would you recommend I extend for their GUI?

aamer4yu
19th July 2010, 12:36
For GUI, QWidget is the base class...