Russian Qt Forum
Май 22, 2024, 05:33 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало   Форум  WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  

Страниц: [1]   Вниз
  Печать  
Автор Тема: открыть почтовую программу  (Прочитано 2350 раз)
DmitryKSL
Гость
« : Июль 05, 2010, 10:54 »

Нужно чтоб при нажатии на кнопку открылось окно редактирования нового письма (почтовой программы по умолчанию) , при этом должен подставиться адрес получателя и текст в поле редактирования. Во многих программах подобное есть для связи с автором. Что-то не пойму как это делается.
Записан
SimpleSunny
Гость
« Ответ #1 : Июль 05, 2010, 11:39 »

Цитировать
bool QDesktopServices::openUrl ( const QUrl & url )   [static]
Opens the given url in the appropriate Web browser for the user's desktop environment, and returns true if successful; otherwise returns false.

If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.

The following example opens a file on the Windows file system residing on a path that contains spaces:

 QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode));
If a mailto URL is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL, similar to the way mailto links are handled by a Web browser.

For example, the following URL contains a recipient (user@foo.com), a subject (Test), and a message body (Just a test):

 mailto:user@foo.com?subject=Test&body=Just a test
Warning: Although many e-mail clients can send attachments and are Unicode-aware, the user may have configured their client without these features. Also, certain e-mail clients (e.g., Lotus Notes) have problems with long URLs.

See also setUrlHandler().
Записан
Страниц: [1]   Вверх
  Печать  
 
Перейти в:  


Страница сгенерирована за 0.066 секунд. Запросов: 21.