#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import (QApplication, QComboBox, QDialog,
QDialogButtonBox, QFormLayout, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QLineEdit, QMenu, QMenuBar, QPushButton, QSpinBox, QTextEdit,
QVBoxLayout)
import sys
class Dialog(QDialog):
def __init__(self):
super(Dialog, self).__init__()
global layout
layout = QVBoxLayout()
button = QPushButton("Click", self)
button.move(50, 50)
button.clicked.connect(self.sloter)
button2 = QPushButton("Clicker", self)
button2.move(50, 100)
button2.hide()
self.button2 = button2
self.show()
def sloter(self):
self.button2.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
dialog = Dialog()
sys.exit(dialog.exec_())
боже спаси от говнокода
====
как раз ваща проблема тут
thecodeinn.blogspot.com/2013/09/dynamically-adding...