Questions tagged [qtextedit]

QTextEdit is a class from the Qt Toolkit which provides a widget that is used to edit and display both plain and rich text. It is optimized to handle large documents and to respond quickly to user input.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

575 questions
0
votes
1 answer

position fixed (same effect as css) with Qt

Question: Like in css, is there an equivalent of position: fixed; in Qt ? Picture : What I want is to move the second bubble (a subclassed QTextEdit) to the left when my main windows is resized. The second picture shows what I want to prevent.
David
  • 4,785
  • 7
  • 39
  • 63
0
votes
1 answer

QTextEdit implement an onlclick event

I have an object that inherits from QTextEdit, which looks like this: class infoBox : public QTextEdit { Q_OBJECT public: : : } I use it in my UI window like this: class Ui_MainWindow { infoBox *pInfoBox; public: void…
code_fodder
  • 15,263
  • 17
  • 90
  • 167
0
votes
1 answer

QTextEdit does not shrink when resizing layout

I'm having problems with QTextEdit not shrinking below certain size. To be more precise. I have a widget with horizontal layout. This widget has two children, another container widgets. Each of this child widgets contain more or less the same…
Dalibor Frivaldsky
  • 810
  • 1
  • 6
  • 14
0
votes
2 answers

How to override keyPressEvent of QTextEdit?

I override keyPressEven() of widget QTextEdit: void myTextEdit::keyPressEvent(QKeyEvent *e) { if(e->key()==Qt::Key_0) { qDebug() << "Ok"; } } Button 0 works - show "Ok", but does not write in field of QTextEdit. Why? Thanks…
Adam Shakhabov
  • 1,194
  • 2
  • 14
  • 35
0
votes
1 answer

Strat tabs from QTabWidget in threads

is it possible to start tabs from the QTabWidget in several threads? I want to append the continuous given answers from a server to a QTextEditWidget. The change of the QTextEditWidget should show always after the append of a new answer. Acctually i…
Andreas
  • 636
  • 1
  • 12
  • 29
0
votes
1 answer

Making a QTextEdit capital

I am trying to make all text in a QTextEdit capital, but currently am failing. This is my code and it does nothing. void MainWindow::on_actionCapital_triggered() { QTextCharFormat capital2; …
Ludger
  • 991
  • 2
  • 11
  • 22
0
votes
1 answer

Onscreen Keyboard Show/Hide

What I want I made onscreen keyboard using simple QPushButtons and QFrame. What I want, when a input widget (QLineEdit, QTextEdit, QPlainText, QSpinBox) is in focus my onscreen keyboard will show and when no input widget is in focus, my keyboard…
Jai
  • 1,292
  • 4
  • 21
  • 41
0
votes
1 answer

make a auto adjustable QTextBrowser

hello i need make a auto adjustable QTextBrowser. It's means the height of the QBrowserText depend of the number of rows it contained, somebody can help me please ?
Dan Snow
  • 127
  • 1
  • 11
0
votes
1 answer

Create a clickable QTextEdit with a pixmap in a label as background

I need my QTextEdit (or correct: QTextBrowser) to have a background image. self.background=QLabel() self.background.move(0,0) self.background.setPixmap(QPixmap("/Icons/bg-text.png")) self.background.show() self.textedit =…
user2366975
  • 4,350
  • 9
  • 47
  • 87
0
votes
1 answer

Clone QTextDocument Subclass

I have a subclass of QTextDocument that overrides QTextDocument::loadResource(int type, const QUrl &name). I want to clone it. Ideas ?
Jaydeep Solanki
  • 2,895
  • 5
  • 36
  • 50
0
votes
1 answer

PyQt reading text from a QTextEdit widget

I am trying to write a program which reads data in from a file into a QTextEdit box and also a QTable widget. You should be able to edit the data in the textedit and the changes should appear in the table and viceversa. My problem is that when I…
0
votes
1 answer

Using setCellWidget to insert a QTextEdit into a QTableWidget loses keyboard and mouse events

I am trying to insert pretty, HTML text into QTableWidget cells using setCellWidget and QTextEdit objects. This works great, but now my table doesn't get mouse clicks (for selection, etc.) or keypresses (for selection, navigation, etc.). Here is…
Slogger
  • 1
  • 1
0
votes
1 answer

QTextEdit not displaying

QTextEdit is not displaying on the window and not displaying "hello". Not sure what is wrong here? #define MAINWINDOW_H #include #include namespace Ui { class MainWindow; } class…
jdl
  • 6,151
  • 19
  • 83
  • 132
0
votes
1 answer

How to get widget from QTabWidget?

I'm writing a simple text editor and using QTabWidget in it. For some QActon from QMenu I need to work with some widget from QTabWidget. QTabWidget::widget() return QWidget, but I need QTextEdit, which I added to QTabWidget using addTab(). How do I…
Ilya Glushchenko
  • 317
  • 1
  • 6
  • 13
0
votes
2 answers

Slot/signal dynamics regarding QTextEdit

I'm fairly new at C++/Qt, and I only have some web development experience. I'm testing a few things with Qt for learning purposes and I'm failing miserably at it. I'm pretty sure it's because the whole slot/signal thing hasn't settled in yet, so I…
Joum
  • 3,189
  • 3
  • 33
  • 64