Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好吧,我正在做一个文本编辑器,基本上你写文本的地方是一个“QPlainTextEdit”我有问题,我试图在“编辑”菜单中做,一个复制/粘贴/剪切的选项。
我的意思是复制,您在编辑器中选择文本,打开编辑菜单,单击复制并将其发送到剪贴板。粘贴,粘贴您复制的内容?剪切,剪切选定的文本。
QTextEdit有插槽copy和。因此,您只需将您的信号与这些插槽连接,您将拥有 Cc\Cv 功能。您可以在 QDesigner 中执行此操作而无需编码。pastecut
QTextEdit
copy
paste
cut