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. Background image for an application
QtWS25 Last Chance

Background image for an application

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.7k 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.
  • T Offline
    T Offline
    tunde
    wrote on last edited by
    #1

    how do u put a background image in a qt application?......

    1 Reply Last reply
    0
    • I Offline
      I Offline
      IrQX
      wrote on last edited by
      #2

      What you mean? background image for Widow? Wadget? Something else?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tunde
        wrote on last edited by
        #3

        yea. a background image for window qt application

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blex
          wrote on last edited by
          #4

          Something like this:
          @
          About::About(QWidget *parent) : QDialog(parent), _ui(new Ui::About) {
          _ui->setupUi(this);
          QPalette pal = palette();
          pal.setBrush(backgroundRole(), QBrush(QPixmap("path_to_image.png")));
          setPalette(pal);
          ...
          }
          @


          Oleksiy Balabay

          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