mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-11-04 21:16:56 +01:00
fix setWidgetText for progressBar
This commit is contained in:
parent
97c58b72bd
commit
3e4fda83ba
1 changed files with 3 additions and 1 deletions
|
@ -552,7 +552,9 @@ int LuaEngineGui::setWidgetText(lua_State *L_p)
|
|||
((QPlainTextEdit*)pointer)->setPlainText(getVariant(L_p, 2).toString());
|
||||
}
|
||||
else if (((QObject*)pointer)->inherits("QProgressBar")) {
|
||||
((QProgressBar*)pointer)->setFormat(getVariant(L_p, 2).toString());
|
||||
QString progressBarText = getVariant(L_p, 2).toString();
|
||||
((QProgressBar*)pointer)->setFormat(progressBarText);
|
||||
((QProgressBar*)pointer)->setTextVisible(!progressBarText.isEmpty());
|
||||
}
|
||||
else if (((QObject*)pointer)->inherits("QPushButton")) {
|
||||
((QPushButton*)pointer)->setText(getVariant(L_p, 2).toString());
|
||||
|
|
Loading…
Reference in a new issue