[Interest] Using a QAbstractScrollArea
kshegunov at gmail.com
Sat Mar 23 01:24:02 CET 2019
On Sat, Mar 23, 2019 at 1:30 AM Bob Hood <bhood2 at comcast.net> wrote:
> 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).
Oh, then I'd go up through the hierarchy - QFrame being a prime candidate
for a placeholder. The designer needs only instantiate it and (sometimes)
set the properties to it - the ones that come from the .ui that is. So
whatever widget it is, QWidget is always going to work, the downside is
you're not going to be able to edit the properties directly from the
QAbstractScrollArea just seems like an odd base class to use, unless
> there's a design reason I'm missing (which is entirely possible).
I guess, but I wouldn't derive from the control for no good reason, if it
already works fine as an abstract scroll area I mean. Granted, it seems
like an odd choice of a base class, but then again, that's why the class is
abstract to begin with.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest