-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9, 6.10
The following code shows the problem:
int main(int argc, char **argv) { QApplication app(argc, argv); QWidget w; auto lay = new QHBoxLayout(&w); lay->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding)); QPushButton pb1("Push me please!"); QPushButton pb2(QIcon::fromTheme(QIcon::ThemeIcon::DocumentNew), "Push me please!"); QPushButton pb3("Push me please!"); QMenu* menu = new QMenu(&pb3); menu->addAction("Action 12345678901234567890"); pb3.setMenu(menu); QPushButton pb4(QIcon::fromTheme(QIcon::ThemeIcon::DocumentNew), "Push me please!"); menu = new QMenu(&pb4); menu->addAction("Action 12345678901234567890"); pb4.setMenu(menu); lay->addWidget(&pb1); lay->addWidget(&pb2);lay->addWidget(&pb3);lay->addWidget(&pb4); lay->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding)); w.show(); return app.exec(); }
Output:
A 'Split Button' is mimiced but we can't handle this (we would need different hover states for the text and the dropdown, it's a QToolButton feature) so we should use 'Dropdown' instead which has no separator. Also the dropdown icon is wrong (must be ChevronDownMed) and the whole geometry does not match wrt the horizontal margins.
Fixed:
One could argue that the height does still not match but this would break the height wrt to other widgets so leave it for now
- relates to
-
QTBUG-140148 Windows11Style: adjust the QToolButton geometry
-
- Reported
-
For Gerrit Dashboard: QTBUG-140145 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
675593,4 | Windows11Style: adjust QPushButton geometry | dev | qt/qtbase | Status: NEW | 0 | 0 |