I am working on stylesheet of a QWizard
and I would like to remove the horizontal line just above the push buttons:
I have tried to recursively browse all the widgets and set their border to none, but no widget seems to have this border.
Here is my code (the complete buildable example can be found here):
licensewizard.h
#ifndef LICENSEWIZARD_H
#define LICENSEWIZARD_H
#include <QWizard>
class LicenseWizard : public QWizard
{
Q_OBJECT
public:
enum
{
Page_Welcome
};
LicenseWizard(QWidget *parent = 0);
};
class WelcomePage : public QWizardPage
{
Q_OBJECT
public:
WelcomePage(QWidget *parent = 0);
};
#endif
licensewizard.cpp
#include <QtWidgets>
#include "licensewizard.h"
#include <QtDebug>
LicenseWizard::LicenseWizard(QWidget *parent)
: QWizard(parent)
{
setPage(Page_Welcome, new WelcomePage);
setStartId(Page_Welcome);
setWizardStyle(ModernStyle);
setWindowTitle(tr("License Wizard"));
for (auto *widget : this->findChildren<QWidget *>())
{
widget->setStyleSheet("background:none; border:none; margin:0; padding:0;");
}
}
WelcomePage::WelcomePage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Welcome"));
}
Is it possible and how?