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. [SOLVED] Adding a Resource (.png file) to an existing Tab Widget
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Adding a Resource (.png file) to an existing Tab Widget

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    maxg0
    wrote on last edited by
    #1

    Hi,

    I wonder whether you could help with the following.
    I have imported a resource image into QtDesigner in the form of a ".png" file.
    I am able to load this image as the icon of a Tool Button. However I don't want to use this resource as an icon but rather as a Logo, which should simply appear on a Tab Widget or even on the Main page containing the Tab Widget.

    I have not found any information on how to do this apart from this link: http://qt-project.org/doc/qt-4.8/designer-resources.html (which is the one that talks about the icon image).

    could someone please help with this simple task?

    Many Thanks
    M

    1 Reply Last reply
    0
    • S Offline
      S Offline
      ScottR
      wrote on last edited by
      #2

      Using Designer, put a QLabel widget where ever you want the .png to appear. Then change the label's "pixmap" property to be the resource.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maxg0
        wrote on last edited by
        #3

        It works, thanks

        1 Reply Last reply
        0

        • Login

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