Outsider
Outsider

Reputation: 281

Qt C++ border icon

I create new application and remove title bar with close, maximize and minimize buttons (just set windowFlags to Qt::CustomizeWindowHint). I created my own buttons. Now I must search icons for removed buttons, but I can't find them (close, minimize, maximize).

Question: Can I use Windows 7 icons? Doesn't it violate the license?

Upvotes: 2

Views: 1237

Answers (2)

JediLlama
JediLlama

Reputation: 1173

You could use Qt's QStyle to obtain the icons that Qt uses to draw its own title bars and such:

QStyle* style = QApplication::style();
QIcon icon = style->standardIcon( QStyle::SP_TitleBarCloseButton );

Have a look at the QStyle::StandartPixmap enum for a list of Qt's standard icons that are available.

Upvotes: 4

laurent
laurent

Reputation: 90804

Distributing the buttons as bitmap images or even embedded in your application would most likely be a violation of Windows' EULA.

However, if your app runs on Windows, you don't need to distribute them. Just find where the Close, Minimize and Maximize buttons are stored in Windows 7 (probably some DLL in the system folder), then when you app runs, use these icons directly (I believe QIcon can load them). That way, there's no copyright violation.

Upvotes: 0

Related Questions