<filename>py_examples/desktop.py<gh_stars>0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT

class QProgBar(QProgressBar):

    value = 0

    @pyqtSlot()
    def increaseValue(progressBar):
        progressBar.setValue(progressBar.value)
        progressBar.value = progressBar.value+1

# Create an PyQT4 application object.
a = QApplication(sys.argv)

# The QWidget widget is the base class of all user interface objects in PyQt4.
w = QWidget()

# Set window size.
w.resize(320, 240)

# Set window title
w.setWindowTitle("PyQT4 Progressbar @ pythonspot.com ")

# Create progressBar.
bar = QProgBar(w)
bar.resize(320,50)
bar.setValue(0)
bar.move(0,20)

# create timer for progressBar
timer = QTimer()
bar.connect(timer,SIGNAL("timeout()"),bar,SLOT("increaseValue()"))
timer.start(400)

# Show window
w.show()

sys.exit(a.exec_())



# from kivy.app import App
# from kivy.uix.button import Button
# from kivy.uix.boxlayout import BoxLayout
#
# class TestApp(App):
#     def build(self):
#         layout = BoxLayout(orientation='vertical')
#         btn1 = Button(text='Hello')
#         btn2 = Button(text='World')
#         layout.add_widget(btn1)
#         layout.add_widget(btn2)
#         return layout
#
# TestApp().run()
<filename>py_examples/desktop.py<gh_stars>0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT

class QProgBar(QProgressBar):

    value = 0

    @pyqtSlot()
    def increaseValue(progressBar):
        progressBar.setValue(progressBar.value)
        progressBar.value = progressBar.value+1

# Create an PyQT4 application object.
a = QApplication(sys.argv)

# The QWidget widget is the base class of all user interface objects in PyQt4.
w = QWidget()

# Set window size.
w.resize(320, 240)

# Set window title
w.setWindowTitle("PyQT4 Progressbar @ pythonspot.com ")

# Create progressBar.
bar = QProgBar(w)
bar.resize(320,50)
bar.setValue(0)
bar.move(0,20)

# create timer for progressBar
timer = QTimer()
bar.connect(timer,SIGNAL("timeout()"),bar,SLOT("increaseValue()"))
timer.start(400)

# Show window
w.show()

sys.exit(a.exec_())



# from kivy.app import App
# from kivy.uix.button import Button
# from kivy.uix.boxlayout import BoxLayout
#
# class TestApp(App):
#     def build(self):
#         layout = BoxLayout(orientation='vertical')
#         btn1 = Button(text='Hello')
#         btn2 = Button(text='World')
#         layout.add_widget(btn1)
#         layout.add_widget(btn2)
#         return layout
#
# TestApp().run()
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Create an PyQT4 application object. # The QWidget widget is the base class of all user interface objects in PyQt4. # Set window size. # Set window title # Create progressBar. # create timer for progressBar # Show window # from kivy.app import App # from kivy.uix.button import Button # from kivy.uix.boxlayout import BoxLayout # # class TestApp(App): #     def build(self): #         layout = BoxLayout(orientation='vertical') #         btn1 = Button(text='Hello') #         btn2 = Button(text='World') #         layout.add_widget(btn1) #         layout.add_widget(btn2) #         return layout # # TestApp().run()