Submission deadline in::

Welcome to visit Open Karelia:

You are here

Problem with progress bar(PyQt)

27 posts / 0 new
Last post
lagutinans
Problem with progress bar(PyQt)

We have a some problem with progress bar, because of such kind of progress bar as QProgressBar doesn't allow us to display progress in action with a unknown duration. Can you help us with search solution of this problem?

We have a problem with viewing media content from QWebView. If content is displayed by method QWebView.setUrl(QUrl(...)) when media is displayed correctly, but method setHtml(QString(...))don't display media. For example:
(with setHtml)
[code]
import sys

from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4.QtWebKit import *

class ViewMessage(QtGui.QMainWindow):
    def __init__(self, parent = None):
        """
        initialization viewing window
        @return
        """
        super(ViewMessage, self).__init__(parent)

        #connect plugins for video
        QWebSettings.globalSettings().setAttribute(QWebSettings.PluginsEnabled,
                                                   True)
        QWebSettings.globalSettings().setAttribute(QWebSettings.JavaEnabled,
                                                   True)
        #our proxy(if it is needed)
        #from PyQt4.QtNetwork import QNetworkProxy
        #proxy = QNetworkProxy(QNetworkProxy.HttpProxy, "proxy.karelia.ru", 81)
        #QNetworkProxy.setApplicationProxy(proxy)
       
        self.view_mes_widget = QWebView()
              
        text5 = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\
        <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\
        <title>iframe</title><style type="text/css">HTML, BODY { background:transparent; padding:0; margin:0; border:0; overflow:hidden; }</style>\
        </head><body><object style="height: 344px; width: 425px;"><param value="http://www.youtube.com/v/3eLKrECd4x8" name="movie" />\
        <param value="true" name="allowFullScreen" /><param value="always" name="allowScriptAccess" />\
        <embed height="344" width="425" allowfullscreen="true" type="application/x-shockwave-flash" src="http://www.youtube.com/v/3eLKrECd4x8">\
        </embed></object></body></html>'
          
        self.view_mes_widget.setHtml(text5)
        self.view_mes_widget.show()

        self.setCentralWidget(self.view_mes_widget)
        self.show()
[/code]
(with setUrl)
[code]
import sys

from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4.QtWebKit import *

class ViewMessage(QtGui.QMainWindow):
    def __init__(self, parent = None):
        """
        initialization viewing window
        @return
        """
        super(ViewMessage, self).__init__(parent)

        #connect plugins for video
        QWebSettings.globalSettings().setAttribute(QWebSettings.PluginsEnabled,
                                                   True)
        QWebSettings.globalSettings().setAttribute(QWebSettings.JavaEnabled,
                                                   True)
        #our proxy(if it is needed)
        #from PyQt4.QtNetwork import QNetworkProxy
        #proxy = QNetworkProxy(QNetworkProxy.HttpProxy, "proxy.karelia.ru", 81)
        #QNetworkProxy.setApplicationProxy(proxy)
                      
        self.view_mes_widget = QWebView()
        self.view_mes_widget.setUrl(QtCore.QUrl("embed.html"))
       
        self.view_mes_widget.show()
        self.setCentralWidget(self.view_mes_widget)
        self.show()
[/code]
 Only second example display media, though file "embed.html" contains  the same html code. 
P.S.:
Just in case this is a code from "main.py" file:

[code]
import sys
import os

def main():
    """
    this function starts application
    """

    from PyQt4 import QtGui
    app = QtGui.QApplication(sys.argv) # Note: we can't draw dialog box in
  
    from ViewMessage import ViewMessage
    home_window = ViewMessage()
   
    app.exec_()
    sys.exit()

if __name__ == "__main__":
    os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
    main()

[/code]

lagutinans
You can also ask here http:/
lagutinans
Thank's! Less correct:

Thank's! Less correct: progress.setValue(100*(1-sqrt(BASE/i)))) (value of sqrt should tend to 0)

lagutinans
yes, it was misprint, finaly

yes, it was misprint, finaly you got the idea.

[quote="zaiceva"]Thank's! Less correct: progress.setValue(100*(1-sqrt(BASE/i)))) (value of sqrt should tend to 0)[/quote]

 

lagutinans
Please attach your embed.html

Please attach your embed.html file

lagutinans
I have already told that html

I have already told that html code in embed.html is the same as in example.  I can't attach this file.(not supports extension ".txt" or ".html") and write content this file below:

[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>iframe</title>
<style type="text/css">HTML, BODY { background:transparent; padding:0; margin:0; border:0; overflow:hidden; }</style></head>
<body>
<object style="height: 344px; width: 425px;">
<param value="http://www.youtube.com/v/3eLKrECd4x8" name="movie" />
<param value="true" name="allowFullScreen" />
<param value="always" name="allowScriptAccess" />
<embed height="344" width="425" allowfullscreen="true" type="application/x-shockwave-flash" src="http://www.youtube.com/v/3eLKrECd4x8">
</embed>
</object>
</body>
</html>
[/code]

fitriulina
I visited several web pages

I visited several web pages but the audio feature for audio songs existing at this web site is actually wonderful.

madden mobile hack
pokemon go astuce

Mendy345
Progress bar

I've never faced a problem with a progress bar on the book report writing service website. However, I noticed it while creating new program on the new platform StudyGo. It can be connected with the popularity of edu sites.

frutty
Thank you very much!

Thank you very much!

frutty
Thank you very much!

Thank you very much!

192.168.o.1
robertkirk
It wa sa very good

It wa sa very good explanation on the progree bar and never knew there might be a problem arising to it in this way. And you have given the best solution to it also as i can now include this in my superior essay papers writing to make my assignments. 

Yegorov256
good to resume the link to

good to resume the link to transfer even more files again. shareit download for pc by clicking on below download switch. Currently best.

Watson115
good you can type, Mobdro in

good you can type, Mobdro in the app shop of the emulator mobdro sports documents from below. Dual click on the APK best.

Hblines
everyone knows prosperity

everyone knows prosperity created field convenient workstation speed matters well to convey the dare to client on time. thus, i gained ASUS ROG G751JY-DH71 Laptop as per normal procedure it has windows 8 and i changed it to windows 7 now i start my wander yet when i opened the web wander it's plan is altogether trouble again i check it on PC it's working fine check a couple time yet didn't put everything in order in case anyone have here this course of action of tablet liberally check it once and share screen shot. Furthermore if it's driver issue or whatever else so thoughtfully recommend me. My website and underneath i share the screen shot of both compact PC and PC altruistically consider it and recommend me a better than average plan.

 

jiya
You have provided a topic

You have provided a topic based on the problems with the progress bar. But you didn’t provide any problems related to the progress bar. Due to this, I am having some problems with the display. Please provide the cause, symptoms and the methods to solve this problem. face masks

angelamaria
Useful info

Actually, your post helped me to get some idea about the term, progress bar. The regarding this bar is not at all clear to me. When did this error occur? Is it while executing it or compiling it? Could you please provide more details about it? remove pop ups

Alvina Ria
It wa sa very good

It wa sa very good explanation on the progree bar and never knew there might be a problem arising to it in this way. And you have given the best solution to it also as i can now include this in my dissertation service writing to make my assignments.

rosesandra
Best and Low Rate Services

It wa sa very good explanation on the progree bar and never knew there might be a problem arising to it in this way. And you have given the best solution to it also as i can now include this in my custom writing to make my assignments. 

Adolf alexander
tablet

This tablet has been among the numerous planets from associate in nursing beginning period as energetically as Do my Dissertation in quickened headquartered phrases a humble pack of persona counsel of what multivitamins unit of measure. 

 

soujiaishua
tutu helper apk

tutu helper apk    is indeed a helper and will solve all the problems that you have. It is a mini app store that allows you to install the apps

hellenjos
I didn’t get any idea about

I didn’t get any idea about the progress bar. What is the specialty of this progress bar? It would be better if you explain the details here so that we can learn more about this. The code section is very tough and is not clear to me. https://www.meritotreatment.com/

milanjoy
nice topic

Actually, I have been searing for this information past two days. I have gone through the steps and it works effectively. I am grateful for the description here. Keep continuing to share more and more videos like this. original orkopina cleaning services

chensolo
Wholesale Nike Air Max Shoes
contomlon
Nice article :)

Very helpful advice in this particular post! It’s the little changes that make the largest changes. Thanks for sharing!

 

 

- - - Choi Minzi - - - 

Sorry Not Sorry lyrics

 

riley7
I also have a similar issue!

I also have a similar issue! Thanks for your response!
GoMovies - Free movies and TV series online

192.168.0.1 router help

kimyung
sdfds

dfsd

kimyung
nee it
Log in or register to post comments