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. QString & QRegExp
Forum Updated to NodeBB v4.3 + New Features

QString & QRegExp

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 569 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.
  • W Offline
    W Offline
    ws22
    wrote on last edited by
    #1

    Hello,
    i have a QRegExp
    @
    QRegExp("[0-9,.-]");
    @
    this should be allowed !

    i want to remove all other signs from a QString .

    How can i do that ?
    Please help.

    Thanks in advance !

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please use '@' tags to wrap your code here on the forum. It is easier to read this way (I've already done that for you in your post).

      Remember that QRegExp is deprecated in Qt 5, you should use QRegularExpression instead.

      Regarding your problem: please see the documentation, the usage of QRegExp is explained pretty decently there. "Link":http://qt-project.org/doc/qt-5/QRegExp.html. You can also use "QRegExpValidator":http://qt-project.org/doc/qt-5/qregexpvalidator.html class, if you need your validaion in GUI.

      (Z(:^

      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