в классе
покажи
class UserSettings : public QDialog { private: explicit UserSettings(QWidget *parent = nullptr); ~UserSettings() = default; UserSettings(const UserSettings &) = delete; UserSettings &operator=(const UserSettings &) = delete; public: static UserSettings &getInstance() { static UserSettings instance; return instance; } public slots: void getProfileData(const QString &name, const QString &email, const QString &password); public: void initalizeGuiSettings(QTabWidget *m_tab) noexcept; private: QString m_name; QString m_email; QString m_password;
void UserSettings::getProfileData(const QString &name, const QString &email, const QString &password) { m_name = name; m_email = email; m_password = password; } void UserSettings::initalizeGuiSettings(QTabWidget *m_tab) noexcept { QWidget* profileWidget = new QWidget(); m_tab->addTab(profileWidget,"Profile"); nameLabel = new QLabel(tr("Username: ") + "" + m_name); emailLabel = new QLabel(tr("Email: ") + " " + m_email); passwordLabel = new QLabel(tr("Password: ") + " " + m_password); здесь еще такое есть)
Обсуждают сегодня