QLibrary is a class from the Qt Toolkit which loads shared libraries at runtime.
Questions tagged [qlibrary]
24 questions
6
votes
1 answer
QLibrary - import a class
I have a QT library and I want to import it in another project.
Now, since I want that, even when I modify the library, the other project does not need to be compiled again, I started using QLibrary.
But... I can't import a class. Or better, I can…

frarugi87
- 2,826
- 1
- 20
- 41
2
votes
1 answer
QLibrary functions work slow on first call
I'm using QLibrary to load functions from one .dll file.
I succesfully load it, succesfully resolve functions.
But when i use some function from that .dll for the first time, this function works very slow(even if it is very simple one). Next time i…

Ivan
- 43
- 4
2
votes
2 answers
Loading library with dependency with QLibrary
Suppose I have two libraries, A.dll and B.dll. The library A depends on B. I want to load A into my project.
My project is in C:/Project. If I keep both A.dll and B.dll in C:/Project, I can load A with:
QLibrary lib("A");
lib.load();
This works…

liewl
- 4,021
- 13
- 46
- 65
2
votes
2 answers
Qt and Linking to an external DLL
I've developed a program and I am trying to make this program work with a controllable light source manufactured by some other company. I've emailed the company and they have agreed to send me their external library as a DLL.
I have developed all of…

stackunderflow
- 10,122
- 4
- 20
- 29
1
vote
0 answers
QLibrary load/resolve problem with QWidget
I have the following Dll, which should show a single QWidget:
file testqtlib.h
#pragma once
#include
#if defined(TESTQTLIB_LIBRARY)
# define TESTQTLIB_EXPORT Q_DECL_EXPORT
#else
# define TESTQTLIB_EXPORT…

Borys L.
- 145
- 1
- 9
1
vote
1 answer
QLibrary: How to create two instances from one .so file?
QLibrary works fine to obtain one set of function pointers from one instance of an .so library. However, it does not work when trying to obtain two different instances of function pointers from the same .so file. Both sets of pointers point to the…

ijk
- 47
- 5
1
vote
1 answer
How do I create and load lib dynamically in Qt C++
As described on https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application I would like to create dll (Windows 10) and load it dynamically be using QLibrary as plugin.
In Dependency Walker I see that exports and dll could be…

Adi
- 50
- 1
- 8
1
vote
2 answers
QLibrary is not loading DLL
I want to load DLL in a C++ program and create function pointers. To avoid any confusion, I am providing the absolute path of the DLL. But still, the DLL is not loaded.
My Code:
void CallFunctionPointers()
{
QString strMsg;
QString…

skm
- 5,015
- 8
- 43
- 104
1
vote
1 answer
Q Library Promise Pattern for retrieving multiple XML files and displaying them in order
I implemented this:
It's possible to 'GET' multiple XML files with javascript?
However, my problem is more complex because I have a much larger number of xml files (40).
I made the promises array like so:
var promises = […

Steve
- 37
- 6
1
vote
1 answer
Loading library with QLibrary
I found the following code for loading libraries in Qt but I do not fully understand how it works. Could someone explain to me from: typedef int (*MyPrototype)(int, int);?
int r1 = 0;
QLibrary library("mathlib.so");
if (!library.load())
…

Omari Celestine
- 1,405
- 1
- 11
- 21
1
vote
2 answers
QLibrary load with -rpath
I have an executable A which dynamically loads B.so, which in turn depends on C.so. C.so is not in the same folder as A and B.
I am trying to load B.so using QLibrary.load() but fail to do so as QLibrary.errorString() returns library C.so could not…

Markus Schlafli
- 170
- 4
1
vote
4 answers
Access ui pointer from a library (DLL) function
hi all i want to update ui from a non member function. Any help other than passing 'this' pointer as my non member is a callback from library.
Below is my code :
mainwindow.cpp
static void callback(QString result)…

Naveen kumar Katta rathanaiah
- 165
- 1
- 1
- 7
0
votes
0 answers
How to allocate qt classes in dll
I am trying to implement plugin system for my project. I am using Qt 5.15 and static Qt libraries. I have a plugin dll that implements my custom interface. I am using QLibrary to load dll library without any problem. However, while I am trying to…

Doğukan Fikri Arat
- 11
- 2
- 3
0
votes
1 answer
QLibrary::load fails, but LD_LIBRARY_PATH just updated correctly before that, why?
I have a library (let's call it mydll.so) that is dependent to an external application, i.e. Matlab. To dynamically load mydll.so, I have written a code like this (Ubuntu, g++ 4.8.5, qt 5.12.6):
// update LD_LIBRARY_PATH with ALL required paths…

TonySalimi
- 8,257
- 4
- 33
- 62
0
votes
0 answers
QLibrary fails to load .so file
I am trying to load a simple C based library interface that is contained of few functions, and compiled with qt as template lib. When I follow the standart way of loading the library, my QLibrary::load() fails. Here is the code:
bool…

Ilian Zapryanov
- 1,132
- 2
- 16
- 28