[Qt-interest] insertFrame() without blank line?

Israel Brewster israel at frontierflying.com
Mon Mar 30 19:24:27 CEST 2009


No one? Really? Should I file this as a bug then? I mean, I can maybe  
see this as desired behavior, but surely there has to be SOME way to  
work around it. Or am I just approaching this all wrong? Is there a  
better way to get a right-justified column? Thanks.

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------


On Mar 27, 2009, at 2:36 PM, Israel Brewster wrote:

> I am trying to achieve what is basically a two-column QTextEdit, with
> the left column being left justified, and the right column being right
> justified. So far, I have attempted to do this by using the
> QTextCursor::insertFrame() function, with the TextFrameFormat position
> set to "FloatRight". Here's the code:
>
> QTextFrame * topFrame=cursor.currentFrame();
> QTextFrameFormat rightFormat;
> rightFormat.setPosition(QTextFrameFormat::FloatRight);
> rightFormat.setWidth(15);
> cursor.movePosition(QTextCursor::Start);
> QTextFrame *rightFrame=cursor.insertFrame(rightFormat);
>
> I then populate the top frame and right frame. This works as desired,
> with one caveat: when I insert the right frame,  it also inserts a
> blank line above the right frame. I want the frame to be at the top of
> the document, not one line down. How can I get rid of the extra line?
> Thanks.
>
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician II
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list