LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 11-18-2007, 06:42 PM   #1
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Rep: Reputation: 30
qt3 and dialog box text


What widget do I use to put static text on the screen in qt?
 
Old 11-18-2007, 09:15 PM   #2
wdezell
LQ Newbie
 
Registered: Jul 2007
Location: Alabama
Distribution: Fedora
Posts: 2

Rep: Reputation: 0
QMessageBox

Take a look at QMessageBox(). The text you wish to display is passed as one of the params to the constructor(s). The following example is a snippet of code from a recent project (note the single comma for multiple lines of quoted text -- all the text is part of a single parameter).



QMessageBox::information ( 0, "SoftHHT",
"One or more expected Saved Settings missing.\n\n"
"Did NOT automatically initialize operator stations.\n\n",
QMessageBox::Ok || QMessageBox:efault, QMessageBox::NoButton,
QMessageBox::NoButton );

Last edited by wdezell; 11-18-2007 at 09:23 PM. Reason: added example
 
  


Reply



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
Wine: No text in dialog boxes xTyphooNx Linux - Desktop 13 03-27-2007 08:38 AM
Wine: No text in dialog boxes xTyphooNx Linux - Desktop 1 09-05-2006 03:10 AM
Dialog box help!!!!!!!! HopelessLinuxNewbie Fedora 1 08-24-2005 11:48 AM
Java: Getting the contents of a search dialog box in text editor i am making ludeKing Programming 4 04-23-2004 08:46 PM
Dialog box scripting.... r_jensen11 Programming 2 01-25-2004 06:40 PM

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

All times are GMT -5. The time now is 01:58 PM.

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
Open Source Consulting | Domain Registration