File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,8 @@ def filtering(self, keyword) -> None:
438
438
# print(keyword)
439
439
440
440
def keyPressEvent (self , event : PyQt5 .QtGui .QKeyEvent ) -> None :
441
+ global parser
442
+
441
443
# Ctrl + C 누른 경우 Table의 내용 복사
442
444
# https://stackoverflow.com/questions/60715462/how-to-copy-and-paste-multiple-cells-in-qtablewidget-in-pyqt5
443
445
if event .key () == Qt .Key .Key_C and (event .modifiers () & Qt .KeyboardModifier .ControlModifier ): # type: ignore
@@ -447,6 +449,16 @@ def keyPressEvent(self, event: PyQt5.QtGui.QKeyEvent) -> None:
447
449
copy_text = ''
448
450
max_column = copied_cells [- 1 ].column ()
449
451
for c in copied_cells :
452
+ # 링크도 복사
453
+ if c .column () == 0 and parser :
454
+ all_link = parser .get_link_list ()
455
+ article_id = self .articleView .item (c .row (), 0 ).text ()
456
+
457
+ target_link = all_link [article_id ]
458
+ # print(all_link, article_id)
459
+ # print(target_link)
460
+ copy_text += (target_link + '\t ' )
461
+
450
462
copy_text += self .articleView .item (c .row (), c .column ()).text ()
451
463
if c .column () == max_column :
452
464
copy_text += '\n '
You can’t perform that action at this time.
0 commit comments