qt - rounded buttons of QMessageBox -
i using qmessagebox ask if user wants close application.
void mainwindow::closeevent (qcloseevent *event) { qmessagebox::standardbutton reply; reply = qmessagebox::question(this, "exit", "are sure want exit?", qmessagebox::yes|qmessagebox::no); if (reply == qmessagebox::yes) { event->accept(); } else { event->ignore(); } }
i trying round yes/no buttons changing stylesheet to
qmessagebox qpushbutton{ border: 1px solid black; border-radius: 10px; }
however piece of code changes to
how make rounded buttons more proper size?
you have not given definite size in css rule; have define width
, height
of buttons or you add padding
dimensions adjust relatively.
Comments
Post a Comment