Questions tagged [qt4]

Questions specifically relating to the deprecated version 4.x.x of the Qt C++ GUI library. If your question applies to the current major version of Qt, use the tag [qt].

Qt 4.x is a specific series of releases of the Qt GUI library. Use this tag if your question only applies to Qt 4.x, and not to Qt 3.x or Qt 5.x. If your question applies to Qt in general, use the tag .

Trolltech released Qt 4.0 on June 28, 2005 and introduced five new technologies in the framework:

  • Tulip: A set of template container classes.
  • Interview: A model/view architecture for item views.
  • Arthur: A 2D painting framework.
  • Scribe: A Unicode text renderer with a public API for performing low-level text layout.
  • MainWindow: A modern action-based main window, toolbar, menu, and docking architecture.

The latest official 4.x release is 4.8.6 (April 24, 2014). The major version indicates API compatibility.

It has been noted that, Qt 4.8 is officially supported till "19.12.2015", In order to get official support it is better to port to Qt5

A list of the supported platforms for version 4.8 can be found here

5315 questions
20
votes
3 answers

How to show an 'infinite floating' progressbar in Qt without knowing the percentage?

I tried to show a progressbar during some operation. However, I don't know how many times it will takes so that the percentage can't be calculated. It seems that Windows has a progressbar style like this: I tried to implement this style by setting…
user957121
  • 2,946
  • 4
  • 24
  • 36
19
votes
6 answers

Full-screen desktop application with QML

I have experience with developing rich user interface application with flex and AS3. However the issue is its very hard to use existing c++ business logic with these flex apps. With the advent of QML, I am curious whether its possible to reuse the…
iceman
  • 4,211
  • 13
  • 65
  • 92
19
votes
4 answers

How to integrate QT internationalization to CMake?

Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files…
Ashika Umanga Umagiliya
  • 8,988
  • 28
  • 102
  • 185
19
votes
1 answer

Controls insist on being too large, and won't resize, in QtDesigner

I made a "widget" in Qt Designer with about a dozen controls organized into horiz. and vert. layouts. Oddly, every horizontal layout wants to be some large size, about 400 px wide, when the whole form is set to be 275px wide. Buttons etc contained…
DarenW
  • 16,549
  • 7
  • 63
  • 102
19
votes
3 answers

gdb remote cross debugging fails with "Remote 'g' packet reply is too long"

I have a problem with remote debugging. Host: laptop intel i5 with ubuntu 10.10 x86 Target: Freescale iMX35 (iMX35 PDK) arm 11 Development environment: Qt Creator 2.1RC and Qt4.7.1 libraries. Arm compiler in path:…
user602888
  • 199
  • 1
  • 1
  • 4
19
votes
7 answers

Qmake does not support build directories below the source directory

I have created an application that compiles and runs like a charm on OS-X. I would now like to start getting it to work on Windows. To start, I copied the project to a windows machine and just tried to compile, but got this error: :: warning:…
Jay
  • 2,861
  • 3
  • 29
  • 51
19
votes
3 answers

Getting values from pro files in Qt

I am using Qt 4.5 in Windows XP. My pro file has the variable VERSION = 1.0. Now i need to read this variable and get its value (1.0) from the source code. So that I don't have to maintain another variable for version inside my source code. I just…
liaK
  • 11,422
  • 11
  • 48
  • 73
19
votes
5 answers

How to add lines numbers to QTextEdit?

I am writing a Visual Basic IDE, and I need to add lines numbers to QTextEdit and highlight current line. I have found this tutorial, but it is written in Java and I write my project in C++.
Radi
  • 6,548
  • 18
  • 63
  • 91
19
votes
1 answer

update() or repaint() fails to trigger paintEvent()

I have a QScrollArea fathering my awesome scrolling widget. I like to do updates on the contents on various occasions. For this I did an override of paintEvent(QPaintEvent *). Then everytime I want it to be done I call update() on the…
ypnos
  • 50,202
  • 14
  • 95
  • 141
19
votes
2 answers

How to use QPainter on QPixmap

I'm a newbie to Qt/Embedded. I want to use QPainter to draw stuff on a QPixmap, which will be added to QGraphicsScene. Here is my code. But it does not show the drawings on the pixmap. It shows only the black pixmap. int main(int argc, char **argv)…
manmatha.roy
  • 577
  • 1
  • 9
  • 22
19
votes
3 answers

Qt4 + CGAL - Parse error at "BOOST_JOIN"

I'm getting the error Parse error at "BOOST_JOIN" while trying to compile a code with Qt4 and CGAL. I'm not using Boost directly and I've already searched and tried a bunch of options like -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDEDand…
Mauricio Zambon
  • 695
  • 2
  • 9
  • 17
19
votes
6 answers

Adding button to QTableview

I have created one table by using QTableview and QAbstractTableModel . In one of the cells, I want to add one help button in the right corner of that cell. Is there any way to achieve this?
Learner
  • 245
  • 1
  • 3
  • 9
18
votes
3 answers

How to create delegate for QTreeWidget?

Here is what I'm trying to do (all parents and children must have a close button on the right, in the future, only the hovered item will be able to show the **close ** button): My delegate code: class CloseButton : public QItemDelegate { …
mosg
  • 12,041
  • 12
  • 65
  • 87
18
votes
3 answers

Hiding row labels

I'm using Qt4 to create a table, using the QTableWidget class. Problem is: I want to hide the row labels (i.e. the numbers). I just care about columns. I want to get this: (source: ldc.usb.ve) How can I accomplish this?
Emiliano
  • 22,232
  • 11
  • 45
  • 59
18
votes
5 answers

How to pass click event to sibling underneath in Qt?

I have two overlapping widgets in a window child A and child B. Child A is above B and gets mouse events but sometimes the click should pass through and eventually hit child B. The ideal solution would have been to use event->ignore() but this…
Anna B
  • 5,997
  • 5
  • 40
  • 52