ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

29 January 2021
2021-01-29×
29 January 2021
Фотография
click to show
how to pick [setCurrentItem] the item just under the parent item(not the parent's children) ?
I
i'm working with QTreeWidget class
T
it will be less complex to handle input and types.
T
Back in 2009 I think
I
or maybe the master
and agreed on using QTreeView and a separate model instead for all but the simplest usages
F
(from the docs: "Developers who do not need the flexibility of the Model/View framework can use this class to create simple hierarchical lists very easily. A more flexible approach involves combining a QTreeView with a standard item model. This allows the storage of data to be separated from its representation.")
I
Фотография
click to show
i've got on more question, i want do make it possible, for the items not get duplicated, what's the best way doing this?
A
Hi, some funny code I struggled with it last hour :D .. swap 2 widgets in layout ` to_remove = sorted( ((source_index, source_w), (sink_index, sink_w)), key=lambda x: x[0], reverse=True) self._layout.removeWidget(to_remove[0][1]) self._layout.removeWidget(to_remove[1][1]) self._layout.insertWidget(to_remove[1][0], to_remove[0][1]) self._layout.insertWidget(to_remove[0][0], to_remove[1][1]) `
Hey all, Thanks for all the help I have been gettng here. so, i am kinda on the last stage of my univ project. however,i have been having issues regarding the size of a logo image. Can anyone help me with the correct way to add an image in such a way that it doesn't look weird compared to the original one.
I
https://justpaste.it/9a1ad This contains the part of the code I have been using to resize the label and how i intend it to look..I have looked at countless Stack overflow responses but havent been able to get it work
A
pixmap.scaled(new_size, Qt.KeepAspectRatio, Qt.SmoothTransformation)
A
this depends in the size you passed as the first argument anyway, show us minimal code to reproduce your issue,
I didn't notice the second message while writing my first response,, let me check
A
this will stick to your size, while keeping the scaling smooth (better interpolation quality) pixmap.scaled(new_size, Qt.IgnoreAspectRatio, Qt.SmoothTransformation)
Calendar: January 2021
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog