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. How can I put image in background of MainWindow.ui
Forum Updated to NodeBB v4.3 + New Features

How can I put image in background of MainWindow.ui

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k 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.
  • D Offline
    D Offline
    Dharmendra
    wrote on last edited by
    #1

    Hi,
    good morning

    I am using Qt 5.0.2.

    I Created New Qt GUI Application and I choosed class Information as per below.

    Class name : MainWindow
    Base class : QMainWindow
    Header file : mainwindow.h
    source file : mainwindow.cpp
    Gernerate form : tick
    Form file : mainwindow.ui

    I want to put Image in Background of MainWindow, for that purpose I have check in
    standard Widget Box but I can't get any Widget for that.

    So, please let us know how can I put image in background of MainWindow ui.

    Plesae help.

    Regards,
    Dharmendra

    1 Reply Last reply
    0
    • musimbateM Offline
      musimbateM Offline
      musimbate
      wrote on last edited by
      #2

      Hi Dharmendra ,
      For your problem I think you can create a widget and set an Icon to it using QWidget::setIcon()
      and then pass a pointer to that widget to QMainWindow::setCentralWidget(* QWidget)

      Why join the navy if you can be a pirate?-Steve Jobs

      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