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. QChar isSymbol, if "[" isn't a symbol what is it?
Forum Updated to NodeBB v4.3 + New Features

QChar isSymbol, if "[" isn't a symbol what is it?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 367 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    The documentation for isSymbol isn't that clear, I would have thought that any character that is not a space, number or letter must be a symbol, but it appears not.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      QChar::isSymbol() returns true when it's in one of the four categories:

      QChar::Symbol_Math 26 Unicode class name Sm
      QChar::Symbol_Currency 27 Unicode class name Sc
      QChar::Symbol_Modifier 28 Unicode class name Sk
      QChar::Symbol_Other 29 Unicode class name So

      But the left bracket is in category Ps: https://www.fileformat.info/info/unicode/char/005b/index.htm (QChar::Punctuation_Open)

      So nothing which Qt can do against.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      5
      • F Offline
        F Offline
        farteryhr
        wrote on last edited by
        #3

        so there's also .isPunct() to check for punctuation.

        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