public static void main(String args[]) { QApplication.initialize(args); // ! [0] QLabel label = new QLabel(); label.setFrameStyle(QFrame.Shadow.Sunken.value() | QFrame.Shape.Panel.value()); label.setText("first line\nsecond line"); label.setAlignment(Qt.AlignmentFlag.AlignBottom, Qt.AlignmentFlag.AlignRight); // ! [0] // ! [1] QLineEdit phoneEdit = new QLineEdit(); QLabel phoneLabel = new QLabel("Phone:"); phoneLabel.setBuddy(phoneEdit); // ! [1] // ! [2] QLineEdit nameEd = new QLineEdit(); QLabel nameLb = new QLabel("Name:"); nameLb.setBuddy(nameEd); QLineEdit phoneEd = new QLineEdit(); QLabel phoneLb = new QLabel("Phone:"); phoneLb.setBuddy(phoneEd); // (layout setup not shown) // ! [2] }
void setData(String mimetype, QByteArray newData) { mimeType = mimetype; data = new QByteArray(newData); dragDropLabel.setText(String.valueOf(data.size()) + " bytes."); List<String> formats = new Vector<String>(); formats.add(mimetype); mimeTypes.emit(formats); }
public void retranslateUi(QWidget Form) { this.expandButton.connectSlotsByName(); this.deleteButton.connectSlotsByName(); this.expandButton.clicked.connect(this, "big()"); this.deleteButton.clicked.connect(this, "delete()"); expand = false; this.expandButton.raise(); this.deleteButton.raise(); holder.lower(); fNameLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "First name:", null)); lNameLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Last name:", null)); tLatesLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Total Lates:", null)); tAbsentLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Total Absents:", null)); cStatusLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Current Status:", null)); deleteButton.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", " X", null)); fname.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); lname.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); cStatus.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); lates.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); absents.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); expandButton.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "\\/", null)); timeLabel.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "Timetable:", null)); idLabel.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "Student ID:", null)); id.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); curLoclabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Current location:", null)); curLocation.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); curclaslab.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Current class:", null)); currClass.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); entryLabel.setText( com.trolltech.qt.core.QCoreApplication.translate("Form", "Entry Time:", null)); exitLabel.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "Exit Time:", null)); entryTime.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "Text Label", null)); exitTime.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "Text Label", null)); p1.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); p2.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); p3.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); p4.setText(com.trolltech.qt.core.QCoreApplication.translate("Form", "TextLabel", null)); } // retranslateUi