Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible.
Thanks for reporting this.
Hi and welcome to devnet,
You are using a relative path so your application will not find the file as it is not located in the same folder.
On an unrelated not, please give your thread a meaningful title and put the actual text of your enquiry as the body of the post along with your code.
My question came because I did not notice a big drop so I did not know what I should be watching for.
As for the update, repainting will also depend on the hardware you use. You can't get faster than what your graphics card/screen combo allows. And you also have to think that the human eye still works at around 24fps so trying to update your numbers at high speed will not really make them more visible. Triggering meaningful updates will always be better, you'll perform well on a wider range of hardware.
It's quite different to export to CSV versus actually printing to a pdf as with
CSV file the number of columns doesn't matter but with actual printing, you have the page limits to consider.
So do you need actual printing (PDF) or is data export just fine ? ( CSV)
With CSV you will get a file which you have to print using excel or other app than can import CSV file.
Thanks a lot for the suggestions, I will look in to them!
I am still not sure how the QTcpServer works exactly. Is it only listening on the local network when using QHostAddress::AnyIPv4?
Is it "safe" to use a QTcpServer that is listening for QHostAddress::AnyIPv4? I mean, if it is possible for computers outside the local network, is there any risks using it?
After reading your posts, it sounds like it will take some time to make it possible to play over internet, so I think I will stick to the local network while I try to learn more. Do you have any other suggestions when using QTcpServer for a local network?
If you want to add columns/rows beyond what the SQL returns (and don't want to manipulate the query to returns these extras, which is a different possibility), you need to interpose some some kind of QAbstractProxyModel between the SQL model and the QTableView.
Here is the output of the debugging it.
It would see they all have the same id.
You don't usually need a thread for a socket. Just leave the socket in the GUI thread. Qt socket classes and other communications classes are asynchronous.
i am running a server and i would like to use blocking since that is how i set my sockets up.
but i am not sure how you want me to call it if not like i am doing right now.
Thank you all.
The application is responsible for reading the page order and printing accordingly.
Not all developers of QT programs are aware of this.
Many of them think something like: "My program has no control over the print process. It only calls Qt's print dialog; the rest is done by Qt (and CUPS)."
You should reinstall Qt to make sure everything works correctly. Some of the Qt tools - especially qmake - have the installation path baked in. They will not work right away when copied to a different directory. I believe there is a way to fix the paths. However, I cannot remember and I don't know which tools need fixing. To be safe: reinstall Qt in the proper location. It's way easier.
@SGaist , I'm running in ubuntu 18, but I tried in windows as well, and the results is the same. I'm thinking to convert the data from the camera to image, cut, rotate and set them over a QLabel, but I don't know if this method is going to be the best way, because I would like to capture 15 fps at less.
@Ketan__Patel__0011 said in QFuture<void> Thread is not Starting:
try to start and stop both function again and again
As written in documentation, to start a new function there must be an available thread in the used thread pool:
Runs function in a separate thread. The thread is taken from the global QThreadPool. Note that function may not run immediately; function will only be run once a thread becomes available.
You could check before starting function how many thread are already used:
qDebug() << "Allowed thread:" << pool.maxThreadCount()
<<"/ threads in use:" << pool.activeThreadCount()
<< "/ available threads:" << (pool.maxThreadCount() - pool.activeThreadCount());
The more general term for this is object serialization: translating the object into a well defined format that can be saved to disk or transfered across a network. I'd advise that instead of reinventing and coming up with a custom format. You should review existing formats like XML or JSON, and if appropriate, then acquire or write translators to go between native format and the "serialized" format. Qt already has some serialization capabilities but I don't use them so I'm not sure what specifically exists.
If using overloaded signals see https://stackoverflow.com/questions/16794695/connecting-overloaded-signals-and-slots-in-qt-5
???What are you doing?
Setting size in a layout is meaningless, they will be resized by the layout in anytime.
You should use layout functions to control their size, instead of calculating by yourself.
auto *button1 = new QPushButton(QLatin1String("b1"), parent);
auto *button2 = new QPushButton(QLatin1String("b2"), parent);
QVBoxLayout *renderLayout = new QVBoxLayout;
renderLayout->addWidget(button1, 0, Qt::AlignLeft);
renderLayout->addWidget(button2, 0, Qt::AlignLeft);
Here's the problem, by default QPushButton has a minimum size hint of about (80, 20) in all kinds of styles.
So if your text is not long enough, it will probably use 80 as the width.
If you need it to be shorter, I prefer using QToolButton instead, it doesn't have such minimum value.
The problem is I also use this model in qml.
So that means in QML ever time I change the database I have to create a new model?
I was thinking about swapping the new model with Loader in QML.
Also in reality it is not directly QSQLModel. It is a class derived from it defining already a specific format for the tables. So setQuery is not an option in this case-
@cdemuru said in BackgroundRole color change not taking effect in QTableView with stylesheet:
It works fine except when I apply a stylesheet.
As described in the documentation: "Note: If Qt Style Sheets are used on the same widget as functions that set the appearance of widgets, such as QWidget::setFont() or QTreeWidgetItem::setBackground(), style sheets will take precedence if the settings conflict."
Use a custom QStyledItemDelegate.