Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • `QTextList` inside `QTextEdit` not working as expected

    Unsolved
    4
    0 Votes
    4 Posts
    324 Views
    SGaistS
    I'd say you likely have found a bug. I'd recommend taking a look at the bug report system to see if there's something related to it there. If not, please open a new report providing your example project there (please include a .pro file so it can be directly compiled).
  • Send real time data from another class to MainWindow Label

    Unsolved
    2
    0 Votes
    2 Posts
    190 Views
    mrjjM
    Hi emit rarely fails so i would check bool result = connect(a, SIGNAL(textChanged(QString)),ui->lb_ax, SLOT(setText(QString))); qDebug()<<"conn;" << result; Since you do MyOpenGLWidget *a = new MyOpenGLWidget; connect(a, SIGNAL(textChanged(QString)),ui->lb_ax, SLOT(setText(QString))); a->someFunctionThatChangesText(""); It should be the MyOpenGLWidget you think it is, which else is a classic error. Last thing that can be wrong, it that you might somehow block the event loop as you inserted QApplication::processEvents(); QWidget::repaint(); which should not be needed.
  • libsocketcan not found in 5.14.1

    Solved qcanbusdevice serialbus 5.14
    4
    0 Votes
    4 Posts
    3k Views
    aha_1980A
    @rejuce Libsocketcan is still optional, but gives additional functions, as stated here: https://doc.qt.io/qt-5/qtserialbus-socketcan-overview.html If you don't use that, you can safely ignore the warning. But if you install the libsocketcan library, that's fine too. Regards
  • How to render a gif while a function is running?

    Solved
    8
    0 Votes
    8 Posts
    864 Views
    L
    @jsulm ok, thank you very much. Using threads something change. The problem is that in a first moment I updated some labels in the UI in the slot, while now I have to manage it with a return code.
  • Update and Installing Qt distributive not working. Why?

    Solved
    2
    0 Votes
    2 Posts
    123 Views
    B
    Issue closed. Found this - https://download.qt.io/static/mirrorlist/
  • QTableWidget cells will word wrap, but column headers don't?

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    JonBJ
    @donquibeats For anyone reading. I found this principle works, in that the words do wrap. However, that made the subsequent lines not visible, I had to do a setMinimumHeight() to give it room.
  • Designer Layout not scaling properly!!!!!

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    D
    @mrjj Hey thanks for that, really helpeful. Unfortunately I dont have that in some of my layouts. What I did is, I used LayoutBottomMargin instead. That seems to have worked. However, I still get the text cut off when I open it on my linux laptop. Could it be a compability issue with Linux? Or perhaps a screen one seeing how its a laptop screen whereas my pc has a 35" widescreen? Here's the UI File. I appreciate the help guys https://mega.nz/#!HBl10CQB!dldwM8TFigIsH-Ei3GRkOtU9HZ526huYJi7JU-Zdxn0 I tried uploading here but it said I dont have enough privileges for that @JKSH
  • How to Determine if installed Library ??

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    JonBJ
    @Pada_ I don't know what you mean/intend with your use of the word "terminal" here. You don't want any terminal to be involved. There are several ways of testing for it. Here's a simple start: int result = QProcess::execute("unrar", []); if (result == -2) qDebug() << "Could not start process"; See https://doc.qt.io/qt-5/qprocess.html#execute for this example. Beware, Linux is case-sensitive, I doubt it would be UNRAR, more likely unrar.... unrar is not installed under Ubuntu at least. apt install offers unrar-free & unrar packages.
  • Qt creator build process is leaving a tmp file in c:\users\[home]\

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    JonBJ
    @Snorkelbuckle I believe you'll find your situation is reported at https://stackoverflow.com/questions/56074667/gdb-in-qt-creator-putting-its-temporary-files-in-my-apps-working-directory, Qt Creator + MinGW + gdb. Not that anyone replied/solved. Suggest make absolutely sure your \Users\Snork\AppData\Local\Temp directory is writable by process. Otherwise can only think there is some mix up over the \s in path somewhere, such that they all get ignored/removed.
  • disable windows dpi setting.

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    jsulmJ
    @Pada_ said in disable windows dpi setting.: where is the qt.conf file You have to create it
  • How do you wait for multiple signals?

    Unsolved
    7
    0 Votes
    7 Posts
    753 Views
    J.HilkJ
    @AntonioFinn said in How do you wait for multiple signals?: I found this solution a bit ulgy, is there a better way to do it? I would actually store pointers to the QNetworkReply the finished signal points to the same reply that you get a pointer to when you make your get request. And you have to delete it manually anyway and you know exactly what request finished when🤷‍♂️
  • QML assign model attribute data dynamically to delegate component.

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    sierdzioS
    Sounds like it's something you should implement in the model. The view, and the delegates, should be as dumb as possible. They should only show what the model tells them to. So I think all the user-made changes should be sent to model, processed and then send back to QML as dataChanged() so the delegate can redraw itself (if that is not enough you can remove row + add row, or reset whole model). In order to get a flexible structure to read data from in QML, use QVariantMap, or a custom QObject or Q_GADGET. This way you return one "thing" for one role, but it can be unwrapped and QML can get more info out of it.
  • How to send event to currently focused widget in Qt?

    Solved
    3
    0 Votes
    3 Posts
    572 Views
    L
    Thanks I figured it out: https://www.qtcentre.org/threads/69792-QKeyPress-Simulating-key-press I don't know why qt also requires a string representation on top of all these enums. Doing so it worked.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • 0 Votes
    5 Posts
    845 Views
    Pablo J. RoginaP
    @Yash001 if your issue is solved (aside for the fact that you need to read and incorporate several concepts, I guess), please don't forget to mark this post as solved. Thanks.
  • Using Qt codes in Android application

    Unsolved qt5 android c++ ndk cmake
    1
    0 Votes
    1 Posts
    356 Views
    No one has replied
  • Pixmap in QTreeWidget

    Unsolved
    4
    0 Votes
    4 Posts
    496 Views
    K
    @jsulm well, think I also could live with an icon! I just didn’t notice this function in the class-reference. Thanks for the hint, gonna try!
  • Please select a 64 bit Debugger in the kit settings for this kit.

    Unsolved
    3
    0 Votes
    3 Posts
    469 Views
    SGaistS
    Hi, There's no need for a dedicated 64bit version of the installer. The one you are using already provides both 32 and 64bit Qt builds. The question here is rather why are you using a 32bit debugger while using a 64bit version of Qt. What exact version of Qt are you using ? What debugger did you install ?
  • MenuBar - why it doesn't work?

    Solved menubar menu begginer
    5
    0 Votes
    5 Posts
    1k Views
    mrjjM
    Hi I think you action runs out of scope it seems to be local variable QAction actions[11]; and you take address of them so it does not copy but refernce inside the list listOfMenus[0].addAction(&actions[i]); but it looks to me like the actions[11]; lives in constructor and hence when Mainwindow is shown, they are all already deleted. Move the list to be a member of the class and see. Damn Pl45m4 beat me to it :)
  • Displaying Widget Below QTableView Row

    Solved
    6
    0 Votes
    6 Posts
    644 Views
    mrjjM
    @Qt_User72653 Ok then View+Model +delegate is the right way :) Getting the info should not be super hard but you might need to keep a pointer to the view. I think your plan with setting the height of the row and then make the Editor appear sounds good. It should work without too many odd issues :)