View Issue Details

IDProjectCategoryView StatusLast Update
0017751ScribusScripterpublic2026-02-15 16:42
ReporterLynn Assigned To 
PrioritylowSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.7.2 
Summary0017751: Text wrapping in valueDialog for scripter
DescriptionThe scripter messageBox() dialog neatly wraps any text you put into it onto multiple lines so it doesn't run off the screen. The valueDialog() does not, so I have to put a lot of newline characters in my dialog strings. It would be great to have text in the valueDialog automatically wrap like they do in the message box.
Additional InformationThis comes up for me because I like to write scripts where the user can set variables at runtime (what string do you want to insert, where do you want to place the text in this header, etc.) and sometimes the explanations get a bit long.
TagsNo tags attached.
PatchNo

Activities

ale

2026-02-15 16:42

manager   ~0053495

I have mixed feelings here.

First: from what I can tell. the behavior is inherited from Qt.
And there seem not to be an easy way to get a different behavior by going through a "manual" QInputDialog's setup: setMaximumWidth() did not seem to have any effect on the width:

    QInputDialog* dialog = new QInputDialog(ScCore->primaryMainWindow());
    dialog->setWindowTitle(QString::fromUtf8(caption.c_str()));
    dialog->setLabelText(QString::fromUtf8(message.c_str()));
    dialog->setTextValue(QString::fromUtf8(value.c_str()));
    dialog->setMaximumWidth(400);
    QString txt;
    if (dialog->exec()) {
        txt = dialog->textValue();
    }


Second: The label needs to get very long before messageBox() will wrap the text. In my eyes that already looks too wide.

Third: the scribus.* dialogs are there for simple feedback / settings, for more complex onse tkinter (or in the future Qt for Python) is a much better fit.
(this is even more valid, if we can find out why tkinter does not work on mack).

All in all, I think that for your use case, you should rather add newlines to the label in your Python code.
As a consolation gift, here a nice RegExp for doing it:

re.sub(r'(.{1,20})(?:\s|$)', r'\1\n', 'this is some text with multiple words', re.MULTILINE)

Issue History

Date Modified Username Field Change
2026-02-15 01:11 Lynn New Issue
2026-02-15 16:42 ale Note Added: 0053495