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就是方便...
转载于:https://www.cnblogs.com/azbane/p/10500395.html