I want to move QMessageBox to bottom-right corner of the screen, following is 
my code,but doesn't work as expected , anyone can explain why? How to fix the 
problem here ?‍


import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from 
PyQt5.QtWidgets import * def moveToBottomRight(msgBox):     
msgBox.addButton("重计", QMessageBox.ActionRole)     msgBox.addButton("停计", 
QMessageBox.ActionRole)     msgBox.addButton('继续', QMessageBox.ActionRole)     
screenGeometry = QApplication.desktop().availableGeometry()     screenGeo = 
screenGeometry.bottomRight()     msgGeo = msgBox.frameGeometry()     
msgGeo.moveBottomRight(screenGeo)     msgBox.move(msgGeo.topLeft()) def main(): 
    app = QApplication(sys.argv)     msgBox = QMessageBox()     
moveToBottomRight(msgBox)     msgBox.show()     sys.exit(app.exec_()) if 
__name__ == '__main__':     main()‍
Question also posted here 
http://stackoverflow.com/questions/28322073/move-qmessagebox-to-bottom-right-corner-of-the-screen#28323459‍
_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to