Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81008

Re: How to access Qt components loaded from file?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.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.046
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'subject:file': 0.07; 'function:': 0.09; 'subject:How': 0.10; 'def': 0.12; 'mean,': 0.16; 'subject:access': 0.16; 'thanks,': 0.17; 'working.': 0.19; 'this?': 0.23; 'this:': 0.26; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'skip:m 60': 0.31; 'slot': 0.31; 'skip:m 30': 0.32; 'run': 0.32; 'subject:from': 0.34; "can't": 0.35; 'received:google.com': 0.35; 'there': 0.35; 'right?': 0.36; 'web,': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; '8bit%:6': 0.40; 'within': 0.65; 'continuous': 0.68; 'special': 0.74; 'locked': 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 :content-type; bh=vlUvo2IX8svwSM2MEURTJr059wYg9CFDRXvCoHaNc7Y=; b=WfFjqhQ4tUJwMz+QCgbsYXdjE23z1njeHeL0/UMVTIMiW8ypLduO/0SQshRUcFakyp 7dNjs3gxLIrAp51jw5wrWU25aKgyOtqY54DvJkGhEmPjkl6hdpNEpFB3wCfke5zKkDSI HKOgcG/oYTTPxlOJRDmatcJ3cZgaSeuMO9BAWlpiV/ai71EJALDAreKm+j47NCY+spFG e2wtS0AHUHXSdjupof1U0WfI95GESYbJtb9CAII7Tyx9Ia6CRDistbjPfA9S9U6M/JSJ ah/Y2X284TbAMpUEwuqIwewGiplx8MYKAcuM2CEyrX/0fXXeka6WzMZWj9FPIC1tDefS zPyw==
X-Received by 10.229.111.201 with SMTP id t9mr45118445qcp.9.1416334513995; Tue, 18 Nov 2014 10:15:13 -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>
From Juan Christian <juan0christian@gmail.com>
Date Tue, 18 Nov 2014 18:15:13 +0000
Subject Re: How to access Qt components loaded from file?
To python-list@python.org
Content-Type multipart/alternative; boundary=001a11330fb497071c05082613c7
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.15980.1416334522.18130.python-list@python.org> (permalink)
Lines 58
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416334522 news.xs4all.nl 2963 [2001:888:2000:d::a6]:47920
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81008

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

>
> You can't have a slot like this:
>
> MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test()))
>
> because that's mean: "connect to the return of
> MainWindow.txtbox.setText(test())" and it's not possible at this stage
> of your program.
>
> Use instead a function:
>
> MainWindow.btn.clicked.connect(my_slot) # No parenthesis !
>
> def my_slot():
>      MainWindow.txtbox.setText(test())
>

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?

I mean, when I run the program I'm locked in the app.exec_() continuous
loop right? So I can't have a loop to get this data from the web, is there
any special signal/slot regarding this?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How to access Qt components loaded from file? Juan Christian <juan0christian@gmail.com> - 2014-11-18 18:15 +0000

csiph-web