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. Bring widget at the back of another widget

Bring widget at the back of another widget

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

    I have created a widget that whenever the mainwindow runs, it will also display. but the problem is that when another widget is executed, this widget keeps displayin in front. I want the widget to be at the back of any widget that will be executed and remains background like the mainwindow.

    as of now this is the code of the widget that runs the same time as the mainwindow:
    ui->setupUi(this);
    this->setFocusPolicy(Qt::NoFocus);
    this->setWindowFlags(Qt::X11BypassWindowManagerHint);
    this->setFixedSize(400, 100);
    this->move(500, 600);

    1 Reply Last reply
    0
    • SamurayHS Offline
      SamurayHS Offline
      SamurayH
      wrote on last edited by SamurayH
      #2

      I can guess that you're trying to change your widgets' Z-order. If so, check out the following functions :
      QWidget::stackUnder, QWidget::raise and QWidget::lower.

      Hope it helps.

      "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

      1 Reply Last reply
      0
      • C CPPUIX referenced this topic on

      • Login

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