What is the actual function of this BottonRole?
Solved
General and Desktop
-
It's described here: https://doc.qt.io/qt-6/qmessagebox.html#ButtonRole-enum
It is used to display the button in the correct place on systems (like MacOS) where position changes depending on the function -
It's described here: https://doc.qt.io/qt-6/qmessagebox.html#ButtonRole-enum
It is used to display the button in the correct place on systems (like MacOS) where position changes depending on the function@VRonin Thanks,
QMessageBox* box = new QMessageBox(this); QPushButton* button1 = new QPushButton("是",this); box->addButton(button1, QMessageBox::NoRole); QPushButton* button = new QPushButton("否",this); box->addButton(button, QMessageBox::YesRole); box->show();
I wrote some code and after running it I got the following result
Now I understand what you mean,Thank you!
If my expression offends you, please do not mind. (^ _ ^)