Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Write Symbol



  • Hi everybody,
    I'm developing a scientific calculator but I have some problem with the symbol.
    For example I found the code for drawing raise to second (\262) and thrid (\263).

    But I need the code for representing the symbols of:

    • root
    • cube root
    • greek pi
    • ^ -1
    • ^x
    • subscript a

    Thanks to everybody.



  • Maybe, it'll be better if you will render the symbols as images.



  • This symbol are represent in a push button. How can I insert the image on the button?


  • Moderators

    http://www.unicode.org/charts/ has charts with all the symbols defined by unicode. Qt handles unicode, so any of them works, provided your font contains the symbol.



  • One way to get an image on your button, is to use QToolButton instead of QPushButton. You can use a QAction to represent the operation (root, cube root, etc.) or constant (pi, e, etc.). You can associate an image with a QAction, and it will be rendered on your tool button automatically.



  • I've got some fonts which has this especial function (mathematical fonts) ... Images (for me) aren't good solution, but in any way you will need to do a lot of positioning (indexes, powers of number, roots, sums, prods, and so on...)





  • [quote author="Peppy" date="1305723664"]I've got some fonts which has this especial function (mathematical fonts) ... Images (for me) aren't good solution, but in any way you will need to do a lot of positioning (indexes, powers of number, roots, sums, prods, and so on...)[/quote]

    What are you talking about? Positioning? How? What kind of positioning do you think needs doing if you just want to put it on a button?



  • Example: If you have a small index under function how you can get it there?

    On button? No. I mean on a "paper". It will be clickable as in Word 2003 (MS Equation 3.0) ?

    It's quite a lot of work, but I hope it will come out. :)



  • That is a different issue, Peppy. You are confusion the discussion. The topic starter was after buttons:

    [quote author="Pissio" date="1305708726"]This symbol are represent in a push button. How can I insert the image on the button?[/quote]

    It is for that purpose that I suggest to use images. If you want to create editable formulas in some kind of editor, you are dealing with quite another topic.



  • Oh, I am sorry...Yes, that way, should be better to use images (but IMHO it's still better to use fonts :-D :-D )


Log in to reply