[Interest] Using a QAbstractScrollArea
bhood2 at comcast.net
Sat Mar 23 00:30:27 CET 2019
On 3/22/2019 3:53 PM, Konstantin Shegunov wrote:
> On Fri, Mar 22, 2019 at 8:25 PM Bob Hood <bhood2 at comcast.net
> <mailto:bhood2 at comcast.net>> wrote:
> How do I use this as a concrete Qt class type? Do I inherit from
> and then somehow change my parent to it? Or do I have to inherit from the
> third-party class, and then recreate the entire QScrollArea interface so it
> "quacks" like a QScrollArea instance?
> What I usually do is to promote a placeholder that's as close to the custom
> widget as it can be. It's _probably_ going to work if you place a
> QScrollArea as placeholder and then promote it you your custom type (and
> don't modify its properties too heavily from the designer), but in case it
> doesn't you can always use a QWidget.
Hi back! :)
I actually tried this before posting. I placed a QScrollArea into Qt
Designer, and then promoted it to a custom class that inherits the from the
third-party class that inherits from QAbstractScrollArea. Designer didn't
complain, but when I tried to compile, the promoted class was missing the
setWidgetResizeable() method that QScrollArea provides (since Designer assumes
QScrollArea is the base class).
QAbstractScrollArea just seems like an odd base class to use, unless there's a
design reason I'm missing (which is entirely possible).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest