mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-20 00:28:39 +02:00
Plugins
This commit is contained in:
+16
-1
@@ -445,7 +445,7 @@ QString amountToCurrencyString(double amount, const QString ¤cyCode) {
|
||||
if (currencyCode == "USD")
|
||||
return locale.toCurrencyString(amount, "$").remove("\xC2\xA0");
|
||||
|
||||
return locale.toCurrencyString(amount).remove("\xC2\xA0");
|
||||
return QString("%1%2").arg(locale.currencySymbol(), QString::number(amount, 'f', 2));
|
||||
}
|
||||
|
||||
QStandardItem *qStandardItem(const QString& text) {
|
||||
@@ -693,4 +693,19 @@ QWindow *windowForQObject(QObject* object) {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void clearLayout(QLayout* layout, bool deleteWidgets)
|
||||
{
|
||||
while (QLayoutItem *item = layout->takeAt(0)) {
|
||||
if (deleteWidgets) {
|
||||
if (QWidget *widget = item->widget()) {
|
||||
widget->deleteLater();
|
||||
}
|
||||
}
|
||||
if (QLayout *childLayout = item->layout()) {
|
||||
clearLayout(childLayout, deleteWidgets);
|
||||
}
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user