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].
5,315
questions
0
votes
0
answers
13
views
Does addition sequence of different items into scene affects their selection through mouse in qt?
In my QGraphicsView, I have 1 polyline ( p1) and 2 straight lines ( s1 , & s2 ) and I have shown left and right part of the polyline by Left and right respectively.
I am showing insertion sequence ...
0
votes
0
answers
37
views
U shaped poly-lines giving a trouble in selecting other poly-lines in Qt
I have QGraphicsView which contains many rectangles and polylines. My view looks something like this.
If I click on position A , B, C , D orange color polyline gets selected. If I try to select ...
0
votes
0
answers
37
views
Text is not appearing at specified position in Qt
I have a QGraphicsView which contains many QGraphicsItem like rectangle, polylines etc.
I want to name each rectangle and name is on the rectangle.
Name should be centrally aligned i.e. half of the ...
0
votes
0
answers
34
views
How to add Horizontal scrollbar in one of the column in QTableView in Qt?
I have a QTableView with 3 columns. The columns are Name,Type,Show. I want to add Horizontal Scrollbarin Name column as names in that column are lengthy.
How to add Horizontal scrollbar in one of the ...
0
votes
0
answers
10
views
How can i remove/hide qframe's white line?
env: qt4.8.6 cpp
how can i remove these white thing and scroll bar?
it's a qframe embed a third exe, but i dont want these white line and scroll bar.
these horizontalline verticalline have 10px width,...
0
votes
1
answer
35
views
Undo-Redo functionality using Command-Pattern in Qt for FitInView feature
I have QGraphicsView which contains some QGraphicsItem. This view has some feature like zoom-in, zoom-out, fitIn, Undo-Redo.
My fitIn feature is not working in Undo-Redo functionality.
( To implement ...
0
votes
0
answers
54
views
Can we use multiple stack in Qt's Undo Framework (Command Pattern )
I am having a QgraphicsView which contains multiple QGraphicsItem. I have some features like zoom-in, zoom-out, Hide - Unhide selected item, Undo-Redo.
To implement Undo-Redo feature, I am using Qt's ...
0
votes
0
answers
39
views
How to show, hidden QGraphicsItem in Qt?
I am having QGraphicsView, which has multiple QGraphicsItem's. In QGraphicsItem's, I am having few rectangles and some polylines. Polylines are attached to rectangles.
I have a feature Hide Rectangle ...
0
votes
1
answer
68
views
How to implement undo-redo functionality in hiding QGraphicsItem using Command-Pattern in Qt?
I am having a QGraphicsView which contains some QGraphicsItem I have a feature (Hide Item) which on mouse right click, hide desired QGraphicsItem(Rectangle) and its connected polylines. I have a Undo-...
0
votes
0
answers
34
views
Text is not appearing on QGraphicsView in Qt
I am having a QGraphicsView which contains some QGraphicsItem. I want to put name on each QGraphicsItem. For that I have created class myText which is inheriting QGraphicsTextItem.
But the issue is ...
1
vote
0
answers
18
views
QtQuick 1.1 Image Rounded Corners
I am limited to using QtQuick 1.1 (Qt 4.8) , and so have no access to the GraphicalEffects library. Also I am not able to use any C++ and so the solution has to be pure QML (frustrating limitations - ...
0
votes
0
answers
33
views
Will paint(), redraw everything from scene or will redraw only updated items in Qt?
I have QGraphicsView which contains many QGraphicsItem such as Rectangle, polylines. I have overriden paint() method. I am drawing QGraphicsItem using boost-graph. While drawing items, I am storing ...
0
votes
0
answers
47
views
How to unhide, hidden QGraphicsItem in Qt?
I am having QGraphicsView, which has multiple QGraphicsItem's.
In QGraphicsItem's, I am having few rectangles and some polylines. Polylines are attached to rectangles.
I have a feature Hide Rectangle ...
0
votes
0
answers
60
views
How to use QPainter::setTransform in paint() in Qt?
I have a simple QGraphicsView with text written over it.That text is wrapped under a bounding rect. I have truncated a text using QFontMetrics::elidedText.
When initially view gets loaded, it shows ...
0
votes
1
answer
59
views
How to truncate a string wrapped in a bounding rect in Qt?
I have a simple QGraphicsView with text written over it. That text is wrapped under a bounding rect. I want to truncate the leading characters of text according to width of the bounding rect.
If my ...
0
votes
0
answers
93
views
How to detect / avoid overlapping of text in Qt?
I am having QGraphicsView, which has multiple QGraphicsItem's. On QGraphicsView I am performing multiple transformation like zoom-in, zoom-out, Fit-in etc.
In QGraphicsItem, I am having few rectangles ...
0
votes
0
answers
30
views
mousePressEvent() is not called until mouse is released or moved in Qt4.8, Embedded linux
I am writing Ui application for an embedded device running on Embedded Linux. Each widget has QSS styles for "focused" cases. But widget that has focus does not get styled immediately after ...
1
vote
0
answers
112
views
Qt Creator debugger just show local variables
I am using QtCreator5.14.0 MinGW-64bit and I wrote this code :
(do not check the code, it is correct , my problem is another thing)
#include <iostream>
using namespace std;
#define ...
0
votes
0
answers
12
views
Double characters on RHEL8 default GNOME
ALL,
We have a software that was (and is) running perfectly on RHEL7 default GNOME and MATE.
Now we switched to RHEL8 and what we see is that when theuser types a character that character is displayed ...
0
votes
0
answers
52
views
Qt UTF-8 characters work as literal but not as code point
So I was trying to use 'ZERO WIDTH SPACE' (U+200B) in my Qt 4.8 compiled with MSVC 9.0 project and encountered a problem:
// This works
QString::fromUtf8("TestString"); // Note the zero ...
0
votes
1
answer
43
views
qt4 the clicked signal in the connect button doesn't trigger the settext in the label
The app runs okay but the clicked() signal doesn't trigger the setText() of the label. Any hint why it doesn't?
#include <QApplication>
#include <QLabel>
#include <QPushButton>
#...
0
votes
0
answers
85
views
qt 4 is not going to be installed in Ubuntu 20.10
What needs to be done for a correct qt 4 from the source code?
$ git clone https://github.com/oudream/qt-4.6.4.git
$ cd qt-4.6.4/
$ chmod +x configure
$ dos2unix configure
$ mkdir build_qt
$ cd ...
0
votes
0
answers
148
views
X11: How to get current top-left corner coordinates in visible area, when panning with mouse?
I'm using an X-Server session without any window manager (I don't want), with xdotool and programming with qt4.
After started X-Server from root session in simplest way with command X :0,
from ...
0
votes
0
answers
120
views
RTSP with VLC-QT (Qt4): libvlc: video output creation failed
I wrote a Qt4 widget to stream network video using vlc-qt library. Of course it works on my PC but I get the following errors when I try and run my application on the target machine (Deb 8):
libvlc: ...
0
votes
0
answers
37
views
QT4: how to generate header files from ui
I'm working on a legacy project written in cpp under Visual Studio 2010. This is a desktop application built with QT4.
I'm an absolute beginner in the QT world, so maybe the question I'm going to ask ...
0
votes
1
answer
25
views
Changing the tab design in Qt
How to edit the tabs separately, I want to place the background image on tab 1 different from tab 2.
QWidget::tab {
border-image: url(:/Tabs/tab_notclick.png);
min-width:96px;
min-height:18px;
}
...
-2
votes
1
answer
179
views
"No decoder available for type 'video/x-h264
I am running qt video player I made but every time I load a mp4 file or mp3 it gives me this error.
MP4:
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, ...
0
votes
0
answers
47
views
QODBC driver retrieve wrong bigint value from query while QMYSQL works fine
I've a mysql database with following table:
CREATE TABLE `scenario_configuration`
(
`id` BINARY(16) NOT NULL,
`filename` VARCHAR(512) NOT NULL,
`hash` BIGINT UNSIGNED NOT NULL,
`...
0
votes
1
answer
185
views
Install Qt4 on macOS Big Sur
I want to install qt4 on my mac, but whenever I type in brew install qt@4 I get the error
x86_64cpuid.s:273:7: error: invalid token in expression
cmpq $0,%rax
^
x86_64cpuid.s:273:7: error: ...
0
votes
0
answers
53
views
Qt4 and Qt5 QPlainTextEdit incompatibility
I'm trying to build a program via Qt4, which was written on Qt5. My UI form have QPlainTextEdit and I receive following errors:
'class QPlainTextEdit' has no member named 'setSizeAdjustPolicy'; did ...
0
votes
1
answer
79
views
How to set a custom font size on a widget that adapts accordingly after an application font size change?
I am using Qt4 (I know), and have a custom widget that sets a bold font, with a point size that is 1.5 times the point size of the application font. This works without problems.
The problem now is ...
0
votes
1
answer
204
views
How to trigger a .sh file or a bash command on a Qt4 button click?
Right now, all I have is my QML file, with the button.
/*PlasmaComponents.*/ToolButton {
id: shutdownButton
text: i18n("Shutdown")
iconSource: "system-shutdown"
...
0
votes
1
answer
396
views
Can't get Qt Creator debug working on Windows 10
I'm starting to work with Qt 4.8.4 on Windows 10, and I've been trying to use the debugger for two days, but I just can't get it to work.
First of all, I've downloaded MinGW 4.4, and that's the ...
0
votes
0
answers
34
views
QGraphicsItem returns impossible pos() value
Qt 4.8 Linux
When move QGraphicsRectItem with mouse and item visualy remains inside the scene:
auto new_bnd_rect = child->sceneBoundingRect();
qDebug()<<new_bnd_rect.topLeft()<<child-&...
0
votes
1
answer
40
views
cconfig.obj and cutility.obj error lnk2001. Cannot find any info on those 2 obj files
I keep having an issue when compiling on QTcreator. It is QT4 based on a qt3 code.
I fixed most of the issues I encountered but this one I am stuck on.
22:54:57: Running steps for project brickstock......
1
vote
0
answers
101
views
Compiled QT program crashes when not debugging
I'm debugging a weird issue where program only crashes when it is not ran with any debugging.
So if the program crashes and I debug it with Visual Studio it works fine. Also if I run it from QT ...
0
votes
1
answer
43
views
User Interface Compiler (Uic) qt3 vs qt4/5, impl argument equivalence
I would like to know what happened to the -impl argument in qt4/5 that was available in qt3?
qt3 : https://doc.qt.io/archives/3.3/uic.html
qt5 : https://doc.qt.io/qt-5/uic.html
This argument is gone ...
0
votes
1
answer
261
views
("Solved")LFS QT4 (4.8.7) Install Fails at "dialogs/qprintdialog_unix.cpp"
I have been following the blfs guide on KDE and I needed QT4 for one of the dependencies of "KDE-Baseapps". Running:
./configure -prefix $QT4PREFIX \
-sysconfdir /etc/xdg \
-confirm-license \...
2
votes
1
answer
427
views
How to install qt4 in alpine 3.12
How do I install qt4 in alpine by using apk add?
It seems, that it is not anymore in the list.
Do I have any chance?
0
votes
2
answers
135
views
How to determine the signal that terminated a QProcess with Qt4 on Linux?
I want to detect the QProcess I launched was terminated externally by either SIGKILL or SIGTERM. This is important in distinguishing between a crash (bug) and an external interference when I've ...
0
votes
1
answer
171
views
Qt foreach() only iterates once, ignoring the rest of the items
I'm trying to add some features to an older Qt4 application, and I'm new to Qt. The application uses the foreach keyword which I believe is implemented by Qt. However all foreach loops in the ...
1
vote
1
answer
102
views
QMake variables not changing when modified in a .pri function
I have created a qmake function that includes a .pri file:
defineTest(add_my_lib) {
lib_name = $$1
message("adding lib$$lib_name ")
include(mypath/$${lib_name}.pri)
}
in this .pri file I ...
0
votes
2
answers
182
views
Can't set up qtools in common-lisp SBCL
I'm a beginner in lisp and I'm unable to find out how to correctly use defpackage to load qtools (on arch linux).
For simplicity if I run this example project in sbcl with loaded quicklisp
https://...
0
votes
1
answer
133
views
How to use ASIO along with QT4?
I have written a C++ 11 code using asio to send/receive the packets from network. To work with asio, asio::io_service::run() need to be called and the main thread will be waiting in this function.
Now,...
1
vote
1
answer
65
views
use QModelIndex to set background of a QTreeWidgetItem
I have MainWindow with a qTreeWidget. To add elements to this widget I've implemented this functions:
QTreeWidgetItem *MainWindow::prepareIt(QTreeWidgetItem *it, const QString &name, const ...
0
votes
1
answer
119
views
Set current index of QComboBox inside QTableWidget
I have QComboBox inside QTableWidget. It was created like this:
QComboBox* bb = new QComboBox(this);
ui->propsWidget->setCellWidget(1, 0, bb);
for (...)
bb.addItem(...);
I need to set its ...
0
votes
2
answers
82
views
Deleting allocated memory by pointer doesn't work
I'm creating a application in C++ with the QT framework which includes a HTTP POST request.
The value the reply pointer points to doesn't get deleted and causes a memory leak.
I have tried to delete ...
2
votes
1
answer
480
views
How to set up qt4 with cmake in Ubuntu?
I'm currently trying to set up qt4 to work with cmake in the CLion IDE, however I'm having trouble specifying the install path. I'm running Ubuntu so I downloaded qt4 with sudo apt install qt4-default....
0
votes
1
answer
278
views
How do I receive QList<QVariantMap> over dbus in qt 4.8?
I have C++ code that communicates with another process which returns a list of string->variant mappings, in other words a QList<QVariantMap>. In QT5 I can demarshall QDbusArgument reply as ...
3
votes
1
answer
2k
views
How to Install qt4 on macOS with homebrew?
I need to install the qt4 C++ framework for one of my classes. I tried using the regular installer from the download archives page for both qt4.7 and qt4.8, however I get the warning:
"Installing ...