Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1927

snake_case addition to convert Qt property/signal names to camelCase for QML

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • PySide
    • None
    • All

    Description

      I see that PYSIDE-1567, originally reported as a bug, was closed, and I don't see it re-added as a feature request, so I thought I would do so (even though I know chances are probably low).

      It would be really nice to have a feature alongside the existing snake_case that would provide camelCase conversion when exposing Qt properties/signals, defined in Python code, to QML. True, it's not strictly necessary. But if you're already importing snake_case, then your Python code is naming things in snake_case—while all builtin names in QML are camelCase. So when defining properties and slots in Python code, you currently have two options:

      • Name them in snake_case (and remember that they're an outlier when accessing them within QML)
      • name them in camelCase (and remember they're an outlier within your Python source code).

      Either way introduces inconsistency and makes it harder to remember variable names.

      I'm sure you have higher priorities, and I know you've already said the snake_case feature might have been a mistake to begin with, but I can always dream!

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              charleswhitt Charles Whittington
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes