Re: [Interest] resizable QTextEdit

2018-04-15 Thread Alexander Semke
On Sonntag, 15. April 2018 19:08:14 CEST Igor Mironchik wrote: > > The only problem now is that the entered text is not shown in TextEdit > > with > > this new class. The text changes are accepted, but nothing is shown. Any > > idea here? > > The problem was in Text::resizeEvent(). I forgot to

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik
Hi, On 15.04.2018 19:30, Alexander Semke wrote: Hi Igor, As a possible solution: [...] Works now. I pushed a modified version of your code to our repository in https://cgit.kde.org/labplot.git/commit/? id=1cacf9f095b5e850baa58584b071986fbfe790fb The only problem now is that the entered

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik
Hi, #include #include #include #include #include #include #include #include #include #include class Resizable { public:     Resizable()     {     }     virtual ~Resizable()     {     }     virtual void addSize( const QSize & size ) = 0; protected:     QSize m_size; }; class

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Alexander Semke
Hi Igor, > As a possible solution: > [...] Works now. I pushed a modified version of your code to our repository in https://cgit.kde.org/labplot.git/commit/? id=1cacf9f095b5e850baa58584b071986fbfe790fb The only problem now is that the entered text is not shown in TextEdit with this new class.

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik
Hi again, If you want to be able to shrink the width too, you can do something similar to: #include #include #include #include #include #include #include #include #include #include class Text; class Corner     :    public QWidget { public:     Corner( Text * parent );    

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik
Hi, As a possible solution: #include #include #include #include #include #include #include #include #include #include class Text; class Corner     :    public QWidget { public:     Corner( Text * parent );     virtual ~Corner();     QSize sizeHint() const Q_DECL_OVERRIDE;

Re: [Interest] resizable QTextEdit

2018-04-15 Thread Tony Rietwyk
Hi Alexander, Does layout::invalidate before activate help? Regards, Tony On 15/04/2018 6:53 PM, Alexander Semke wrote: On Freitag, 13. April 2018 10:22:14 CEST Igor Mironchik wrote: Something like this? [...] Thanks Igor, I've got the idea. The resize works fine now but I have the problem

Re: [Interest] resizable QTextEdit

2018-04-13 Thread Igor Mironchik
Hi, Something like this? #include #include #include #include #include #include #include #include #include class Text; class Corner     :    public QWidget { public:      Corner( QWidget * parent )         :    QWidget( parent )         ,    m_toResize( parent )         ,   

[Interest] resizable QTextEdit

2018-04-13 Thread Alexander Semke
Hi, one frequently sees form text fields on the web where the actual text field can be resized by the user by clicking on the resize-symbol in the corner of the text field and dragging it until the desired size is achieved. I'm wondering how to get this for a QTextEdit placed in a layout.