hocam çok teşekkür ediyorum
düzenlediğiniz kodu çalıştırdım fakat yanıt vermiyor hatası alıyorum.
sys.exit(Uygulama.exec_())
bu kodu en sona yazınca bu şekilde davranıyor üste uygulama oluştur bölümüne yazınca arayüz geliyor fakat bu sefer de ekleye basınca veri tabanına ekleme yapmıyor. ben işin içinden çıkamadım rica etsem bi bakarmısınız.
ui kodlarını da ekliyorum.
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'takipproje.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1117, 899)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox.setGeometry(QtCore.QRect(50, 30, 631, 351))
self.groupBox.setObjectName("groupBox")
self.label_6 = QtWidgets.QLabel(self.groupBox)
self.label_6.setGeometry(QtCore.QRect(330, 40, 81, 16))
self.label_6.setObjectName("label_6")
self.cwBASLAMA = QtWidgets.QCalendarWidget(self.groupBox)
self.cwBASLAMA.setGeometry(QtCore.QRect(330, 60, 281, 183))
self.cwBASLAMA.setObjectName("cwBASLAMA")
self.widget = QtWidgets.QWidget(self.groupBox)
self.widget.setGeometry(QtCore.QRect(0, 30, 278, 304))
self.widget.setObjectName("widget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(self.widget)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.lneAD = QtWidgets.QLineEdit(self.widget)
self.lneAD.setObjectName("lneAD")
self.horizontalLayout.addWidget(self.lneAD)
self.verticalLayout.addLayout(self.horizontalLayout)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_2 = QtWidgets.QLabel(self.widget)
self.label_2.setObjectName("label_2")
self.horizontalLayout_2.addWidget(self.label_2)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.lneSOYAD = QtWidgets.QLineEdit(self.widget)
self.lneSOYAD.setObjectName("lneSOYAD")
self.horizontalLayout_2.addWidget(self.lneSOYAD)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_3 = QtWidgets.QLabel(self.widget)
self.label_3.setObjectName("label_3")
self.horizontalLayout_3.addWidget(self.label_3)
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem2)
self.lneTCK = QtWidgets.QLineEdit(self.widget)
self.lneTCK.setMaxLength(11)
self.lneTCK.setObjectName("lneTCK")
self.horizontalLayout_3.addWidget(self.lneTCK)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.label_4 = QtWidgets.QLabel(self.widget)
self.label_4.setObjectName("label_4")
self.horizontalLayout_4.addWidget(self.label_4)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem3)
self.lneDOGTAR = QtWidgets.QLineEdit(self.widget)
self.lneDOGTAR.setObjectName("lneDOGTAR")
self.horizontalLayout_4.addWidget(self.lneDOGTAR)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.label_9 = QtWidgets.QLabel(self.widget)
self.label_9.setObjectName("label_9")
self.horizontalLayout_5.addWidget(self.label_9)
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_5.addItem(spacerItem4)
self.lneTEL = QtWidgets.QLineEdit(self.widget)
self.lneTEL.setObjectName("lneTEL")
self.horizontalLayout_5.addWidget(self.lneTEL)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.label_8 = QtWidgets.QLabel(self.widget)
self.label_8.setObjectName("label_8")
self.horizontalLayout_6.addWidget(self.label_8)
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_6.addItem(spacerItem5)
self.lneADRES = QtWidgets.QLineEdit(self.widget)
self.lneADRES.setObjectName("lneADRES")
self.horizontalLayout_6.addWidget(self.lneADRES)
self.verticalLayout.addLayout(self.horizontalLayout_6)
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.label_10 = QtWidgets.QLabel(self.widget)
self.label_10.setObjectName("label_10")
self.horizontalLayout_7.addWidget(self.label_10)
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(spacerItem6)
self.lneEMAIL = QtWidgets.QLineEdit(self.widget)
self.lneEMAIL.setObjectName("lneEMAIL")
self.horizontalLayout_7.addWidget(self.lneEMAIL)
self.verticalLayout.addLayout(self.horizontalLayout_7)
self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.label_11 = QtWidgets.QLabel(self.widget)
self.label_11.setObjectName("label_11")
self.horizontalLayout_8.addWidget(self.label_11)
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_8.addItem(spacerItem7)
self.cmbMEDEN = QtWidgets.QComboBox(self.widget)
self.cmbMEDEN.setObjectName("cmbMEDEN")
self.cmbMEDEN.addItem("")
self.cmbMEDEN.addItem("")
self.horizontalLayout_8.addWidget(self.cmbMEDEN)
self.verticalLayout.addLayout(self.horizontalLayout_8)
self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
self.horizontalLayout_9.setObjectName("horizontalLayout_9")
self.label_12 = QtWidgets.QLabel(self.widget)
self.label_12.setObjectName("label_12")
self.horizontalLayout_9.addWidget(self.label_12)
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_9.addItem(spacerItem8)
self.spnCOCUK = QtWidgets.QSpinBox(self.widget)
self.spnCOCUK.setMaximum(10)
self.spnCOCUK.setObjectName("spnCOCUK")
self.horizontalLayout_9.addWidget(self.spnCOCUK)
self.verticalLayout.addLayout(self.horizontalLayout_9)
self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
self.horizontalLayout_10.setObjectName("horizontalLayout_10")
self.label_7 = QtWidgets.QLabel(self.widget)
self.label_7.setObjectName("label_7")
self.horizontalLayout_10.addWidget(self.label_7)
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_10.addItem(spacerItem9)
self.comMEVKI = QtWidgets.QComboBox(self.widget)
self.comMEVKI.setObjectName("comMEVKI")
self.comMEVKI.addItem("")
self.comMEVKI.addItem("")
self.comMEVKI.addItem("")
self.comMEVKI.addItem("")
self.comMEVKI.addItem("")
self.horizontalLayout_10.addWidget(self.comMEVKI)
self.verticalLayout.addLayout(self.horizontalLayout_10)
self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
self.horizontalLayout_11.setObjectName("horizontalLayout_11")
self.label_13 = QtWidgets.QLabel(self.widget)
self.label_13.setObjectName("label_13")
self.horizontalLayout_11.addWidget(self.label_13)
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_11.addItem(spacerItem10)
self.chkES = QtWidgets.QCheckBox(self.widget)
self.chkES.setObjectName("chkES")
self.horizontalLayout_11.addWidget(self.chkES)
self.verticalLayout.addLayout(self.horizontalLayout_11)
self.tableWidget = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget.setGeometry(QtCore.QRect(30, 390, 1071, 441))
self.tableWidget.setRowCount(100)
self.tableWidget.setColumnCount(13)
self.tableWidget.setObjectName("tableWidget")
self.label_5 = QtWidgets.QLabel(self.centralwidget)
self.label_5.setGeometry(QtCore.QRect(60, 840, 131, 16))
self.label_5.setObjectName("label_5")
self.label_14 = QtWidgets.QLabel(self.centralwidget)
self.label_14.setGeometry(QtCore.QRect(180, 840, 47, 13))
self.label_14.setText("")
self.label_14.setObjectName("label_14")
self.widget1 = QtWidgets.QWidget(self.centralwidget)
self.widget1.setGeometry(QtCore.QRect(690, 40, 131, 191))
self.widget1.setObjectName("widget1")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget1)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.btnEKLE = QtWidgets.QPushButton(self.widget1)
self.btnEKLE.setObjectName("btnEKLE")
self.verticalLayout_2.addWidget(self.btnEKLE)
self.btnGUNCELLE = QtWidgets.QPushButton(self.widget1)
self.btnGUNCELLE.setObjectName("btnGUNCELLE")
self.verticalLayout_2.addWidget(self.btnGUNCELLE)
self.btnARA = QtWidgets.QPushButton(self.widget1)
self.btnARA.setObjectName("btnARA")
self.verticalLayout_2.addWidget(self.btnARA)
self.btnSIL = QtWidgets.QPushButton(self.widget1)
self.btnSIL.setObjectName("btnSIL")
self.verticalLayout_2.addWidget(self.btnSIL)
self.btnCIK = QtWidgets.QPushButton(self.widget1)
self.btnCIK.setObjectName("btnCIK")
self.verticalLayout_2.addWidget(self.btnCIK)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1117, 21))
self.menubar.setObjectName("menubar")
self.menuAnasayfa = QtWidgets.QMenu(self.menubar)
self.menuAnasayfa.setObjectName("menuAnasayfa")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menuMAASHESAP = QtWidgets.QAction(MainWindow)
self.menuMAASHESAP.setObjectName("menuMAASHESAP")
self.actiondeneme = QtWidgets.QAction(MainWindow)
self.actiondeneme.setObjectName("actiondeneme")
self.actionMaa_Bilgileri = QtWidgets.QAction(MainWindow)
self.actionMaa_Bilgileri.setObjectName("actionMaa_Bilgileri")
self.menubar.addAction(self.menuAnasayfa.menuAction())
self.retranslateUi(MainWindow)
self.cmbMEDEN.setCurrentIndex(-1)
self.comMEVKI.setCurrentIndex(-1)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.groupBox.setTitle(_translate("MainWindow", "Personel"))
self.label_6.setText(_translate("MainWindow", "İşe Giriş Tarihi :"))
self.label.setText(_translate("MainWindow", "Adı :"))
self.label_2.setText(_translate("MainWindow", " Soyadı :"))
self.label_3.setText(_translate("MainWindow", " T.C. Kimlik No :"))
self.label_4.setText(_translate("MainWindow", "Doğum Tarihi :"))
self.label_9.setText(_translate("MainWindow", "Telefon numarası :"))
self.label_8.setText(_translate("MainWindow", "Adresi :"))
self.label_10.setText(_translate("MainWindow", "Mail Adresi :"))
self.label_11.setText(_translate("MainWindow", "Medeni Hali :"))
self.cmbMEDEN.setItemText(0, _translate("MainWindow", "Evli"))
self.cmbMEDEN.setItemText(1, _translate("MainWindow", "Bekar"))
self.label_12.setText(_translate("MainWindow", "Çocuk Sayısı : "))
self.label_7.setText(_translate("MainWindow", "mevkii :"))
self.comMEVKI.setItemText(0, _translate("MainWindow", "Makineci"))
self.comMEVKI.setItemText(1, _translate("MainWindow", "Ortacı"))
self.comMEVKI.setItemText(2, _translate("MainWindow", "Ütücü"))
self.comMEVKI.setItemText(3, _translate("MainWindow", "Kalite-kontrol"))
self.comMEVKI.setItemText(4, _translate("MainWindow", "Ustabaşı"))
self.label_13.setText(_translate("MainWindow", "Eş Çalışma Durumu :"))
self.chkES.setText(_translate("MainWindow", "çalışıyor"))
self.label_5.setText(_translate("MainWindow", "Kayıtlı Personel Sayıs :"))
self.btnEKLE.setText(_translate("MainWindow", "Kayıt Ekle"))
self.btnGUNCELLE.setText(_translate("MainWindow", "Kayıt Güncelle"))
self.btnARA.setText(_translate("MainWindow", "Kayıt Ara"))
self.btnSIL.setText(_translate("MainWindow", "Kayıt Sil"))
self.btnCIK.setText(_translate("MainWindow", "Çıkış"))
self.menuAnasayfa.setTitle(_translate("MainWindow", "Anasayfa"))
self.menuMAASHESAP.setText(_translate("MainWindow", "Maaş Bilgi Sistemi"))
self.actiondeneme.setText(_translate("MainWindow", "deneme"))
self.actionMaa_Bilgileri.setText(_translate("MainWindow", "Maaş Bilgileri"))