Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using standard icons appropriate for the current platform

Using standard icons appropriate for the current platform

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    doug65536
    wrote on 7 May 2013, 10:56 last edited by
    #1

    I am new to Qt and I am extremely impressed by it. I thought I'd write a little text editor with a proper UI, menus, toolbars, docking, tabbed documents, undo, redo, macros, etc., to get used to Qt development, as it covers most of what you implement when making a professional UI.

    I ran into an issue with QStyle::standardIcon. I want to use standard icons that are appropriate for the target platform.

    I figured that QStyle::FP_* would have all the standard icons but I find it to be severely lacking.

    I need icons for (at least) New, Open, Save, Print, Cut, Copy, Paste, Find, Help, Undo, Redo. I would expect all of those to be the definition of "standard" icons.

    Here's what I've come up with so far:

    New: SP_FileIcon
    Open: SP_DialogOpenButton
    Save: SP_DialogSaveButton

    I can't find any that would be appropriate for Print, Cut, Copy, Paste, Undo, Redo, Find, Help.

    Is it not possible to make a UI that has a native feel for multiple platforms? If I use my own images, it will not have a native feel at all.

    Thanks!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 7 May 2013, 11:02 last edited by
      #2

      Hi,

      probably there are missing icons because them are not standard on some platform.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        doug65536
        wrote on 7 May 2013, 18:54 last edited by
        #3

        Ok, I suppose using my own icons is fine. The resource system is great anyway. This brings up another issue though: how to deal with icon sizes. A small icon might be needed (for a list), while a larger icon might be needed at other times (a toolbar button).

        Windows deals with this by having ico files contain several different sized representations of icons. It's not clear how to accomplish the same thing in Qt.

        I'll use fixed sized icons for now, but any suggestions on dealing with different sized icons (in a context sensitive manner) would be appreciated.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on 7 May 2013, 22:16 last edited by
          #4

          Hi,

          QIcon allow to store pixmap in deìifferent size and for different states

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0

          1/4

          7 May 2013, 10:56

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved