Giter VIP home page Giter VIP logo

Comments (3)

czyt1988 avatar czyt1988 commented on August 13, 2024

macOS和Ubuntu都对menubar有特殊的处理,目前SARibbon是通过替换原来menubar的方式实现的,对macOS等这种有特殊的原生menubar暂不支持。这两个系统需要单独开发

from saribbon.

longhuan2018 avatar longhuan2018 commented on August 13, 2024

在windows 10, qt 5.15.2下,UseDesginerMainWindowExample示例,也会出现该现象
image

将构造函数中的SARibbonMainWindow(parent),修改为SARibbonMainWindow(parent, false),
并在ui->setupUi(this);之后增加setRibbonTheme(ribbonTheme());
可以解决该问题

MainWindow::MainWindow(QWidget *parent)
    : SARibbonMainWindow(parent**, false**)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

   **setRibbonTheme(ribbonTheme());**
}

image

具体原因是由于SAWindowButtonGroup在SARibbonBar之前创建导致的,但是不知道为什么会导致这种现象的出现...

from saribbon.

yangkwch avatar yangkwch commented on August 13, 2024
加一句ribbon->setNativeMenuBar(false)就可以了,亲测可行。不过tab部分的字体太靠下了,不知道怎么居中。

SARibbonBar* ribbon = ribbonBar();
ribbon->setNativeMenuBar(false);
//通过setContentsMargins设置ribbon四周的间距
ribbon->setContentsMargins(5, 0, 5, 0);
//设置applicationButton
PRINT_COST("setCentralWidget & setWindowTitle");
ribbon->applicationButton()->setText(("File"));
ribbon->setRibbonStyle(SARibbonBar::WpsLiteStyle);

from saribbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.