Qt 拷贝内容到粘贴板 || 获取粘贴板内容
QString source = ui->textEdit_code->toPlainText(); QClipboard *clipboard = QApplication::clipboard(); //获取系统剪贴板指针 QString originalText = clipboard->text(); //获取剪贴板上文本信息 clipboard->setText(source); //设置剪贴板内容</span>
Qt就是方便...
QString source = ui->textEdit_code->toPlainText(); QClipboard *clipboard = QApplication::clipboard(); //获取系统剪贴板指针 QString originalText = clipboard->text(); //获取剪贴板上文本信息 clipboard->setText(source); //设置剪贴板内容</span>
Qt就是方便...