I make a text editor. Here is a project on github
there is all the code. The errors are implicit (everything is compiled), but changing the font and the "save" button do not work. Help fix bugs, thanks.
Add button code save
void MainClass::slotSaveClicked(){ QTextDocumentWriter writer; writer.setFormat("odf"); writer.setFileName("output.odf"); writer.write (MainTextEdit->document()); } And QFontComboBox slot
void MainClass::setTextEditFont(){ QFont font = FStyleList->currentFont(); font.setPixelSize( FontsizeSpin -> value()); if (ItalyStyle->isChanged()){ font.setItalic(true); } else if (BoldStyle->isChecked()){ font.setBold(true); } else if (UnderLineStyle->isChecked()){ font.setUnderline(true); } MainTextEdit->setFont(font); }
ItalyStyle->isChanged()? - Alexander Chernin