Qt Forums » C++ Gurus
368 FOLLOWERS
This category of Qt Forums is for all discussions in C++ land.
Qt Forums » C++ Gurus
21h ago
Here is a Qt doc summary of "what is QMdiArea"
QMdiArea functions, essentially, like a window manager for MDI windows. For instance, it draws the windows it manages on itself and arranges them in a cascading or tile pattern. QMdiArea is commonly used as the center widget in a QMainWindow to create MDI applications, but can also be placed in any layout. The following code adds an area to a main window:
Here is how widget to be added is defined :
SettingsDialog::SettingsDialog(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::SettingsDialog),
m_status(new QLabel),
// #3 sequence ..read more
Qt Forums » C++ Gurus
2w ago
@JonB said in How to add "new line " to QString ?:
qDebug().noquote() << "First line\nSecond line";
Thanks, works as expected ..read more
Qt Forums » C++ Gurus
2w ago
My main project class is QMainWindow.
Its "layout (?)" is mdiArea.
I have minimal problems connecting between objects/ variables which are variables of the main class.
QrDesigner " slots editor" works just fine - as long as it knows the object is assigned as main class variable.
Now for the issue
since I am using mdiArea and adding subwindows as needed they are NOT part of the main object variables., hence the "slot editor" has no knowledge about them.
Should I add all future subwindows as parameters to the main class ?
Or is there another solution ?
I prefer to continue using QtDesigner "slot ..read more
Qt Forums » C++ Gurus
2w ago
@Qt-embedded-developer said in what is best architecture to share data between front end and backend using thread ?:
Hi I want to know what architecture i need to use when backend use shared memory for send data using std::thread and front end of QT and QML need to use that data to process and show on ui application.
Your question is incomplete. What do you mean by backend and what by frontend. Either can live in the same process, or be separate processes, or even on separate machines (e.g. communicate over a network). The choice of architecture is driven by the use case.
At same time if fr ..read more
Qt Forums » C++ Gurus
2w ago
@inglis-dl adding: also tried variations on -I and -L path names such as / or \ separators as well as adding paths to windows system PATH envar ..read more
Qt Forums » C++ Gurus
3w ago
@AnneRanch Are we now in the "Remove the threads I don't like" phase again ..read more
Qt Forums » C++ Gurus
3w ago
@JonB said in TEMPLATE = lib ?:
that is not to do with you including or not including .h files in .cpp files.
That has been discussed and concluded TRUE.
Let's move on...
It is to do with your code actually calling a function in another .o file and that not being passed to the linker to resolve.
That is NOT the case - I have described how I use "add library"
to add it to subproject .pro file - who is using it.
Let's move on...
I suspect the link to .so IS THE issue ..read more
Qt Forums » C++ Gurus
3w ago
@jdent
As @Christian-Ehrlicher says, who knows, behaviour may be compiler-specific and it does not claim to check everything, I think. My own guess is that the call to showing the dialog avoiding the detection may well be "coincidence", nothing to do with the specific call, many other things might cause it to skip.
Under Ubuntu, Qt 5, gcc and .pro file having
CONFIG+=sanitizer CONFIG+=sanitize_address
it does report a SIGABRT on code like yours, whether I put in a QDialog and/or exec() or not. I do not know whether you can use those CONFIG lines from Qt with MSVC or not.
One tiny thing: just i ..read more