Results 1 to 5 of 5

Thread: 2 Questions

  1. #1
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 2 Questions

    Hi all,

    I've got to Questions:

    1. How can I make my QMainWindow use the full screen (not full screen mode, but use as many space as possible, just like Firefox) ? // Solved

    2. Is it possible to draw half-transparent text?

    Thank you,

    kingfinn
    Last edited by kingfinn; 9th January 2010 at 12:40.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 2 Questions

    Would you care to explain what does "just like Firefox" mean? Do you mean QWidget::showMaximized()?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 2 Questions

    Thats it, thank you!

  4. #4
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 2 Questions

    For 2, just use a transparent pen. This example draws in 50% transparent red:
    Qt Code:
    1. void paintEvent ( QPaintEvent * event )
    2. {
    3. QPainter painter(this);
    4. painter.setPen(QPen(QColor(255, 0, 0, 128)));
    5. painter.setFont(QFont("Arial", 30));
    6. painter.drawText(rect(), Qt::AlignCenter, "Qt");
    7. }
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: 2 Questions

    Thank you Guys!

Similar Threads

  1. Several questions
    By zlatko in forum Qt Tools
    Replies: 3
    Last Post: 25th May 2007, 08:47
  2. Sql questions
    By Nb2Qt in forum Qt Programming
    Replies: 4
    Last Post: 15th February 2007, 22:53
  3. A few questions about Qt/Win
    By Bojan in forum Installation and Deployment
    Replies: 3
    Last Post: 16th January 2006, 09:54

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.