Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 这是一个bug吗?
Forum Updated to NodeBB v4.3 + New Features

这是一个bug吗?

Scheduled Pinned Locked Moved Chinese
3 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.
  • E Offline
    E Offline
    electri80
    wrote on last edited by
    #1

    使用向导建立一个MainWindow窗体,在构造函数里输入几行代码
    #include <QLabel>
    #include <QStatusBar>
    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);

    setContentsMargins(20, 0, 60, 0);
    QLabel *lable1 = new QLabel(tr("abc"));
    statusBar()->addWidget(lable1);

    }

    运行后结果发现状态栏的布局不对,所有的偏移都挪到右边去了

    !https://bugreports.qt-project.org/secure/attachment/38294/pic1.JPG!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jiangcaiyang
      wrote on last edited by
      #2

      这应该不是Bug,在Designer上修改一下或者尝试修改一下代码应该能够达到你所需要的效果。

      1 Reply Last reply
      0
      • E Offline
        E Offline
        electri80
        wrote on last edited by
        #3

        除非修改QtGui的代码

        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