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,295
questions
-1
votes
0
answers
25
views
How to read/write whole drive in Qt?
I'm looking for a Qt class to handle whole drive like the following Windows APIs:
HANDLE hd=CreateFile("\\\\.\\C:",GENERIC_READ,...);
...
ReadFile(hd,...);
WriteFile(hd,...);
QFile seems to ...
1
vote
1
answer
59
views
Why is this QAbstractItemModel based model not working?
I create a simple QMainWindow app as follows:
The header file:
//mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QAbstractItemModel>
#include <QTreeView>
#include <...
0
votes
1
answer
11
views
Qt5: "socket notifiers cannot be disabled from another thread" issue
I am also facing a similar issue I have a C++ Qt application built on Qt4 and all QTcpSocket implementation was working as expected when I migrated to Qt5 I got this issue:
socket notifiers cannot be ...
0
votes
1
answer
205
views
how to install Pyqt4 currently on raspberry pi 3 in python 2.7?
I just installed a raspberry pi operating system on a micro sd memory to migrate to this a system that works with pyqt4, but I have the problem that now I cannot install PyQt4 on this new operating ...
0
votes
0
answers
20
views
GroupedDragging in Qt4
In Qt5 I can set the GroupedDragging dock option to my QMainWindow to allow dragging a tabbed dock widget into a new docking area. Is there a way to achieve this same functionality in Qt4. ...
0
votes
0
answers
62
views
Compiling Qt 4.5.0 without QT_NO_CAST_FROM_ASCII
For refactoring an existing project with some older code, I need to compile Qt 4.5.0 as static library, on Windows using the MSVC v143 compiler (Visual Studio 2022).
I'm using configure.exe -static -...
0
votes
0
answers
52
views
Compiling a Qt4 project with GitHub Actions on Windows
I have an old Qt4 project that I’ve been able to compile on Ubuntu, but I’m struggling to do the same on Windows using GitHub Actions. I’ve searched extensively online but haven’t found any resources ...
0
votes
0
answers
29
views
When porting Qt4 to QT5, it prompts that #include<QX11Info> cannot be found
When porting Qt4 to QT5, it prompts that #include cannot be found
I have QX11Info under Qtx11Extras, but it reported #include not found.
I want to reference the code written in qt4 as a library in my ...
0
votes
1
answer
37
views
Connecting a function to QHttp::requestFinished
I am using Qt 4.1, the last version that compiles to Windows 98 (although I am running this on Windows XP because I have an AMD processor which cannot virtualize win98). I do not have access to more ...
0
votes
1
answer
47
views
In Qt4.8, add a QToolButton to a QMenu, the auto connect not work
I have a QToolButton button1 with a popup QMenu menu. I add another QToolButton button2 into the menu. I have already defined the ObjectName. But the auto connect only works for button1, not button2.
...
0
votes
1
answer
27
views
Unable to retrieve the y-coordinate of the selected cell of a QTableWidget
I'm implementing a QTableWidget in my Qt app (version Qt 4.8).
This QTableWidget is made of 18 QTableWidgetItems
When the user wants to change the current selected cell, it just calls:
tblWdgList->...
0
votes
1
answer
1k
views
How to investigate heap corruption on Windows?
I've observed a crash to desktop. After debugging it turned out that it was somehow due to an unintended destruction of an object, but I'd like to understand why this results in heap corruption. And ...
0
votes
1
answer
364
views
Convert custom type to QVariant
I have my custom type:
enum class MyType : int {
TYPENAME1 = 0,
TYPENAME2 = 1,
TYPENAME3 = 2
};
I need to convert MyType to QVariant. I tried qDebug() << QVariant::fromValue(...
0
votes
0
answers
224
views
How to remove default blue selection of QTreeWidget?
I have a QTreeWidget with rows having some colors. When I try to select row (using mouse click) row's color changes to blue.
I have clicked on middle row
To avoid change in color, I used following ...
0
votes
1
answer
252
views
How to convert a TIF file into a BMP file in C++98 using QT 4?
I am new in C++. How can I convert a TIF file into a BMP file in C++98?
Here is my "newForm.h".Here is private slots for loading tiff and coverting the image.
#ifndef _NEWFORM_H
#define ...