Coder Social home page Coder Social logo

framlesswindowhelper's Introduction

FramlessWindowHelper

提供一个可用于缩放qml窗口的类,widget缩放可以前往 一去丶二三里 的博客地址 http://blog.csdn.net/liang19890820/article/details/50557240

用法

  1. 将FramelessHelper文件夹拷贝到你的目录,然后在main.cpp文件中包含FramelessWindowHelper.h文件
  2. main 函数示例,addWindow是关键,MainWindow为你想要进行缩放的qml窗口的objectName image

2017/09/13更新

现在在main函数中仅需qmlRegisterType注册C++类即可,更简洁!

framlesswindowhelper's People

Contributors

lowbees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

framlesswindowhelper's Issues

一个小改动或许会使这个更加稳定

我clone了你这个项目,运行时出现

question

我描述为,启动显示窗口大概0.5s后出现这种情况,高度缩小为minimumHeight
有些时候,还会出现窗口无响应的状态

我的改动

在main.cpp中

QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    if (engine.rootObjects().isEmpty())
        return -1;
    FramelessWindowHelper helper(&engine);

    // 主窗口必须以这种方式
    helper.addWindow("MainWindow");
    return app.exec();

改为

QQmlApplicationEngine engine;
 FramelessWindowHelper helper(&engine);

    // 主窗口必须以这种方式
    helper.addWindow("MainWindow");
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    if (engine.rootObjects().isEmpty())
        return -1;
   
    return app.exec();

就不会出现那种问题

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.