LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-07-2011, 10:52 AM   #1
Gavin Harper
Member
 
Registered: Feb 2010
Location: Finland
Distribution: Slackware
Posts: 169

Rep: Reputation: 24
QSplashScreen and QPainter


Following on from my issues with QSplashScreen, I am wanting to investigate the QPainter class(es) some more.

Code:
How would I best achieve this:

- Draw some shapes and gradients with QPainter/QPen etc
- Create a splash screen out of it
- Display SplashScreen.
I cannot find anything that doesn't involve
Code:
QPixMap("arbitrary.jpg");
I am comfortable making splash screens out of images, but now I want to try drawing one myself.

What would be the best practise?
 
Old 04-07-2011, 02:45 PM   #2
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 682

Rep: Reputation: 105Reputation: 105
http://doc.qt.nokia.com/latest/qpixmap.html

states a constructor with (int width, int height) as parameters; so something along the lines of:

QPixMap *image = new QPixMap(200,200);

without looking deeper into this, this makes me believe that this'd give you a canvas to work your magic on.

Also: http://www.digitalfanatics.org/proje...chapter12.html

which might be for Qt3, but overall should give an idea.

Hint: both links were found within a minute using the amazing new technology called "google": just searched for "qt qpixmap" and "qt qcanvas"; they're both either 1st or 3rd link provided.
 
Old 04-08-2011, 09:43 AM   #3
Gavin Harper
Member
 
Registered: Feb 2010
Location: Finland
Distribution: Slackware
Posts: 169

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by Ramurd View Post
http://doc.qt.nokia.com/latest/qpixmap.html

states a constructor with (int width, int height) as parameters; so something along the lines of:

QPixMap *image = new QPixMap(200,200);

without looking deeper into this, this makes me believe that this'd give you a canvas to work your magic on.

Also: http://www.digitalfanatics.org/proje...chapter12.html

which might be for Qt3, but overall should give an idea.

Hint: both links were found within a minute using the amazing new technology called "google": just searched for "qt qpixmap" and "qt qcanvas"; they're both either 1st or 3rd link provided.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
QSplashScreen - Extend loading time to display splash for longer? Gavin Harper Programming 1 04-08-2011 10:58 AM
How to use QPainter over an Xlib window? 10110111 Programming 3 01-17-2011 04:25 AM
passing a QPainter object to widgets vratojr Programming 2 12-21-2005 02:46 AM
kdevdesigner Help! "QPainter::begin: Cannot paint null pixmap" LBS Linux - Software 4 05-18-2005 05:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration