Results 1 to 8 of 8

Thread: Customize the window in windows ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    5
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Customize the window in windows ?

    Hello im good C++ developer , but i never used qt im total new in it, i wonder how to make the next setps by using codes not UI , in my image i selected the things i want done in red color , i used
    Qt Code:
    1. w.setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 
    to hide windows one

    cloud someone post me a code witch i can use QPushButton to make Close, and Mimimize buttons?



    thanks in advance


    -----------------------------------------------------------

    my next code :
    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication App(argc, argv);
    4. QWidget MainWnd;
    5. QVBoxLayout Layout;
    6. QPushButton CloseBt;
    7. QPushButton MimimizeBt;
    8. // ----
    9. CloseBt.setText("X");
    10. // ----
    11. MimimizeBt.setText("_");
    12. // ----
    13. Layout.addWidget(& CloseBt, 0, Qt::AlignRight | Qt::AlignTop);
    14. Layout.addWidget(& MimimizeBt, 2, Qt::AlignRight | Qt::AlignTop);
    15. // ----
    16. MainWnd.setLayout(& Layout);
    17. MainWnd.setWindowFlags(Qt::FramelessWindowHint);
    18. MainWnd.resize(800, 600);
    19. MainWnd.show();
    20. // ----
    21. return App.exec();
    22. }
    To copy to clipboard, switch view to plain text mode 


    does it:
    Last edited by iNewLegend; 2nd May 2011 at 13:45.

Similar Threads

  1. Window resize problem on Windows XP
    By smacchia in forum Qt Programming
    Replies: 1
    Last Post: 15th January 2010, 15:04
  2. qt 4.5 windows. Update window when something doing.
    By HardCore_Solder in forum Qt Programming
    Replies: 4
    Last Post: 20th May 2009, 11:59
  3. Customize Application Window
    By fruzzo in forum Qt Programming
    Replies: 5
    Last Post: 4th July 2008, 05:20
  4. Widget without window decoration in windows
    By jiveaxe in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2008, 20:25
  5. Dock windows in a MDI window
    By aronsson in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 10:22

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
  •  
Qt is a trademark of The Qt Company.