Results 1 to 3 of 3

Thread: toolbar icon sizes...

  1. #1
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default toolbar icon sizes...

    i use kde xml gui creation and make my own kaction objects like this
    Qt Code:
    1. (void)new KAction(string1, loader.loadIcon((QString)"2uparrow", KIcon::MainToolbar), 0, m_view, SLOT(updatePorts()), actionCollection(), "action");
    To copy to clipboard, switch view to plain text mode 
    the problem is that the icon is always 16x16 or 22x22 no matter what size the toolbar actually is (other kstdaction toolbar buttons have the right size and resize properly).
    how can change this?

    thanks for help

    ps.: the icons actually exist in the right size in iconset
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

  2. #2
    Join Date
    Jan 2006
    Location
    N.B. Canada
    Posts
    47
    Thanked 8 Times in 7 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: toolbar icon sizes...

    I am not sure which version you are using, but try this constructor:

    http://developer.kde.org/documentati...Action.html#a2

    The icon is loaded on demand later based on where it is plugged in.
    This sounds more reliable maybe. I think most KStdActions are created using this constructor.

    Bojan
    The march of progress:
    C:
    printf("%10.2f", x);
    C++:
    cout << setw(10) << setprecision(2) << showpoint << x;
    Java:
    java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
    formatter.setMinimumFractionDigits(2);
    formatter.setMaximumFractionDigits(2);
    String s = formatter.format(x);
    for (int i = s.length(); i < 10; i++) System.out.print(' ');
    System.out.print(s);

  3. #3
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: toolbar icon sizes...

    amazing how one can read a page over and over and just miss the important bit

    thanks alot!
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

Similar Threads

  1. Toolbar in dockwidget
    By AD in forum Qt Programming
    Replies: 7
    Last Post: 2nd October 2008, 15:34
  2. Couple of questions: main window icon + toolbar icon
    By bpackard in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 20:03
  3. QTreeView - different icon sizes on sublevels?
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 18th January 2008, 16:34
  4. Toolbar and icon size
    By MrGarbage in forum Qt Programming
    Replies: 0
    Last Post: 8th January 2008, 22:27
  5. Various icon sizes for QToolButtons on QToolbar
    By Erlendhg in forum Qt Programming
    Replies: 4
    Last Post: 30th June 2007, 19:35

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.