Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • How to embed C4 engine in qt5 as a widget ??

    Unsolved qt5.11
    2
    0 Votes
    2 Posts
    339 Views
    Christian EhrlicherC
    Wouldn't it be better to ask the C4 engine developers how it could work? When their API provides a QWidget or QWindow all is fine. If they need a OpenGL context to work in, it will also work. But I don't think we can answer this.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • How to update Qcombobox delegate ?

    Solved
    5
    0 Votes
    5 Posts
    527 Views
    N
    Ya thanks for response I have implemented the same way..
  • Links between items in QTreeItemView

    Unsolved
    2
    0 Votes
    2 Posts
    216 Views
    VRoninV
    @user931357 said in Links between items in QTreeItemView: but sometimes does not or works incorrectly. Can you be more specific about what the problem is? My first thoughts are: When inserting children you are not signaling it (beginInsertRows/beginInsertRows) Run your model alongside the model test. The amount of problems it spots is invaluable
  • How can qmake make a Pro project of type SUBDIRS generate debug and Release makefiles?

    Unsolved
    2
    0 Votes
    2 Posts
    146 Views
    VRoninV
    Untested Try adding CONFIG += debug_and_release
  • Cout in a loop for QLabel Widgets

    Solved qmap loop cout label qlabel
    9
    0 Votes
    9 Posts
    2k Views
    Swati777999S
    @jsulm said in Cout in a loop for QLabel Widgets: @Swati777999 Names[ii] = new QLabel(QString("Name %1").arg(ii)); Works perfectly! Thanks.
  • QtMultimedia and spectrum analyzer

    Unsolved
    6
    0 Votes
    6 Posts
    923 Views
    B
    @vlada I don't quite understand your code since I don't know what's that QByteArray for. My imaginary code (not tested) should be something like qint64 SomeIO::readData(char *data, qint64 len) { if(!mCurrentBuffer.isValid() || mBufferPos >= mCurrentBuffer.byteCount()) { //TODO: save a new QAudioBuffer to mCurrentBuffer mBufferPos = 0; } int byteToCopy = mCurrentBuffer.byteCount() - mBufferPos; if(byteToCopy > len) byteToCopy = len; memcpy(data, mCurrentBuffer.constData<char>() + mBufferPos, byteToCopy); mBufferPos += byteToCopy; return byteToCopy; } This might not work. It's just my idea about how to use a QAudioBuffer.
  • A method for implementing a custom UI.

    Unsolved
    2
    0 Votes
    2 Posts
    226 Views
    J.HilkJ
    @IknowQT I don't think there's an out of the box QWidget hat handles long pressed stuff. You will have to override mousePress and mouseRelease events to measure the time between those two. If you're working with QML however, then I think the MouseArea has a tabandhold signal/property that you could listen to.
  • How to have a window move and repaint simultaneously?

    Unsolved
    2
    0 Votes
    2 Posts
    213 Views
    jsulmJ
    @Guy-Gizmo said in How to have a window move and repaint simultaneously?: its callback function performs the screen capture Maybe you could do the whole screen capture once at the beginning? Then only magnify the part which your currently need.
  • Play sound on Raspberry

    Solved
    10
    0 Votes
    10 Posts
    903 Views
    jsulmJ
    @Pueablo I think @Pablo-J-Rogina wanted to see your slot implementations
  • QT moc class can not find the original file, despite it being in correct directory

    Unsolved
    2
    0 Votes
    2 Posts
    483 Views
    jsulmJ
    @orpiczy said in QT moc class can not find the original file, despite it being in correct directory: I moved with bash to that directory and used cd cmd with the path written in mock object Do you mean E:\Dokumenty\AiR_rok_4\S7\EngineeringThesis\AcornScanner\cm\cm-lib\build\windows\gcc\x64\debug.moc? Because this is the folder from which the compiler is looking for ../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp
  • QLabel to bring middle of a QVLayout

    Solved
    3
    0 Votes
    3 Posts
    274 Views
    A
    @Swati777999 Layout haven't font setting but Any kind of Widget can be set font in Qt. For example I have QLabel type Widget QFont customFont; customFont.setItalic(true); customFont.setBold(true); customFont.setFamily("Arial Black"); customFont.setPointSize(20); QLabel *label = new QLabel("my Label"); label->setFont(customFont); for details font Or use set Stylesheet of that widget
  • Application events being processed after exit() call - bug or feature??

    Unsolved
    3
    0 Votes
    3 Posts
    546 Views
    A
    @jsulm Thank you for the clarifications!. I understand why current code works how it works. But sorry, I'm still don't understand why it is ok to process any application event after exit() call :) What if I have 2 events in list: first is user click on close application (exit() called while processing) and 2nd is message that starts long calculation process in background? I shouldn't process 2nd and this information is obvious to qt since exit flag is raised to moment when it will start processing 2nd event. Why I'm pushed to spawn redundant checks in user code instead of just do the work right in qt framework?
  • Confusion between the usage of 'this' and 'parent'

    Solved
    55
    0 Votes
    55 Posts
    10k Views
    JKSHJ
    @Pl45m4 said in Confusion between the usage of 'this' and 'parent': @JKSH sry :) Missed the sentence in your reply where you also said that No prob! It's good to have multiple confirm the same thing
  • QTextDocument using TableHeaderRowCount with html contents

    Unsolved
    4
    0 Votes
    4 Posts
    293 Views
    SGaistS
    The usual way is to modify the copy and then reapply it.
  • Getting info of camera devices.

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    SGaistS
    Hi, Then you need to use the SDK provided with pylon. There's everything there to enumerate the cameras connected to your system as well as grab images from them.
  • In Qt Creator "Design editor", how to nudge in grid view by 1px?

    Unsolved
    1
    0 Votes
    1 Posts
    132 Views
    No one has replied
  • Clear previous drawings on repaint

    Unsolved
    5
    0 Votes
    5 Posts
    421 Views
    JoeCFDJ
    change your window size setGeometry(0, 0, 950, 550); When I run your code, I can not stop it. It uses full screen of my terminal. I have to restart machine. I do not see your problem on Ubuntu 18 with Qt 5.15.2.
  • Sending and receiving data from/to PC/Arduino through serial port using QT

    Moved Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    JonBJ
    @DanAm said in Sending and receiving data from/to PC/Arduino through serial port using QT: One general question : to send through serial port, do we need to stream the byte array (QByteArray type) using QDataStream or we can write the array in the port directly ? Either, you do not have to use QDataStream.
  • How do I put a QLayout in a QWindow?

    Unsolved qt5 qt5.11
    2
    0 Votes
    2 Posts
    682 Views
    JonBJ
    @timob256 Cross-referenced from your other thread at https://forum.qt.io/topic/132655/how-to-embed-ogre3d-in-qt5-as-a-widget. A QWindow is not derived from a QWidget, so, no, you cannot put a QLayout on it. Docs say: The QWindow class represents a window in the underlying windowing system. So you do not set extra buttons or charts or whatever on a QWindow. You may know better than I, and I don't know how it relates to your "Ogre" situation, but you may want to read through What is the difference between a QWindow and QWidget and maybe Introducing QWidget::createWindowContainer() too. Qt: layouts with a Qwidget window container talks about layouts too.