Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0
-
None
-
Windows 8.1 x64
Description
Try to run this code:
#include <QApplication> #include <QWidget> #include <QVBoxLayout> #include <QCheckBox> #include <QToolBar> int main(int argc, char *argv[]) { QApplication a(argc, argv); // Setup window layout QWidget widget; widget.setFixedWidth(50); QVBoxLayout layout; QCheckBox chkRtl("RTL interface"); QToolBar toolBar; widget.setLayout(&layout); layout.addWidget(&chkRtl); layout.addWidget(&toolBar); widget.show(); // Setup rtl checkbox QObject::connect(&chkRtl, &QCheckBox::stateChanged, [=](int state) { Qt::LayoutDirection dir = Qt::LeftToRight; if (state == Qt::Checked) dir = Qt::RightToLeft; QApplication::setLayoutDirection(dir); }); // Setup toolbar toolBar.addAction("New"); toolBar.addAction("Open"); toolBar.addAction("Close"); toolBar.addAction("Quit"); return a.exec(); }
You can switch between LTR and RTL interface mode using checkbox. Notice the extension (">>") button always pointing to the right side. Shouldn't it point to the left side in RTL interface mode?
Attachments
For Gerrit Dashboard: QTBUG-66344 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
219982,3 | QToolBar: Fix QToolbar extension button icon after LayoutDirectionChange | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |