Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81040
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <juan0christian@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'configure': 0.05; 'subject:file': 0.07; 'sys': 0.07; '"__main__":': 0.09; '__name__': 0.09; 'deploy': 0.09; 'image,': 0.09; 'indeed,': 0.09; 'working:': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'def': 0.12; 'gui': 0.12; '(when': 0.16; 'buttons,': 0.16; 'interval,': 0.16; 'interval.': 0.16; 'stuff.': 0.16; 'subject:access': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'bit': 0.19; 'app': 0.19; 'working.': 0.19; 'import': 0.22; '(in': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'tue': 0.24; 'decide': 0.24; 'fairly': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'nearly': 0.26; 'defined': 0.27; 'testing': 0.29; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'getting': 0.31; 'operations.': 0.31; 'skip:q 20': 0.31; "user's": 0.31; 'skip:m 30': 0.32; 'interface': 0.32; 'url:python': 0.33; 'proceed': 0.33; 'sense': 0.34; 'maybe': 0.34; 'subject:from': 0.34; 'basic': 0.35; 'info': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'right?': 0.36; 'url:listinfo': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'two': 0.37; 'being': 0.38; 'christian': 0.38; 'configured': 0.38; 'nov': 0.38; 'skip:m 40': 0.38; 'little': 0.38; 'skip:& 20': 0.39; 'either': 0.39; 'called': 0.40; 'url:mail': 0.40; 'how': 0.40; 'balance': 0.61; 'traffic': 0.61; 'simple': 0.61; "you're": 0.61; 'complete': 0.62; 'pick': 0.64; 'talking': 0.65; 'to:addr:gmail.com': 0.65; 'within': 0.65; 'periodically': 0.68; '5:15': 0.84; 'etc,': 0.84; 'locked': 0.84; 'mistaken': 0.84; 'working,': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to:cc :content-type; bh=Ga2ek/+6RQFyVKaAFpa0pUqFVSyTr2dnCDbtSSAIyIo=; b=mgcPVL2q1BpRPDITvH5DPXLbaRhuL+4Yip8yscYA6cRLhXoAurk5sKnJwX75xSFcrs ZW8O9BnW/uBaHnhlycPT6v7P+MnDhOHbejRlcff7P8fyDT8ifBiTVtYgHSBlJ/ZInCbV HlzA7lhC/BS31qFxTl6pB/NymOENIYhx4U0n+epxOUw+EWF8c22q+OHLl7MdHtwuXafq /mQr4dlAZG+n69KCqrBYBsNsTB8UsEb71Ktv5du+FNf29WxCBSG/hea+FD0JBQJi0WtJ NgkBghO++oyna36dcRVfPhAmPDVHMK+SL/XsS1bHTegp2floHfEo0czK9eIUxHwMo8bZ fzNg== |
| X-Received | by 10.140.30.33 with SMTP id c30mr27110697qgc.32.1416430052355; Wed, 19 Nov 2014 12:47:32 -0800 (PST) |
| MIME-Version | 1.0 |
| References | <CAAp0bGvE_4gONgiAOjW7K2XNY7cUJz5xPB7o9rGdGS=BXCwHCQ@mail.gmail.com> <546B3FE4.3050204@telenet.be> <CAAp0bGuiJaU6jeK5uzwyhfax1tm5PBesxwByt-En5mU2v0+8Zg@mail.gmail.com> <CAAp0bGu5z-jPm4cgm1u1CfwQPpDqy9G1A3ciwmaaSJcCrBeSPA@mail.gmail.com> <546B6A4B.90107@telenet.be> <CAAp0bGttSSzLL_K_vzWRb+E+mAHdSYVk-8PSARFKG=JWJ4rMng@mail.gmail.com> <CAPTjJmpxbnMKFwcb+JFZtCS2yFTEWK7M58NdPUMNPmxLqFw0dQ@mail.gmail.com> |
| From | Juan Christian <juan0christian@gmail.com> |
| Date | Wed, 19 Nov 2014 20:47:31 +0000 |
| Subject | Re: How to access Qt components loaded from file? |
| To | Chris Angelico <rosuav@gmail.com> |
| Content-Type | multipart/alternative; boundary=001a113aac4e1eb6d805083c52a9 |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16000.1416430060.18130.python-list@python.org> (permalink) |
| Lines | 122 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1416430060 news.xs4all.nl 2926 [2001:888:2000:d::a6]:58431 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:81040 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Let's say that I want to call the site in a 5min interval. I'm currently
getting the info this way just for testing and to know that the 'core
engine' is working, and indeed, it's working:
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
MainWindow = loadui("main.ui")
def output_slot():
MainWindow.txtbox.setText(call_site())
MainWindow.btn.clicked.connect(output_slot)
MainWindow.show()
app.exec_()
How can I proceed if I want the txtbox to automatically do the
'setText(call_site())' in a X defined interval? The final app will have not
only a txtbox, but a complete interface with buttons, avatar image, some
txtboxes, and all that stuff. If I know how to "call the site" in a defined
interval, I can get all the info that I need and set them one by one.
If I'm not mistaken my app is locked in the app.exec_() loop, so I need to
have a trigger configured that will be called in a defined interval, then
inside this trigger I configure the "set_avatar", "set_text",
"set_btn_link", etc, is that right?
On Tue Nov 18 2014 at 9:37:21 PM Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Nov 19, 2014 at 5:15 AM, Juan Christian
> <juan0christian@gmail.com> wrote:
> >
> > Thanks, it's working. What would be a "professional" approach if I want
> to
> > constantly call a URL to get it's content and access this data within the
> > GUI?
> >
>
> "Constantly" doesn't make much sense when you're talking about network
> operations. There are two basic approaches: either you re-fetch
> periodically and update the GUI (in which case you have to decide how
> frequently), or you re-fetch on some trigger (when it's changed, or
> when the user's about to need it, or something). Either way, you have
> to balance network traffic versus promptness of update, and it's
> nearly impossible to pick perfectly. But if you don't mind it being a
> little clunky, you should be able to pick something fairly simple and
> deploy it, and then maybe refine it a bit afterward.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-19 20:47 +0000
Re: How to access Qt components loaded from file? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-11-19 12:56 -0800
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-20 02:53 +0000
Re: How to access Qt components loaded from file? Michael Torrie <torriem@gmail.com> - 2014-11-20 08:37 -0700
Re: How to access Qt components loaded from file? Michael Torrie <torriem@gmail.com> - 2014-11-20 08:41 -0700
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-20 17:57 +0000
Re: How to access Qt components loaded from file? Michael Torrie <torriem@gmail.com> - 2014-11-20 12:06 -0700
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-20 19:36 +0000
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-20 19:37 +0000
Re: How to access Qt components loaded from file? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-20 21:06 +0000
Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-20 21:19 +0000
Re: How to access Qt components loaded from file? Rustom Mody <rustompmody@gmail.com> - 2014-11-22 18:15 -0800
csiph-web