Results 1 to 3 of 3

Thread: Toolbar & Icons missing

  1. #1
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Toolbar & Icons missing

    Hello everybody,

    QT:4.1.1

    I have designed a MainWindow and a toolbar.I have created a new Action with a Image from: "D:\rapha\qtprojekte\qt4\mainwindow\images".
    In the designer i can see the beautiful icon.

    So i have 2 questions now:

    1. After compiling and running Program i was not able to see my icon in the toolbar.
    I think that ui_mainwindow.h create the false path:
    Qt Code:
    1. actionTest->setIcon(QIcon(QString::fromUtf8("images/copy.png")));
    To copy to clipboard, switch view to plain text mode 
    Shouldnt be:
    Qt Code:
    1. actionTest->setIcon(QIcon(QString::fromUtf8("../images/copy.png")));
    To copy to clipboard, switch view to plain text mode 
    Because my structure i am using are:
    images
    release (My App are here)
    .
    .
    2. How to compile my app included the icons, so i will not need the images folder any more?
    Think DigitalGasoline

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Toolbar & Icons missing

    Add those icons to the resource file and use a resource path instead of file paths.

    More info on resources

  3. #3
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Toolbar & Icons missing

    Hi wyota!
    It works fine...thank you to open my mind
    Think DigitalGasoline

Similar Threads

  1. StandardPixmap is missing important icons
    By claudio in forum Qt Programming
    Replies: 3
    Last Post: 19th February 2014, 20:47
  2. ToolBar icons hidden in windows
    By giusepped in forum Installation and Deployment
    Replies: 3
    Last Post: 13th January 2009, 16:56
  3. Toolbar in dockwidget
    By AD in forum Qt Programming
    Replies: 7
    Last Post: 2nd October 2008, 15:34
  4. Icons missing => segmentation fault
    By antonio.r.tome in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2006, 17:30
  5. Missing action icons
    By ReilenBlaeyze in forum KDE Forum
    Replies: 4
    Last Post: 20th February 2006, 13:05

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.