Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] QWizard: field("xxx").toString strips white spaces !!! QComboBox tab navigation !!!
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QWizard: field("xxx").toString strips white spaces !!! QComboBox tab navigation !!!

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    le_gweg
    wrote on last edited by
    #1

    Hey people,

    I'm facing a strange problem, I have a 3 pages wizard with QLineEdit(s) and QComboBox(es).
    Everything works fine but 2 issues:
    The QlineEdit(s) are "registerField("Boutique*", boutiqueEdit);", but when I use QString Boutique = field("Boutique").toString(), all the white spaces in the returned string disappear !
    Could anyone tell me why this happens and how can I keep my white spaces ?

    Futhermore I would to navigate between the QComboBox(es) with the tab key and can't seem to find a way to that...

    Thanx in advance for your help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Could you show an example of what you have in the QLineEdit and what the call to field returns ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        le_gweg
        wrote on last edited by
        #3

        Hi SGaist,

        When QLineEdit is : "15 rue du renard"
        qDebug() << field(“Boutique”).toString() shows : "15ruedurenard"

        which doesn't make any sense to me.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          le_gweg
          wrote on last edited by
          #4

          OK so after a good night sleep I found out the issue my use of QLineEdit::setInputMask("xxxxxxxxx");
          Is the reason my white spaces disappeared.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Great you found out and thanks for sharing.

            Happy coding !

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved