hide/show widgets live?

Changing param range in DSP code, based on your module’s state, will always be a bad idea. Instead, change how the value is scaled by DSP, and optionally override ParamQuantity methods to change the param display value based on the module state (if the module is non-NULL).

is this the correct way to override ParamQuantity?

struct QRangeParamQuantity : MyPlugins::engine::MyPluginsParamQuantity {
	std::string getDisplayValueString() override {
		MyModule *pModule = dynamic_cast<MyModule *>(this->module);
		if (pModule == NULL) {
			return "";
		}

		float value = getSmoothValue();
		value = std::log2(pModule->mMinQ) + value * pModule->mMinMaxRangeQ;
		value = std::pow(2.0f, value);
		return formatFloat(value);
	};
	void setDisplayValueString(std::string s) override {
		MyModule *pModule = dynamic_cast<MyModule *>(this->module);
		if (pModule == NULL) {
			return;
		}

		try {
			float value = std::stof(s);
			if (value > 0.0f) {
				value = std::log(value) / std::log(2.0f);
				value = (value - std::log2(pModule->mMinQ)) / pModule->mMinMaxRangeQ;
				setValue(value);
			} else {
				setValue(0.0f);
			}
		} catch (std::exception &e) {
			setValue(0.0f);
		}
	};
};