-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctEdicion.cpp
More file actions
66 lines (42 loc) · 930 Bytes
/
FunctEdicion.cpp
File metadata and controls
66 lines (42 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtWidgets>
#include<QTextDocument>
#include<QPainter>
#include<QFile>
#include<QLabel>
#include<QFontDialog>
#include<QColorDialog>
#include<QTextCursor>
#include<QTextDocument>
#include<QFontDatabase>
//funcion copiar texto
void MainWindow::on_actionCopiar_triggered()
{
ui->textEdit->copy();
}
//funcion pegar texto
void MainWindow::on_actionPegar_triggered()
{
ui->textEdit->paste();
}
//funcion cortar texto
void MainWindow::on_actionCortar_triggered()
{
ui->textEdit->cut();
}
void MainWindow::on_actionFuente_triggered()
{
bool ok;
QFont fuente;
fuente = QFontDialog::getFont(&ok, this);
if(!ok)
return;
ui->textEdit->setFont(fuente);
}
void MainWindow::on_actionColor_triggered()
{
QColor color;
color = QColorDialog::getColor(Qt::white, this);
ui->textEdit->setTextColor(color);
}