TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #110 · 3 јул.

Есть у QLabel есть одна особенность. Её минимальный размер определяется текстом, который в неё записан. Это приводит к тому что длинный текст принудительно увеличивает ширину интерфейса. В большинстве случаев это выглядит плохо. Как с этим бороться? 🔸 Обрезать текст заранее, задав лимит по длине строки. В этом случае мы теряем часть визуальной информации. Не всегда угадаешь нужный размер. В разных OS шрифт используется разный. 🔸 Делать перенос строки. Тогда мы получим изменение размера в другую сторону, что тоже поломает интерфейс. 🔸 Переопределить paintEvent() и сделать кастомный рендеринг текста. Можно, но слишком сложно для такой задачи. Проще всего обрезать текст под текущий размер виджета используя класс QFontMetrics. Он имеет готовый метод elidedText(), который просто вызываем по событию resizeEvent. Я также добавил установку ToolTip чтобы всегда можно было увидеть полный текст при наведении курсора. 🌎 Код здесь #qt#source

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #datatransparency

当前筛选 #datatransparency清除筛选
AI & Law

@ai_and_law · Post #87 · 18.08.2023 г., 07:04

US: News Outlets Call for Transparency in AI Data Usage Hello everyone! A collective of news organizations has issued an open letter advocating for stricter regulations to safeguard copyright and ensure transparency in the use of training data for generative AI models. The open letter urges global lawmakers to enforce rules demanding data transparency, rights holders' consent for training data usage, and provisions for media companies to negotiate with AI model operators. It also calls for AI firms to tackle bias and misinformation and identify AI-generated content. Signatories include Agence France-Presse, Getty Images, The Associated Press, and more. They argue that foundation models using media content without proper consideration undermine media diversity and financial viability. The call comes in light of Google's AI news writing tool and concerns over AI training on copyrighted content. The US Senate and legal cases have addressed these issues, emphasizing the need to protect creators' rights. #AIandMedia#AIRegulation#DataTransparency#CopyrightProtection