Mac: mini font

On Mac you can often see the usage of two system fonts in applications. Second one “Mini” is convenient to use when you would like to have a lot of “mini” controls – mostly you can get it by applying Qt::WA_MacMiniSize. Well then the font is coming from mac style, but what if the font is needed as QFont object?

Read More »

Posted in Blog, Qt | Leave a comment

New Site Design

Posted in Web | Comments closed

Copy Folder on Mac and Windows

Developers can often encounter next problem: there is required files and folders manipulations which needed to be implemented in application. For one side there is enough API to do it Qt, but maybe it is too much code to handle all reads/writes, then you need to worry about some progress message, then it could be that additional thread is required because of blocking operations. So the simple operation can make “just copying” code complicated enough.

Why not use Explorer on Windows or Fnder on Mac?

Read More »

Posted in Blog, Qt | Leave a comment

Show in Finder / Show in Explorer

It happens often when for integration purposes or for making easy way to navigate to files you need to have such action “Show in Finder” on mac or “Show in Explorer” on windows. Well, the code is pretty simple:

Read More »

Posted in Blog, Qt | Leave a comment

Styling Lists on Mac

Here is QTreeView on Mac that I usually use for lists in my applications. Actually it is designed to be in Mac style, but still it is different and you feel that it is not good and looks like alien in Mac. Let’s do something with style sheets:

Read More »

Posted in Blog, Qt | Leave a comment

Continue Preferences Window

Let’s continue our previous blog post regarding preferences window. Of course it looks great and native look-and-feel on Mac, but what about having styles for both platforms to make user feel comfortably. I tried to apply Firefox-like style of preferences window, you can see screenshot above.
Code:

Read More »

Posted in Blog, Qt | Leave a comment

Preferences Window

How to implement Preferences Window in Qt that look and feel like pure Mac application? Well, first problem is, that it should be window instead of dialog, even QMainWindow to have unifiedTitleAndToolBarOnMac property (allowed only for QMainWindow now). So let’s define and implement it as QMainWindow.

Problem #2: We have empty menu bar when activates this window – we can use next trick: in our main window class we define such method like void createFileMenu(QMenu *), this method should fill QMenu with actions, separators and sub-menus, and let’s use this method for both windows, then we can easily create menu bar in Preferences Window and fill it with actions from Main Window. Nobody see difference ;)

ps: to use the code for windows too, just hide menuBar for this window.

Posted in Blog, Qt | Leave a comment

Lists and Top Right corner

QListView Mac

If you have lists or tables in your application you can see that Qt widgets have scroll bar for full height of widget instead of only viewport area. What to do to make it looks like native mac widget? It is easy. Remember that QAbstractScrollArea has method: addScrollBarWidget()

Read More »

Posted in Blog, Qt | 1 Comment

List Headers in Mac style

Using QListView or QTableView you can see that style is not what you can expect on Mac platform. As solution you can use next qstylesheet code to apply
to your widgets:

Read More »

Posted in Blog, Qt | Leave a comment
Feel free to chat with us:
Powered by Google Talk Widget