Explore my side projects and work using this link

Upsidedown is a WordPress theme design that brings blog posts rising above inverted header and footer components.

Advertisements

메시지 박스의 텍스트를 복사해서 쓰려고 했더니, 기본적인 메시지 박스는 마우스 드래그가 불가능!

솔루션이 있을까 검색 후, 결과 남기기

                    msgBox = QMessageBox(self)
                    msgBox.setIcon(QMessageBox.Information)
                    msgBox.setText(f"Loaded config data from {fileName[0]}.\n" + _skip_message)
                    msgBox.setWindowTitle("Information")
                    msgBox.setTextInteractionFlags(Qt.TextSelectableByMouse)
                    msgBox.setStandardButtons(QMessageBox.Ok)
                    msgBox.show()

그냥 띄우지 말고, msgBox.setTextInteractionFlags(Qt.TextSelectableByMouse) 이 옵션을 주면 메시지 부분을 긁어서 복사할 수 있다.

텍스트 복사 가능한 QMessageBox

참고 사이트

  • https://stackoverflow.com/questions/32589776/qmessagebox-you-can-select-text-from
  • https://pythonbasics.org/pyqt-qmessagebox/
  • https://www.programcreek.com/python/example/108068/PyQt5.QtWidgets.QMessageBox <- 스코롤 까지 가능하게끔 하는 코드, 페이지에서 scroll을 검색하시오.

Call to Action

템플릿 블록 테스트 까지

버튼
woman sitting on rock
Advertisements

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다