Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'app,': 0.09; 'buttons': 0.09; 'rows': 0.09; 'skip:/ 10': 0.09; 'python': 0.11; 'archive': 0.14; 'complaining': 0.16; 'context:': 0.16; 'missing?': 0.16; 'there...': 0.16; 'ui,': 0.16; 'code,': 0.22; 'looks': 0.24; "i've": 0.25; 'this:': 0.26; 'asking': 0.27; 'tried': 0.27; 'designer': 0.30; "i'm": 0.30; 'loads': 0.31; 'skip:= 20': 0.31; 'file': 0.32; 'run': 0.32; 'url:python': 0.33; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'really': 0.36; 'charset:us-ascii': 0.36; 'changing': 0.37; 'so,': 0.37; 'list': 0.37; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'simple': 0.61; 'show': 0.63; 'name': 0.63; 'within': 0.65; 'life': 0.66; 'layout.': 0.84 Date: Tue, 22 Oct 2013 06:01:26 -0700 (PDT) From: Forsgren To: python-list@python.org Subject: PY QT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382446925 news.xs4all.nl 15893 [2001:888:2000:d::a6]:37160 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57256 I'm really embarrassed to be asking this, I feel that there is a really simple answer to this, but I cant for the life of me find it. So, I have this app, which loads a ui, which has a scrollarea that is a parent to a gridlayout. So in QT designer it looks like this: />someParentWidgets > scrollArea > myGridLayout/ I then want to add a couple of Qtool buttons to the GridLayout within my python code, so i run a forloop: /> for name in mylist: > btn =QtGui.QToolButton() > btn.setText(str(name)) > > cols = self.myGridLayout.count()%6 > rows = int(self.myGridLayout.count()/6) > self.myGridLayout.addWidget(btn,rows,cols)/ No errors, no complaining what so ever, but the buttons isn't showing in the layout. The thing is if I change my ui file to />someParentWidgets > myGridLayout / The buttons show perfectly fine! What am I missing? I've tried changing the GridLayout to a verticalLayout, but same thing there... -- View this message in context: http://python.6.x6.nabble.com/PY-QT-tp5036684.html Sent from the Python - python-list mailing list archive at Nabble.com.