Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

i want to switch from one dialog to another and here's my code



  • import os
    import subprocess
    import data as data
    from PyQt5 import QtCore, QtGui, QtWidgets
    from PyQt5.QtGui import QPixmap, QRegion
    from PyQt5.QtWidgets import QFileDialog, QMessageBox, QWidget, QLabel
    from PyQt5.QtCore import Qt, QFileInfo, QUrl, QDir
    from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
    from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
    from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction,
    qApp, QFileDialog
    from random import randint

    class Ui_Next0(object):
    def setupUi(self, Next0):
    Next0.setObjectName("Next0")
    Next0.resize(586, 313)
    Next0.setStyleSheet("background-color: #1A1A1D;")
    self.frame = QtWidgets.QFrame(Next0)
    self.frame.setGeometry(QtCore.QRect(10, 10, 571, 291))
    self.frame.setStyleSheet("background-color: #4e4e50;\n"
    "border-radius: 25px;")
    self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
    self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
    self.frame.setObjectName("frame")
    self.label = QtWidgets.QLabel(self.frame)
    self.label.setGeometry(QtCore.QRect(30, 10, 71, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label.setFont(font)
    self.label.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label.setAlignment(QtCore.Qt.AlignCenter)
    self.label.setObjectName("label")
    self.label_2 = QtWidgets.QLabel(self.frame)
    self.label_2.setGeometry(QtCore.QRect(150, 10, 71, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_2.setFont(font)
    self.label_2.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_2.setAlignment(QtCore.Qt.AlignCenter)
    self.label_2.setObjectName("label_2")
    self.label_4 = QtWidgets.QLabel(self.frame)
    self.label_4.setGeometry(QtCore.QRect(260, 10, 71, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_4.setFont(font)
    self.label_4.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_4.setAlignment(QtCore.Qt.AlignCenter)
    self.label_4.setObjectName("label_4")
    self.label_5 = QtWidgets.QLabel(self.frame)
    self.label_5.setGeometry(QtCore.QRect(370, 10, 71, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_5.setFont(font)
    self.label_5.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_5.setAlignment(QtCore.Qt.AlignCenter)
    self.label_5.setObjectName("label_5")
    self.label_6 = QtWidgets.QLabel(self.frame)
    self.label_6.setGeometry(QtCore.QRect(470, 10, 71, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_6.setFont(font)
    self.label_6.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_6.setAlignment(QtCore.Qt.AlignCenter)
    self.label_6.setObjectName("label_6")
    self.frame_2 = QtWidgets.QFrame(self.frame)
    self.frame_2.setGeometry(QtCore.QRect(20, 40, 111, 211))
    self.frame_2.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_2.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_2.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_2.setLineWidth(2)
    self.frame_2.setObjectName("frame_2")
    self.pushButton_9 = QtWidgets.QPushButton(self.frame_2)
    self.pushButton_9.setGeometry(QtCore.QRect(10, 10, 91, 31))
    self.pushButton_9.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;\n"
    "")
    self.pushButton_9.setObjectName("pushButton_9")
    self.pushButton_16 = QtWidgets.QPushButton(self.frame_2)
    self.pushButton_16.setGeometry(QtCore.QRect(10, 50, 91, 31))
    self.pushButton_16.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_16.setObjectName("pushButton_16")
    self.pushButton_11 = QtWidgets.QPushButton(self.frame_2)
    self.pushButton_11.setGeometry(QtCore.QRect(10, 90, 91, 31))
    self.pushButton_11.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_11.setObjectName("pushButton_11")
    self.pushButton_12 = QtWidgets.QPushButton(self.frame_2)
    self.pushButton_12.setGeometry(QtCore.QRect(10, 130, 91, 31))
    self.pushButton_12.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_12.setObjectName("pushButton_12")
    self.pushButton_13 = QtWidgets.QPushButton(self.frame_2)
    self.pushButton_13.setGeometry(QtCore.QRect(10, 170, 91, 31))
    self.pushButton_13.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_13.setObjectName("pushButton_13")
    self.frame_3 = QtWidgets.QFrame(self.frame)
    self.frame_3.setGeometry(QtCore.QRect(150, 40, 81, 181))
    self.frame_3.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_3.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_3.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_3.setLineWidth(2)
    self.frame_3.setObjectName("frame_3")
    self.pushButton_10 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_10.setGeometry(QtCore.QRect(10, 10, 61, 31))
    self.pushButton_10.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_10.setObjectName("pushButton_10")
    self.pushButton_14 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_14.setGeometry(QtCore.QRect(10, 50, 61, 31))
    self.pushButton_14.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_14.setObjectName("pushButton_14")
    self.pushButton_15 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_15.setGeometry(QtCore.QRect(10, 90, 61, 31))
    self.pushButton_15.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_15.setObjectName("pushButton_15")
    self.frame_5 = QtWidgets.QFrame(self.frame)
    self.frame_5.setGeometry(QtCore.QRect(250, 40, 101, 181))
    self.frame_5.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_5.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_5.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_5.setLineWidth(2)
    self.frame_5.setObjectName("frame_5")
    self.pushButton_19 = QtWidgets.QPushButton(self.frame_5)
    self.pushButton_19.setGeometry(QtCore.QRect(10, 10, 81, 31))
    self.pushButton_19.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_19.setObjectName("pushButton_19")
    self.frame_6 = QtWidgets.QFrame(self.frame)
    self.frame_6.setGeometry(QtCore.QRect(370, 40, 81, 181))
    self.frame_6.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_6.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_6.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_6.setLineWidth(2)
    self.frame_6.setObjectName("frame_6")
    self.pushButton_18 = QtWidgets.QPushButton(self.frame_6)
    self.pushButton_18.setGeometry(QtCore.QRect(10, 10, 61, 31))
    self.pushButton_18.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_18.setObjectName("pushButton_18")
    self.frame_7 = QtWidgets.QFrame(self.frame)
    self.frame_7.setGeometry(QtCore.QRect(470, 40, 81, 181))
    self.frame_7.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_7.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_7.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_7.setLineWidth(2)
    self.frame_7.setObjectName("frame_7")
    self.pushButton_17 = QtWidgets.QPushButton(self.frame_7)
    self.pushButton_17.setGeometry(QtCore.QRect(10, 10, 61, 31))
    self.pushButton_17.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_17.setObjectName("pushButton_17")
    self.pushButton_20 = QtWidgets.QPushButton(self.frame)
    self.pushButton_20.setGeometry(QtCore.QRect(340, 250, 91, 21))
    self.pushButton_20.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.pushButton_20.setObjectName("pushButton_20")
    self.pushButton_21 = QtWidgets.QPushButton(self.frame)
    self.pushButton_21.setGeometry(QtCore.QRect(440, 250, 91, 21))
    self.pushButton_21.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.pushButton_21.setObjectName("pushButton_21")

        self.retranslateUi(Next0)
        QtCore.QMetaObject.connectSlotsByName(Next0)
    
    def retranslateUi(self, Next0):
        _translate = QtCore.QCoreApplication.translate
        Next0.setWindowTitle(_translate("Next0", "Dialog"))
        self.label.setText(_translate("Next0", "Image"))
        self.label_2.setText(_translate("Next0", "Audio"))
        self.label_4.setText(_translate("Next0", "PDF"))
        self.label_5.setText(_translate("Next0", "EXE"))
        self.label_6.setText(_translate("Next0", "Video"))
        self.pushButton_9.setText(_translate("Next0", "S-Tool"))
        self.pushButton_16.setText(_translate("Next0", "Xiao Steg Tool"))
        self.pushButton_11.setText(_translate("Next0", "StegnographX Plus"))
        self.pushButton_12.setText(_translate("Next0", "Gifshuf-Tool"))
        self.pushButton_13.setText(_translate("Next0", "Lsb-Tool"))
        self.pushButton_10.setText(_translate("Next0", "Steghide"))
        self.pushButton_14.setText(_translate("Next0", "Mp3stego"))
        self.pushButton_15.setText(_translate("Next0", "DeepSound"))
        self.pushButton_19.setText(_translate("Next0", "wbStego4open"))
        self.pushButton_18.setText(_translate("Next0", "OurSecret"))
        self.pushButton_17.setText(_translate("Next0", "DeEgger"))
        self.pushButton_20.setText(_translate("Next0", "Back"))
        self.pushButton_21.setText(_translate("Next0", "Next"))
    

    if name == "main":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Next0 = QtWidgets.QDialog()
    ui = Ui_Next0()
    ui.setupUi(Next0)
    Next0.show()
    sys.exit(app.exec_())

    and this is the second code, what should i do ::

    import os
    import subprocess
    import data as data
    from PyQt5 import QtCore, QtGui, QtWidgets
    from PyQt5.QtGui import QPixmap, QRegion
    from PyQt5.QtWidgets import QFileDialog, QMessageBox, QWidget, QLabel
    from PyQt5.QtCore import Qt, QFileInfo, QUrl, QDir
    from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
    from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
    from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction,
    qApp, QFileDialog
    from random import randint

    class Ui_Dialog(object):
    def setupUi(self, Dialog):
    Dialog.setObjectName("Dialog")
    Dialog.resize(587, 300)
    Dialog.setStyleSheet("background-color: #1A1A1D;")
    self.frame = QtWidgets.QFrame(Dialog)
    self.frame.setGeometry(QtCore.QRect(10, 10, 571, 281))
    self.frame.setStyleSheet("background-color: #4e4e50;\n"
    "border-radius: 25px;")
    self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
    self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
    self.frame.setObjectName("frame")
    self.label = QtWidgets.QLabel(self.frame)
    self.label.setGeometry(QtCore.QRect(10, 10, 111, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label.setFont(font)
    self.label.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label.setAlignment(QtCore.Qt.AlignCenter)
    self.label.setObjectName("label")
    self.label_2 = QtWidgets.QLabel(self.frame)
    self.label_2.setGeometry(QtCore.QRect(130, 10, 91, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_2.setFont(font)
    self.label_2.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_2.setAlignment(QtCore.Qt.AlignCenter)
    self.label_2.setObjectName("label_2")
    self.label_4 = QtWidgets.QLabel(self.frame)
    self.label_4.setGeometry(QtCore.QRect(230, 10, 111, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_4.setFont(font)
    self.label_4.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_4.setAlignment(QtCore.Qt.AlignCenter)
    self.label_4.setObjectName("label_4")
    self.label_5 = QtWidgets.QLabel(self.frame)
    self.label_5.setGeometry(QtCore.QRect(350, 10, 81, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_5.setFont(font)
    self.label_5.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_5.setAlignment(QtCore.Qt.AlignCenter)
    self.label_5.setObjectName("label_5")
    self.frame_3 = QtWidgets.QFrame(self.frame)
    self.frame_3.setGeometry(QtCore.QRect(20, 40, 81, 181))
    self.frame_3.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_3.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_3.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_3.setLineWidth(2)
    self.frame_3.setObjectName("frame_3")
    self.pushButton_10 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_10.setGeometry(QtCore.QRect(10, 10, 61, 31))
    self.pushButton_10.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_10.setObjectName("pushButton_10")
    self.pushButton_14 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_14.setGeometry(QtCore.QRect(10, 50, 61, 31))
    self.pushButton_14.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_14.setObjectName("pushButton_14")
    self.pushButton_15 = QtWidgets.QPushButton(self.frame_3)
    self.pushButton_15.setGeometry(QtCore.QRect(10, 90, 61, 31))
    self.pushButton_15.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_15.setObjectName("pushButton_15")
    self.frame_4 = QtWidgets.QFrame(self.frame)
    self.frame_4.setGeometry(QtCore.QRect(130, 40, 81, 181))
    self.frame_4.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_4.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_4.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_4.setLineWidth(2)
    self.frame_4.setObjectName("frame_4")
    self.pushButton_11 = QtWidgets.QPushButton(self.frame_4)
    self.pushButton_11.setGeometry(QtCore.QRect(10, 10, 61, 31))
    self.pushButton_11.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_11.setObjectName("pushButton_11")
    self.frame_6 = QtWidgets.QFrame(self.frame)
    self.frame_6.setGeometry(QtCore.QRect(240, 40, 91, 181))
    self.frame_6.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_6.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_6.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_6.setLineWidth(2)
    self.frame_6.setObjectName("frame_6")
    self.pushButton_13 = QtWidgets.QPushButton(self.frame_6)
    self.pushButton_13.setGeometry(QtCore.QRect(10, 10, 71, 31))
    self.pushButton_13.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_13.setObjectName("pushButton_13")
    self.frame_7 = QtWidgets.QFrame(self.frame)
    self.frame_7.setGeometry(QtCore.QRect(350, 40, 91, 181))
    self.frame_7.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_7.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_7.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_7.setLineWidth(2)
    self.frame_7.setObjectName("frame_7")
    self.pushButton_16 = QtWidgets.QPushButton(self.frame_7)
    self.pushButton_16.setGeometry(QtCore.QRect(10, 10, 71, 31))
    self.pushButton_16.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_16.setObjectName("pushButton_16")
    self.label_6 = QtWidgets.QLabel(self.frame)
    self.label_6.setGeometry(QtCore.QRect(450, 10, 101, 21))
    font = QtGui.QFont()
    font.setBold(True)
    font.setWeight(75)
    self.label_6.setFont(font)
    self.label_6.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.label_6.setAlignment(QtCore.Qt.AlignCenter)
    self.label_6.setObjectName("label_6")
    self.frame_8 = QtWidgets.QFrame(self.frame)
    self.frame_8.setGeometry(QtCore.QRect(460, 40, 91, 181))
    self.frame_8.setStyleSheet("background-color: #FFFAFA;\n"
    "border-radius: 25px;")
    self.frame_8.setFrameShape(QtWidgets.QFrame.Panel)
    self.frame_8.setFrameShadow(QtWidgets.QFrame.Plain)
    self.frame_8.setLineWidth(2)
    self.frame_8.setObjectName("frame_8")
    self.pushButton_17 = QtWidgets.QPushButton(self.frame_8)
    self.pushButton_17.setGeometry(QtCore.QRect(10, 10, 71, 31))
    self.pushButton_17.setStyleSheet("background-color: #950740;\n"
    "border-radius: 15px;\n"
    "color: white;")
    self.pushButton_17.setObjectName("pushButton_17")
    self.pushButton_18 = QtWidgets.QPushButton(self.frame)
    self.pushButton_18.setGeometry(QtCore.QRect(360, 250, 91, 21))
    self.pushButton_18.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.pushButton_18.setObjectName("pushButton_18")
    self.pushButton_19 = QtWidgets.QPushButton(self.frame)
    self.pushButton_19.setGeometry(QtCore.QRect(460, 250, 91, 21))
    self.pushButton_19.setStyleSheet("background-color: #950740;\n"
    "color: white;\n"
    "border-radius: 5px;\n"
    "")
    self.pushButton_19.setObjectName("pushButton_19")

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
    
    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.label.setText(_translate("Dialog", "Detecting ADS File"))
        self.label_2.setText(_translate("Dialog", "Disk Encryption"))
        self.label_4.setText(_translate("Dialog", "Tech of MS Office"))
        self.label_5.setText(_translate("Dialog", "Hiding in ADS"))
        self.pushButton_10.setText(_translate("Dialog", "Streams"))
        self.pushButton_14.setText(_translate("Dialog", "AdsView"))
        self.pushButton_15.setText(_translate("Dialog", "Gmer"))
        self.pushButton_11.setText(_translate("Dialog", "Vera Crypt"))
        self.pushButton_13.setText(_translate("Dialog", "Steps by Gifs"))
        self.pushButton_16.setText(_translate("Dialog", "Steps by Gifs"))
        self.label_6.setText(_translate("Dialog", "Hiding in win reg."))
        self.pushButton_17.setText(_translate("Dialog", "Steps by Gifs"))
        self.pushButton_18.setText(_translate("Dialog", "Back"))
        self.pushButton_19.setText(_translate("Dialog", "Exit"))
    

    if name == "main":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()
    sys.exit(app.exec_())


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Please use proper coding tags otherwise it makes you post unreadable.

    You should also explain what exactly is your issue, what you tried, what you got, etc. Throwing that many code without any explanation does not motivate people to take a look at your problem.


Log in to reply