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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #62 · 4 апр.

Когда разрабатываете свой GUI с помощью PyQt для какого-либо софта бывает необходимо позаимствовать цвета из текущего стиля интерфейса. Например, чтобы правильно раскрасить свои виджеты, подогнав их по цвету. Ведь бывает, что ваш GUI используется в разных софтах. Причём некоторые со светлой темой а другие с тёмной. По умолчанию стили наследуются, но если вы задаёте какую-либо раскраску для части виджета через свой styleSheet, то требуется ссылаться на цвета текущего стиля. Как это сделать? Как получить нужный цвет из палитры имеющегося стиля? Это достаточно просто, нужно использовать класс QPalette и его роли. Например, мне нужно достать цвет текста из одного виджета и применить его в другом как цвет фона (не важно зачем именно так, просто захотелось😊). Получаем палитру виджета и сразу достаём нужный цвет, указав его роль. from PySide2.QtGui import QPalette color = main_window.palette().color(QPalette.Text) теперь можем использовать этот цвет в стилях my_widget.setStyleSheet(f'background-color: {color.name()};') Готово, мы динамически переопределили дефолтный стиль используя текущий стиль окна! На самом деле есть запись покороче, в одну строку и без лишних переменных. Не очень-то по правилам CSS, но Qt это понимает. my_widget.setStyleSheet('background-color: palette(Text);') Этот способ не подходит если вам нужно как-то модифицировать цвет перед применением в своих стилях. В этом случае потребуется первый способ. Зато он прекрасно сработает в файле .qss, то есть не придётся в коде прописывать раскраску отдельных элементов через ссылки на палитру, всё красиво сохранится в отдельном файле .qss! QListView#my_widget::item:selected { background: palette(Midlight); } Про имеющиеся роли можно почитать здесь🌍 #qt#tricks

Hashtags

Резултати

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

Пребарај: #pricinganalyst

当前筛选 #pricinganalyst清除筛选
Data Science Jobs

@datasciencejobs · Post #2528 · 24.01.2025 г., 15:41

#vacancy#remote#dataanalyst#pricinganalyst#вакансия#удалённо Position: Pricing Data Analyst Company: Borzo (same day delivery service) Salary Range: up to 4500$ (negotiable) Employment is available in Armenia, Russia, India and Portugal. Work format: full-time, remote from any country About company Borzo is one of the biggest and most technologically advanced players in the global same-day delivery market. We provide unparalleled convenience to businesses and people, all the while creating millions of self-managed courier jobs. We strive to make delivery easier and cheaper than getting out of a house or office. We operate in multiple countries with India as the top priority, and already deliver more than 1,500,000 parcels monthly. To remain on the forefront of this promising, often surprising yet already highly competitive market, each day we have to learn more about our users than we knew yesterday and than our peers understand now. We are looking for experienced full-time Pricing Data Analyst to play a pivotal role in Borzo's growth journey. You will be working as a part of the Marketplace team with a functional reporting to the Lead of Analytics. Your mission will be to help the team to grow marketplace earnings and/or volumes within SLA constraints by continuously improving our base and dynamic pricing algorithms both for clients and couriers. What you will do • Build statistical, optimization, and machine learning models in base and dynamic pricing; • Design and execute experiments and interpret the results to draw detailed and actionable conclusions; • Help the team to find critical product/pricing problems, develop impactful hypotheses and recommend action plans. Required experience and skills • 3+ years experience as a Product Analyst, Data Analyst, or another type of data analysis-focused functions; • Experience in algorithm development and prototyping; • Successful application of base and dynamic pricing optimization models and algorithms; • Advanced proficiency in data interpretation (critical thinking, identifying biases or limitations, evaluating data source reliability, solid knowledge of statistics); • Proficiency in data manipulation (cleaning, transforming, and reshaping data, experience with Python); • Advanced SQL expertise (optimizing queries for performance, CTE, window functions); • English level B2. You will get • Opportunity to make a difference: you will influence company revenue directly; • No bureaucracy—direct communication with all stakeholders; • Flexible schedule: work at your convenience. No overtime; • Remote work or an office in any country of our presence; • Industry leaders in the company’s management; • Co-workers from 5 countries with diverse cultural backgrounds; • Competitive income with social benefits and medical insurance from day one; • Optional relocation to Portugal after 2+ years; • All necessary work equipment provided. tg: @rom4lk