[ad_1]
I was following Qt Calculator example from http://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html.
I encountered the code below.
for (int i = 0; i < NumDigitButtons; ++i)
digitButtons[i] = createButton(QString::number(i), SLOT(digitClicked()));
Button *pointButton = createButton(tr("."), SLOT(pointClicked()));
Button *changeSignButton = createButton(tr("302261"), SLOT(changeSignClicked()));
Button *backspaceButton = createButton(tr("Backspace"), SLOT(backspaceClicked()));
Button *clearButton = createButton(tr("Clear"), SLOT(clear()));
Button *clearAllButton = createButton(tr("Clear All"), SLOT(clearAll()));
Button *clearMemoryButton = createButton(tr("MC"), SLOT(clearMemory()));
Button *readMemoryButton = createButton(tr("MR"), SLOT(readMemory()));
Button *setMemoryButton = createButton(tr("MS"), SLOT(setMemory()));
Button *addToMemoryButton = createButton(tr("M+"), SLOT(addToMemory()));
Button *divisionButton = createButton(tr("303267"), SLOT(multiplicativeOperatorClicked()));
Button *timesButton = createButton(tr("303227"), SLOT(multiplicativeOperatorClicked()));
Button *minusButton = createButton(tr("-"), SLOT(additiveOperatorClicked()));
Button *plusButton = createButton(tr("+"), SLOT(additiveOperatorClicked()));
Button *squareRootButton = createButton(tr("Sqrt"), SLOT(unaryOperatorClicked()));
Button *powerButton = createButton(tr("x302262"), SLOT(unaryOperatorClicked()));
Button *reciprocalButton = createButton(tr("1/x"), SLOT(unaryOperatorClicked()));
Button *equalButton = createButton(tr("="), SLOT(equalClicked()));
However, I couldn't understand what do tr("302261") ,tr("303267"), tr("x302262")mean from the lines below.
Button *changeSignButton = createButton(tr("302261"), SLOT(changeSignClicked()));
Button *divisionButton = createButton(tr("303267"), SLOT(multiplicativeOperatorClicked()));
Button *powerButton = createButton(tr("x302262"), SLOT(unaryOperatorClicked()));
When I removed 303267, I found ÷ symbol disappears. So I guess it is somehow related to division button.
I have no idea how 303267 can be related to division. I searched Qt documentation page, and found nothing.
My question is:
What do tr("302261") ,tr("303267"), and tr("x302262") mean in this example?
[ad_2]
لینک منبع