代码和UI文件:http://yunpan.cn/QCkXbX8mnSNke(提取码:51e1)
图片如:
代码如下:
from PyQt4 import QtCore,QtGui,Qt
import sys
from a import Ui_MainWindow
class A(QtGui.QMainWindow,Ui_MainWindow):
def __init__(self,parnet=None):
super(A,self).__init__(parnet)
self.setupUi(self)
self.rightoleft()
def rightoleft(self):
self.setLayoutDirection(QtCore.Qt.RightToLeft)#通过设置一个特定的菜单的方向通过
def main():
app = QtGui.QApplication(sys.argv)
ex =A()
ex.show()
sys.exit(app.exec_())
main()