Created
January 2, 2019 19:12
-
-
Save jadbox/e63396844d0de9a20fbcece36a2afad0 to your computer and use it in GitHub Desktop.
py json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
{ | |
"menu": { | |
"drinks": [{name:"coke", price: 10}, {....}] | |
}] | |
} | |
*/ | |
with open("data_file.json", "r") as read_file: | |
data = json.load(read_file) | |
def makeBtn() { | |
self.four_btn = QtWidgets.QPushButton(self.frame_4) | |
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) | |
sizePolicy.setHorizontalStretch(0) | |
sizePolicy.setVerticalStretch(0) | |
sizePolicy.setHeightForWidth(self.four_btn.sizePolicy().hasHeightForWidth()) | |
self.four_btn.setSizePolicy(sizePolicy) | |
font = QtGui.QFont() | |
font.setPointSize(18) | |
self.four_btn.setFont(font) | |
self.four_btn.setObjectName("four_btn") | |
self.gridLayout.addWidget(self.four_btn, 1, 0, 1, 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment