Skip to main content
removeu 9 caracteres do conteúdo
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
 from modules import progressbar 
 
 Progressbarprogressbar.ProgressBar("TITULO AQUI")
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class MyCustomWidgetProgressBar(QtGui.QWidget):

    def __init__(self,title):
        super(MyCustomWidgetProgressBar, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.MyCustomWidgetProgressBar("Test")
            window.show()
            app.exec_()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
 from modules import progressbar 
 
 Progressbar("TITULO AQUI")
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class MyCustomWidget(QtGui.QWidget):

    def __init__(self,title):
        super(MyCustomWidget, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.MyCustomWidget("Test")
            window.show()
            app.exec_()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
 from modules import progressbar 
 
 progressbar.ProgressBar("TITULO AQUI")
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class ProgressBar(QtGui.QWidget):

    def __init__(self,title):
        super(ProgressBar, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.ProgressBar("Test")
            window.show()
            app.exec_()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
adicionou 1 caractere ao conteúdo
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class ProgressBarMyCustomWidget(QtGui.QWidget):

    def __init__(self,title):
        super(ProgressBarMyCustomWidget, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.ProgressBarMyCustomWidget("Test")
            window.show()
            app.execexec_()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class ProgressBar(QtGui.QWidget):

    def __init__(self,title):
        super(ProgressBar, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.ProgressBar("Test")
            window.show()
            app.exec()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class MyCustomWidget(QtGui.QWidget):

    def __init__(self,title):
        super(MyCustomWidget, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.MyCustomWidget("Test")
            window.show()
            app.exec_()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
removeu 9 caracteres do conteúdo
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class MyCustomWidgetProgressBar(QtGui.QWidget):

    def __init__(self,title):
        super(MyCustomWidgetProgressBar, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.MyCustomWidgetProgressBar("Test")
            window.show()
            app.exec()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class MyCustomWidget(QtGui.QWidget):

    def __init__(self,title):
        super(MyCustomWidget, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.MyCustomWidget("Test")
            window.show()
            app.exec()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
from PyQt4 import QtCore
from PyQt4 import QtGui
import time
import sys
import qdarkstyle

class ProgressBar(QtGui.QWidget):

    def __init__(self,title):
        super(ProgressBar, self).__init__()
        layout = QtGui.QGridLayout(self)
        self.title = title

        label = QtGui.QLabel()

        label.setText(self.title)
        label.setAlignment(QtCore.Qt.AlignCenter)
        layout.addWidget(label)
        # Create a progress bar and a button and add them to the main layout
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setRange(0,1)
        layout.addWidget(self.progressBar)

        self.myLongTask = TaskThread()
        self.myLongTask.taskFinished.connect(self.onFinished)
        self.onStart()

    def onStart(self):
        self.progressBar.setRange(0,0)
        self.myLongTask.start()

    def onFinished(self):
        # Stop the pulsation
        self.progressBar.setRange(0,1)


class TaskThread(QtCore.QThread):
    taskFinished = QtCore.pyqtSignal()
    def run(self):
        time.sleep(30)
        self.taskFinished.emit()
# -*- coding: utf-8 -*-
import sys, time
from PyQt4.QtGui import  QMessageBox, QMainWindow, QApplication
from PyQt4.uic import loadUi
import qdarkstyle

from .modules import tricks
from .modules import progressbar 


    class PyAuto(QMainWindow):
        def __init__(self):
            super(PyAuto, self).__init__()
    
            # instances
            self.ui = loadUi('Pyauto/views/menu.ui', self)
            self.ui.test.clicked.connect(self.test_progressbar)
            self.ui.show()

        def test_progressbar(self):
           
            window = progressbar.ProgressBar("Test")
            window.show()
            app.exec()
    
        
    
    if __name__ == '__main__':
    
        app = QApplication(sys.argv)
        app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))   # set stylesheet dark
        myWindow = PyAuto()
        app.exec_()
adicionou 1132 caracteres ao conteúdo
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
Carregando
adicionou 1132 caracteres ao conteúdo
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
Carregando
Fonte Link
rodgomesc
  • 194
  • 1
  • 10
Carregando