Skip to content

Qt5 C++:QCheckBox does not display checkbox #347

@bigbang95

Description

@bigbang95

Describe Your Environment

[Versions from your environment]

  • QDarkStyle: v.3.2.3
  • OS: Win10 19045
  • Qt: 5.15.2
  • VS2019 msvc

Language

C++

What is the problem?

As shown in the following figure, for the light and dark theme, the QCheckBox control does not display the checkbox on the left square

normal:
2024-03-08_092150

problem:
2024-03-08_092246
2024-03-08_092333

QDarkStyle installation steps

  1. code:
	QFile f("qdarkstyle/light/lightstyle.qss");

	if (!f.exists()) {
		QMessageBox::warning(this, "", "Unable to set stylesheet, file not found\n");
	}
	else {
		f.open(QFile::ReadOnly | QFile::Text);
		QTextStream ts(&f);
		qApp->setStyleSheet(ts.readAll());
	}
  1. Copy qdarkstyle to the program root directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions