
Originally Posted by
jacek
Where do you change the format of an image that is already in the document? "nowimage".
Yes i reformat .... image inside qtextbrowser .... & not open other apps photoshop or so... the image must stay on html size ... and not waist time to other photoshop or gimp action...
table i reformat so ... is run OK super....
void Edit::TableSetting()
{
Etable = findercursor.currentTable();
if (Etable) {
Table_Setting::self( this )->SetFormat(nowtable);
Table_Setting::self( this )->exec();
QTextTableFormat newformine
= Table_Setting
::self( this )->GetNewFormats
();
/* incomming other attribute by table .... from dialog */ if (newformine.isValid()) {
nowtable->setFormat(newformine); /* nowtable = QTextTable */
}
}
}
void Edit::TableSetting()
{
QTextCursor findercursor(wtext->textCursor());
Etable = findercursor.currentTable();
if (Etable) {
Table_Setting::self( this )->SetFormat(nowtable);
Table_Setting::self( this )->exec();
QTextTableFormat newformine = Table_Setting::self( this )->GetNewFormats(); /* incomming other attribute by table .... from dialog */
if (newformine.isValid()) {
nowtable->setFormat(newformine); /* nowtable = QTextTable */
}
}
}
To copy to clipboard, switch view to plain text mode
Image i reformat so .... and run image have new size small or bigger is ok.....
&&& <img src="tanzbaer.gif" width="368" height="383" >
only width="368" height not write .....
If i put on tidy lib only alt can append..... ... i hope the problem or bug is solved on
http://www.trolltech.com/developer/t...ntry&id=149069
QTextTable -> setformat ( QTextTableFormat ) run ok....
QTextImage -> setformat (QTextImageFormat ) class QTextImage not present on qt4.2 .
&& lastcursor.setCharFormat(newforminepic); run only 1/2
void Edit::Image_mod_Setting()
{
/* QTextImageFormat nowimage; */
if (nowimage.isValid()) {
Edit_Image::self( this )->SetFormat(nowimage);
Edit_Image::self( this )->exec();
if (newforminepic.isValid()) {
////////////nowimage = newforminepic;
/* QTextCursor lastcursor; ( last cursor from action ) */
lastcursor.setCharFormat(newforminepic);
qDebug() << "### Draw image h ... " << nowimage.height();
qDebug() << "### Draw image w... " << nowimage.width();
Reload_Editor(); /* repaint new size from image and go back to last QScrollBar *wysiwyg_sroll; int value setvalue(int)*/
/* http://www.qtcentre.org/forum/f-qt-programming-2/t-loading-images-in-qtextbrowser-5046.html/?highlight=QTextImageFormat */
}
}
}
void Edit::Image_mod_Setting()
{
/* QTextImageFormat nowimage; */
if (nowimage.isValid()) {
Edit_Image::self( this )->SetFormat(nowimage);
Edit_Image::self( this )->exec();
QTextImageFormat newforminepic = Edit_Image::self( this )->GetFormat();
if (newforminepic.isValid()) {
////////////nowimage = newforminepic;
/* QTextCursor lastcursor; ( last cursor from action ) */
lastcursor.setCharFormat(newforminepic);
qDebug() << "### Draw image h ... " << nowimage.height();
qDebug() << "### Draw image w... " << nowimage.width();
Reload_Editor(); /* repaint new size from image and go back to last QScrollBar *wysiwyg_sroll; int value setvalue(int)*/
/* http://www.qtcentre.org/forum/f-qt-programming-2/t-loading-images-in-qtextbrowser-5046.html/?highlight=QTextImageFormat */
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks