Linked Questions

Popular Questions

QT Custom Layout Example For Overlappig Widgets Doesn't Compile

Asked by At

Using QT 5.11, I am attempting to overlap a series of widgets. Using Google, I found this, which references Layout Management. I've copied the source code, but it doesn't compile. The problem is that the header file attempts to initialize QLayout with 3 different signatures, none of which exist.

CardLayout(QWidget *parent, int dist): QLayout(parent, 0, dist) {}
CardLayout(QLayout *parent, int dist): QLayout(parent, dist) {}
CardLayout(int dist): QLayout(dist) {}

None of these signatures appear in either the 4.8 or 5.12 documentation for QLayout, and I have been unable to find any reference to this usage. What am I missing?

Related Questions