Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Fraction format
Forum Updated to NodeBB v4.3 + New Features

Fraction format

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.5k 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.
  • T Offline
    T Offline
    The Smiling Mickey
    wrote on last edited by
    #1

    Hey,

    I have a Textarea in my application, and I would like to use a horizontal line as a Division character rather than /. I don't really know where I could even begin to achieve this.

    If you have experience on how to achieve this, could you kindly point me to right direction?

    JKSHJ 1 Reply Last reply
    0
    • T The Smiling Mickey

      Hey,

      I have a Textarea in my application, and I would like to use a horizontal line as a Division character rather than /. I don't really know where I could even begin to achieve this.

      If you have experience on how to achieve this, could you kindly point me to right direction?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @The-Smiling-Mickey said in Fraction format:

      I have a Textarea in my application, and I would like to use a horizontal line as a Division character rather than /.

      Do you mean you want to show the numerator on top of the denominator?

          1     2
      y = - x + -
          2     3
      

      Or do you mean you want to show the division symbol? (÷)

      TextArea isn't really designed for the top option. For the bottom option you can automatically replace all instances of / with ÷ (see http://www.fileformat.info/info/unicode/char/00f7/index.htm)

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      2
      • T Offline
        T Offline
        The Smiling Mickey
        wrote on last edited by
        #3

        Yes, I mean the numerator on top of the denominator.

        If it really isn't possible to do that in TextArea, is there any other way to achieve this?

        aha_1980A JKSHJ 2 Replies Last reply
        0
        • T The Smiling Mickey

          Yes, I mean the numerator on top of the denominator.

          If it really isn't possible to do that in TextArea, is there any other way to achieve this?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by aha_1980
          #4

          hi @The-Smiling-Mickey

          If it really isn't possible to do that in TextArea, is there any other way to achieve this?

          yes there is. you have to program it :)

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • T The Smiling Mickey

            Yes, I mean the numerator on top of the denominator.

            If it really isn't possible to do that in TextArea, is there any other way to achieve this?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @The-Smiling-Mickey I'm not aware of any ready-to-go solutions for Qt Quick.

            For Qt Widgets, the 3rd-party QwtText class supports MathML rendering: http://qwt.sourceforge.net/class_qwt_text.html

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            3

            • Login

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