Results 1 to 2 of 2

Thread: OS X QToolbar/QMacToolbar

  1. #1
    Join Date
    Jan 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default OS X QToolbar/QMacToolbar

    Hello! I'm trying to create an application that needs a toolbar. I'm using Mac and Qt 5.5. I used QToolbar and it looked different to traditional OS X toolbars. Later I found QtMacToolbar class and it works good. Unfortunately I see a problem with buttons. Here is a toolbar from the standard Pages.app:

    Снимок экрана 2016-01-30 в 18.01.58.png

    As you can see, each button has white rectangle around it. And here is a toolbar created with QMacToolbar:
    Снимок экрана 2016-01-30 в 18.04.54.png
    As you can see, there is no rectangle and icon looks awful.
    Here is the code used to created it:

    Qt Code:
    1. toolBar = new QMacToolBar(this);
    2. QMacToolBarItem *toolBarItem =
    3. toolBar->addItem(QIcon(":/undo.png"), "foo");
    4. connect(toolBarItem, SIGNAL(activated()), this, SLOT(onBarClick()));
    5.  
    6. toolBar->attachToWindow(this->window()->windowHandle());
    To copy to clipboard, switch view to plain text mode 

    The rectangle seem to be a button, but how can I draw it?

  2. #2
    Join Date
    Sep 2017
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Re: OS X QToolbar/QMacToolbar

    Did you solve the problem in the end?

Similar Threads

  1. Replies: 2
    Last Post: 10th October 2013, 15:08
  2. QToolbar
    By swrer in forum Newbie
    Replies: 1
    Last Post: 11th March 2010, 00:08
  3. QToolBar
    By coderbob in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2007, 04:27
  4. QToolBar
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 14th September 2007, 19:48
  5. Qtoolbar
    By Project25 in forum Qt Programming
    Replies: 3
    Last Post: 26th March 2007, 22:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.