Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Qt5 and system-wide dark mode

    Unsolved
    1
    0 Votes
    1 Posts
    273 Views
    No one has replied
  • Layout managers screen connection effect

    Unsolved
    4
    0 Votes
    4 Posts
    284 Views
    M
    As the icon explicitly stated, frame 27 has no layout.
  • Error when launching rqt

    Unsolved
    9
    0 Votes
    9 Posts
    20k Views
    J
    @JonB , @jsulm , @Pl45m4 Thanks everyone. I managed to have the problem resolved based on your suggestion and advices. 1. "could not connect to display" error Because the x-server was trying to connect the remote x-client. But the x-client was not launched. After launching VcXsrv, connection was established and the GUI app appeared on the remote PC (i.e. x-client side). 2. however, still have some error message Although the connection was successful, x-server reported the following error: libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast Managed to find the solution posted at https://itectec.com/ubuntu/ubuntu-win10-linux-subsystem-libgl-error-no-matching-fbconfigs-or-visuals-found-libgl-error-failed-to-load-driver-swrast/ All error messages are gone by now. Hope this post benefit those who are having the same problem as mine. Thank you very much guys!
  • Getting a QtChartView inside of a QGraphicsView

    Solved
    4
    1 Votes
    4 Posts
    2k Views
    M
    @SGaist said in Getting a QtChartView inside of a QGraphicsView: ce QChartView Thanks for the answer. Yes i was just desperatly trying to do something.. I have already fixed my issue, but thanks for another solution.
  • Problem when using Qt 6.2.2 with QgsApplication

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    K
    Thank you @mchinand and @Christian-Ehrlicher for your answers. That problem has been solved, and I have another problem now. /usr/bin/ld: main.o: in function `__cxx_global_var_init.8': /home/unibw/dev/cpp/QGIS-Debug-Build/../QGIS/src/core/qgsapplication.h:1020: undefined reference to `QgsSettingsEntryStringList::QgsSettingsEntryStringList(QString const&, QgsSettings::Section, QList<QString> const&, QString const&)' /usr/bin/ld: mainwindow.o: in function `__cxx_global_var_init.8': /home/unibw/dev/cpp/QGIS-Debug-Build/../QGIS/src/core/qgsapplication.h:1020: undefined reference to `QgsSettingsEntryStringList::QgsSettingsEntryStringList(QString const&, QgsSettings::Section, QList<QString> const&, QString const&)' clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:320: Cpp_GUI] Error 1 and the line 1020 in qgsapplication.h is : https://qgis.org/api/qgsapplication_8h_source.html#l01020 The error comes from the library file. I looked at issues on QGIS Github but couldn't see this error. Do you have an idea about this?
  • QNetworkAccessManager and client certificate

    Solved
    1
    0 Votes
    1 Posts
    261 Views
    No one has replied
  • How to change Qt's default selection behavior?

    Unsolved
    4
    0 Votes
    4 Posts
    459 Views
    jsulmJ
    @tushu said in How to change Qt's default selection behavior?: class ellipse : public QGraphicsItem Shouldn't you subclass QGraphicsElipseItem as @SGaist already suggested?
  • Handling of Surrogate Pair Characters

    Solved
    3
    0 Votes
    3 Posts
    372 Views
    M
    Thank you for your response. You've been very helpful.
  • Why are there two contexts instead of one?

    Unsolved
    1
    0 Votes
    1 Posts
    146 Views
    No one has replied
  • Bluetooth examples = btscanner and btchat

    Unsolved
    6
    0 Votes
    6 Posts
    671 Views
    M
    @AnneRanch Yes, I do. And there are multiple valid contexts for the word "error" (for example, overriding QBluetoothServiceDiscoveryAgent's implementation, handling the signal by the same name, or just referring to the general idea of an error -- we can't tell, because we aren't sitting next to you). Also version and OS is not a sideline. It's directly relevant to any quirks that you may be running into, and also to any advice (e.g. varying support by build kit, the version of the example itself, etc.). It's also fairly basic information to provide when asking a question about an API of any sort. So, please, either state your question clearly, or don't get any help. And above all, be nice. The people here volunteer to spend time helping strangers.
  • Might Qt subsystem initialization time depend on compiler optimization level?

    Unsolved
    2
    0 Votes
    2 Posts
    262 Views
    kshegunovK
    @Andreas-Schacherbauer said in Might Qt subsystem initialization time depend on compiler optimization level?: Could it be that Qt subsystem initialization (font rendering for example) performance depend on the compiler optimization level that was used during the Qt build? Absolutely. Or are there other ways to improve the performance of e.g. setting up font rendering? For production use the most optimized build you can muster.* For development, you might want to have a debug build. I'm asking this because we have a binary that was build with an older version of Qt (probably 5.10.x) which initializes font rendering 4x faster then if we build the same version of Qt ourselves. Is it the same compiler? Do you enable the same sort of optimizations? For example, do you see -march=native or -mavx2 or stuff like this? It may very well be that the prebuilt version is well optimized for the hardware, while yours may not be. * Except in some niche cases (e.g. you may use a release build with debug information to track a bug or profile a piece of code)
  • Adding indexed widgets ?

    Solved
    4
    0 Votes
    4 Posts
    406 Views
    Christian EhrlicherC
    You want to store a pointer in an array of objects --> ui->pushButton is a pointer, not an object. Use an array of pointers instead.
  • This topic is deleted!

    Unsolved
    26
    0 Votes
    26 Posts
    112 Views
  • Qt installation on macOS 10.13.6

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    jsulmJ
    @SPlatten You don't download a Kit. Again: you downloaded QtCreator offline installer and it contains exactly that: QtCreator, nothing more (also not maintenance tool). To get a kit you have to install Qt. Either use Qt Online Installer or a Qt Offline Installer. QtCreator != Qt
  • 0 Votes
    9 Posts
    4k Views
    Vivek_AV
    I changed the destructor code of RTLSClient to RTLSClient::~RTLSClient() { workerThread.terminate(); if(!workerThread.wait(3000)) //Wait until it actually has terminated (max. 3 sec) { workerThread.terminate(); //Thread didn't exit in time, probably deadlocked, terminate it! workerThread.wait(); //We have to wait again here! } } now app not showing ..QThread: Destroyed while thread is still running but it not responding when opening
  • QPSQL driver not loaded

    Solved
    22
    0 Votes
    22 Posts
    16k Views
    ivanicyI
    @ivanicy Well, I have solved the problem. I have copied this dlls from PostgreSQL to the .exe folder: libiconv-2.dll libintl-8.dll libpq.dll and... it works!! Maybe the problem was that I created this app before I installed the PostgreSQL and the app doesn't integrate the postgre dlls or something like that. In any case, copying this dlls solves the problem. Thank you very much guys for your help!!
  • Adjust text start position in linedit

    Solved
    2
    0 Votes
    2 Posts
    238 Views
    jsulmJ
    @IknowQT Maybe https://doc.qt.io/qt-5/qlineedit.html#setTextMargins ?
  • QAxObject & MS Word 2016+

    Unsolved qaxobject word ms office
    8
    0 Votes
    8 Posts
    2k Views
    U
    Noticed another feature (word 2007). Created this app: #include "mainwindow.h" #include "ui_mainwindow.h" #include <ActiveQt/QAxObject> #include <ActiveQt/qaxbase.h> #include <QDir> QAxObject *word, *objVBComp, *objCodeMod; QString VbaScriptLine = "Sub MacroCreatedByUser() : ActiveDocument.VBProject.References.AddFromGuid \"{00020802-0000-0000-C000-000000000046}\", 1, 5 : End Sub"; QString OpenFilePath = "input.doc"; QString SaveFilePath = "output.doc"; QString MacroName = "Test macros"; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_pressed() { word = new QAxObject( "Word.Application" ); word->setProperty("DisplayAlerts", - 1); word->setProperty("Visible", true); QString PathTmp = QDir::toNativeSeparators(QDir::currentPath() + "\\" + OpenFilePath); word->querySubObject( "Documents()" )->dynamicCall( "Open(FileName, ConfirmConversions, ReadOnly )", QDir::toNativeSeparators(QDir::currentPath() + "\\" + OpenFilePath), false, false ); objCodeMod = word->querySubObject( "ActiveDocument" )->querySubObject( "VBProject" )->querySubObject( "VBComponents" )->querySubObject("Item(Index)", 1)->querySubObject( "CodeModule" ); objCodeMod->dynamicCall( "AddFromString(QString)", VbaScriptLine ); word->querySubObject( "Application" )->dynamicCall( "Run(MacroName)", MacroName ); word->querySubObject( "ActiveDocument" )->dynamicCall( "SaveAs( FileName, FileFormat )", QDir::toNativeSeparators(QDir::currentPath() + "\\" + SaveFilePath), 0 ); word->querySubObject( "ActiveDocument" )->dynamicCall( "Close(SaveChanges)", 0 ); word->dynamicCall( "Quit()" ); delete word; } While executing the line: «objCodeMod->dynamicCall( "AddFromString(QString)", VbaScriptLine );» Windows OS fixes an error in the WINWORD.EXE application: [image: 63eb672b-c89d-4909-8c80-c2f848fd5795.png] Despite the error, the macro is added and called as expected.
  • 0 Votes
    7 Posts
    468 Views
    R
    No I didn't, I am reporting the issue right now. (QTBUG-100506) [edit: added bug report link SGaist]
  • Frozen headers are in an odd position

    Unsolved
    3
    0 Votes
    3 Posts
    265 Views
    I
    @SGaist I haven't made any changes. Which part should I look into?