#include #include #include #include #include using namespace std; class LabelPair { public: LabelPair(QWidget* parent, int x, int y, int w, int h) { title.setParent(parent); value.setParent(&title); title.setGeometry(x, y, w, h); value.setGeometry(80, 0, w-80, h); title.show(); value.show(); } void setTitle(std::string text) { title.setText(text.c_str()); } void setValue(std::string text) { value.setText(text.c_str()); } QLabel title; QLabel value; }; class MainApp : public QWidget { Q_OBJECT public: MainApp(); void setMyLayout(); struct { std::shared_ptr weburl {}; } ui; struct { std::shared_ptr main; } layout; };