<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Am 2010-02-24 23:06, schrieb Linuxoid Oz:
<blockquote cite="mid:930834.24771.qm@web111006.mail.gq1.yahoo.com"
type="cite">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td
style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;"
valign="top">That worked, thank you.<br>
<br>
--- On <b>Wed, 24/2/10, Arno Rehn <i><a class="moz-txt-link-rfc2396E" href="mailto:arno@arnorehn.de"><arno@arnorehn.de></a></i></b>
wrote:<br>
<blockquote
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>
<div class="plainMail">Cast the Enum value to an int first.<br>
<br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
<br>
</blockquote>
Hm, how about that?<br>
<br>
QMessageBox.StandardButton button = QMessageBox.Question
(this, "Confirm Remove", "Are you sure you want to remove?", <br>
QMessageBox.StandardButton.Ok,
QMessageBox.StandardButton.Cancel);<br>
<br>
if (button == QMessageBox.StandardButton.Ok) {<br>
//do something<br>
}<br>
<br>
May be not the best possibility, but IMHO is better than typecasting.<br>
wouldn't it be worth implementing the == operator in such cases?<br>
<br>
Christian<br>
</body>
</html>