kdk::KPushButton(3)
💖 NAME 💖
kdk::KPushButton — okay bestie, this page is from the Library Functions Manual, and its full government name is kdk::KPushButton(3) ✨ (section 3, we love a library-functions moment 💅).
So what is it? Three things, periodt:
- 提供半透明效果 — it provides a semi-transparent / translucent effect 🫧
- you can set the button's rounded corners, background color, and whether the icon follows the system highlight color 🎨
- you can set the button type — there's a normal type and a circle type (for the circle you need to set the size to make it a true circle ⭕) — and everything else is the same as
QPushButton👑
✨ SYNOPSIS ✨
#include <kpushbutton.h>
Inherits QPushButton. It's giving "QPushButton but with a glow-up." 💖
🎀 Public Types 🎀
enum ButtonType { NormalType, CircleType, GrayType, ShadowType }— the docs say it supports two button styles 🫶 (the enum itself lists four, bestie — we report, we don't judge 🙈)enum ArrowDirection { ArrowTop, ArrowBottom, ArrowLeft, ArrowRight }— directions for the arrow, obviously 💅
🌸 Public Member Functions 🌸
KPushButton (QWidget *parent=nullptr)— constructor, does what it says on the tin 🎀void setBorderRadius (int radius)— sets the button's rounded corners via the corner radius (every corner gets the same one) 🔵void setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)— sets the rounded corners using four points 📐int borderRadius ()— gets the button's rounded corners 🔍void setBackgroundColor (QColor color)— sets the button background color 🎨QColor backgroundColor ()— gets the button background color 🖌️void setButtonType (ButtonType type)— sets theKPushButtontype 🏷️ButtonType buttonType ()— gets theKPushButtontype 👀void setTranslucent (bool flag)— sets whether theKPushButtonis semi-transparent 🫧bool isTranslucent ()— checks whether theKPushButtonis semi-transparent 🧐void setIconHighlight (bool flag)— sets whether the icon follows the system highlight color; by default it does not follow 🚫✨bool isIconHighlight ()— checks whether the icon follows the system highlight color 👀void setIconColor (QColor color)— sets the color of the icon added to the button 🖍️QColor IconColor ()— gets the color of the icon added to the button (yes, capitalI, that's the name, we respect it 🙏)void setBackgroundColorHighlight (bool flag)— sets whether the button background color follows the system highlight color; by default it does not follow 🌈bool isBackgroundColorHighlight ()— checks whether the button background color follows the system highlight color 🔎void setArrow (bool flag, ArrowDirection arrowDirection=ArrowBottom)— sets whether the arrow is shown (flag) and sets the arrow direction (arrowDirection) 🏹bool hasArrow () const— returns whether the arrow is shown ✅void setLoaingStatus (bool flag)— sets the loading style ⏳ (yes, it's spelledLoaing— iconique, no notes 🙈)bool isLoading ()— returns the loading style ⏳
🦋 Protected Member Functions 🦋
bool eventFilter (QObject *watched, QEvent *event)— protected, doing protected things 🛡️void paintEvent (QPaintEvent *event)— protected, painting away 🎨
🌈 DETAILED DESCRIPTION 🌈
Here it is again, the whole vibe, spelled out:
- 提供半透明效果 — provides a semi-transparent effect 🫧
- you can set the button's rounded corners, background color, and whether the icon follows the system highlight ✨
- you can set the button type — normal type and circle type (you gotta set the size to get a true circle ⭕) — everything else is the same as
QPushButton👑
Since 1.2.0 🎂
📖 MEMBER FUNCTION DOCUMENTATION 📖
QColor kdk::KPushButton::backgroundColor ()
gets the button background color 🎨
Returns: color
int kdk::KPushButton::borderRadius ()
gets the button's rounded corners 🔵
Returns: radius
ButtonType kdk::KPushButton::buttonType ()
gets the KPushButton type 🏷️
Returns: — (the docs leave this one blank, we leave it blank too 🤷)
bool kdk::KPushButton::hasArrow () const
returns whether the arrow is shown 🏹
Returns: bool
Since 2.4.1.0 🎂
QColor kdk::KPushButton::IconColor ()
gets the color of the icon added to the button 🖍️
Returns: — (blank in the docs, so blank here 💅)
bool kdk::KPushButton::isBackgroundColorHighlight ()
checks whether the button background color follows the system highlight color 🌈
Returns: — (blank ✨)
bool kdk::KPushButton::isIconHighlight ()
checks whether the icon follows the system highlight color 👀
Returns: — (blank ✨)
bool kdk::KPushButton::isLoading ()
returns the loading style ⏳
Returns: — (blank ✨)
Since 2.5.2.0 🎂
bool kdk::KPushButton::isTranslucent ()
checks whether the KPushButton is semi-transparent 🫧
Returns: — (blank ✨)
void kdk::KPushButton::setArrow (bool flag, ArrowDirection arrowDirection = ArrowBottom)
sets whether the arrow is shown (flag), and sets the arrow direction (arrowDirection) 🏹
Parameters
flagarrowDirection
Since 2.4.1.0 🎂
void kdk::KPushButton::setBackgroundColor (QColor color)
sets the button background color 🎨
Parameters
color
void kdk::KPushButton::setBackgroundColorHighlight (bool flag)
sets whether the button background color follows the system highlight color; by default it does not follow 🌈
Parameters
flag
void kdk::KPushButton::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)
sets the button's rounded corners using four points 📐
Parameters
bottomLeft(左下)topLeft(左上)topRight(右上)bottomRight(右下)
void kdk::KPushButton::setBorderRadius (int radius)
sets the button's rounded corners via the corner radius (every corner is the same) 🔵
Parameters
radius
void kdk::KPushButton::setButtonType (ButtonType type)
sets the KPushButton type 🏷️
Parameters
type
void kdk::KPushButton::setIconColor (QColor color)
sets the color of the icon added to the button 🖍️
Parameters
color
void kdk::KPushButton::setIconHighlight (bool flag)
sets whether the icon follows the system highlight color; by default it does not follow 🚫✨
Parameters
flag
void kdk::KPushButton::setLoaingStatus (bool flag)
sets the loading style ⏳
Parameters
flag
Since 2.5.2.0 🎂
void kdk::KPushButton::setTranslucent (bool flag)
sets whether the KPushButton is semi-transparent 🫧
Parameters
flag
👑 AUTHOR 👑
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code 🤖💖 (yes, the robot wrote it, and honestly? it ate.)
okay that's the whole page bestie, mwah 🫶 this little beauty lives under LIBKYSDK-APPLICATIONS, Version version:3.0 ✨ and it's filed as kdk::KPushButton(3) in the manual — go build something iconic with it, no cap 💅💖🌸
📦 where this page comes from
- arch rolling: libkysdk-applications 3.0.1.2-1 · BSD-3-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT AND MulanPSL-2.0
- ubuntu resolute: libkysdk-applications-dev 3.0.1.1-1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-applications-dev 3.0.1.2-1build2 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms