Results 1 to 1 of 1

Thread: Use FramelessWindowHint in Windows XP with QML Window Type

  1. #1
    Join Date
    Mar 2016
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Use FramelessWindowHint in Windows XP with QML Window Type

    main.qml

    Qt Code:
    1. import QtQuick 2.4
    2. import QtQuick.Window 2.2
    3.  
    4. Window {
    5. width: 300
    6. height: 300
    7. flags: Qt.FramelessWindowHint | Qt.Window
    8. color: "transparent"
    9.  
    10. Rectangle {
    11. color: "brown"
    12. anchors.fill: parent
    13. anchors.margins: 10
    14. }
    15. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. #include <QApplication>
    2. #include <qqmlengine>
    3. #include <QQmlComponent>
    4. #include <QtCore>
    5. #include <QQuickWindow>
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QApplication app(argc, argv);
    10.  
    11. QQmlEngine engine;
    12. QQmlComponent component(&engine, QUrl::fromLocalFile("main.qml"));
    13. if (!component.isReady())
    14. {
    15. qDebug() << component.errors();
    16. return 0;
    17. }
    18. QQuickWindow* window = qobject_cast<QQuickWindow*>(component.create());
    19. if(!window)
    20. {
    21. qDebug() << component.errors();
    22. return 0;
    23. }
    24. window->show();
    25. return app.exec();
    26. }
    To copy to clipboard, switch view to plain text mode 


    if I add the Qt.FramelessWindowHint flag to window

    it doesn't work on windows xp

    there is no window displayed

    is there some wrongs?

    i use qt5.4.2 msvc2010 oepngl
    Last edited by dazhu; 3rd March 2016 at 12:28.

Similar Threads

  1. Replies: 1
    Last Post: 4th February 2011, 07:56
  2. File type associations under Windows or Linux
    By bred in forum Qt Programming
    Replies: 3
    Last Post: 7th November 2010, 16:56
  3. Best way to create Windows Explorer type UI
    By scarleton in forum Newbie
    Replies: 8
    Last Post: 22nd August 2010, 20:30
  4. Replies: 3
    Last Post: 6th June 2010, 11:31
  5. Replies: 5
    Last Post: 5th August 2009, 18:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.