Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • In QTcpServer to do multithreading

    Solved
    4
    0 Votes
    4 Posts
    289 Views
    M
    @Mikeeeeee Check out Voidrealm's videos on Youtube. Might be dated a bit at this point but I can confirm his code works 5.13 with minimal changes if any. https://www.youtube.com/watch?v=zMgbVN3uQ-E
  • File writing in pendrive

    Unsolved
    7
    0 Votes
    7 Posts
    780 Views
    ashajgA
    @mrjj ok Thank you I will try this.
  • Qt 5.12.4 TextToSpeech with CMake

    Solved text to speech cmake
    3
    0 Votes
    3 Posts
    1k Views
    mrjjM
    HI CMake integration into Creator is very basic and we also had many issues with it not parsing the project file the first time. However it got a bit better with never Creators.
  • How to compile with debug symbol?

    Unsolved
    11
    0 Votes
    11 Posts
    5k Views
    Q
    @j-hilk OK. Thank you very much!
  • warning: padding size of 'model' with 4 bytes to alignment boundary

    Unsolved
    2
    0 Votes
    2 Posts
    4k Views
    J.HilkJ
    @canid said in warning: padding size of 'model' with 4 bytes to alignment boundary: with 4 bytes to alignment boundary The compiler is telling you, that for reasons (can't say why exactly without seeing the class), he assigns additional 4 bytes of memory that will stay unused, when an instance of your class is created. Useful and needed information if you do low level operations on the class object- e.g direct memory access, or if you want to reduce memory consumption of your application
  • qthttpserver - where to ask about this?

    Unsolved
    2
    0 Votes
    2 Posts
    160 Views
    sierdzioS
    You can ask on Qt interest mailing list - all Qt developers are present there. Or, smaller questions - you can try asking on IRC.
  • How to set the opacity of the handle in QScrollBar by QPropertyAnimation

    Unsolved
    1
    0 Votes
    1 Posts
    135 Views
    No one has replied
  • Chrome like tab with separate process for each?

    Unsolved
    9
    0 Votes
    9 Posts
    959 Views
    A
    @anil_arise Thanks for the response. Can you elaborate for point 2. How can we create different processes and add as tabbed widgets.
  • QtCreator not compiling forms

    Solved
    5
    0 Votes
    5 Posts
    873 Views
    U
    @montanaviking ui_library.h doesn't need to be included. You should only #include "ui_library.h" in your c++ file where your ui is being used (this is usually done automatically by Qt master when you create new class with form). ui_*.h are generated and should not be included to .pro file, otherwise qmake will fail on first start, being unable to find the file you specified but not created yet.
  • Error while writing and reading (SerialPort)

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    E
    Its works now!! I better call both functions in order to execute one at time, used the readyRead signal ... MySerialPort::MySerialPort() { serial = new QSerialPort(this); connect(serial, SIGNAL(readyRead()), this, SLOT(readData())); ... serial->setPortName(nombre); serial->setBaudRate(QSerialPort::Baud9600); serial->setDataBits(QSerialPort::Data8); serial->setParity(QSerialPort::NoParity); serial->setStopBits(QSerialPort::OneStop); serial->setFlowControl(QSerialPort::NoFlowControl); if (serial->open(QIODevice::ReadWrite)) { showStatusMessage("Contectado a GPS"); } else { showStatusMessage(tr("Open error")); } sendData(); readData(); } ... ... Used "waitForBytesWritten()" at the end of writing, and "QIODevice::readyRead();" before start reading, so there is no failure now. Thanks everybody!
  • How to change to a new WIFI network using Qt 5.13?

    Solved
    6
    0 Votes
    6 Posts
    804 Views
    SGaistS
    You can use Qt to run the tools if you want to. QProcess comes to mind for that.
  • QImage QRGB 64 bit pixel

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    C
    @Christian-Ehrlicher Thank you for pointing out the scanline method. I have figured it out. I should be using pixel64.blue() instead of qBlue() which will return a 8 bit value instead. Thank you for your help!
  • QT::CaseSensitive vs ExactMatch

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    JonBJ
    @bkbk They are quite separate things, independent, may or may not be combined. You have not given the documentation link reference of where exactly you are looking at them in Qt. Case sensitivity means upper and lower case letters in your language do not match. Case insensitivity they do match. ExactMatch means the whole string should match, without that a partial/substring match is acceptable. abc matched against abc exact match, case sensitive ABc matched against AbC exact match, case insensitive aBc matched against defaBcghi partial match, case sensitive ABc matched against defAbCghi partial match, case insensitive
  • The program has unexpectedly finished....

    Unsolved
    4
    0 Votes
    4 Posts
    272 Views
    Pablo J. RoginaP
    @u7development please don't forget to mark your post as solved! Thanks
  • Why does QScrollArea scroll on multi-touch even if nobody told it to?

    Solved
    2
    0 Votes
    2 Posts
    287 Views
    N
    Finally I've solved this: it was gestures! I brutally disabled them with something like import sys from PyQt5 import Qt qapp = Qt.QApplication(sys.argv) picture = Qt.QPixmap('/home/bruno/Pictures/ABCDEFGH_red_on_green.png') qlab = Qt.QLabel() qlab.setPixmap(picture) MyScrollArea = Qt.QScrollArea def event(self, event): print('DEBUG: event type {}'.format(event.type())) if event.type() in (Qt.QEvent.Gesture, Qt.QEvent.GestureOverride): event.accept() return True else: return super(MyScrollArea, self).event(event) MyScrollArea.event = event qsa = MyScrollArea() qsa.setWidget(qlab) qsa.setGeometry(10, 30, 200, 200) qsa.show() sys.exit(qapp.exec_())
  • Scale Size of all GUI Widgets easily?

    9
    0 Votes
    9 Posts
    25k Views
    M
    I have a Qt application where I sometime need to rescale (as opposed to resizing using layouts) all the widgets for screens of different display resolution. I did a tree walk of every widget and adjusted the minimum size, the maximum size, the current size and the font size for each widget. Other widgets got special attention, such as the indent for a QLabel widgets. The scaling could be a one off application wide scaling or more dynamic and applied to an individual form (in response to ctrl/+ and ctrl/- like most browsers). In order not to accumulate scaling errors, the original size values are saved in a dynamic property associated with each widget. For application wide scaling, the scaling is applied after each ui file is loaded or widget created. Have a look at https://github.com/qtepics/qeframework/blob/master/qeframeworkSup/project/common/QEScaling.h and .cpp file. It would not take much effort to decouple this class to make stand alone.
  • Why QDoc don't work, it's really confusing.

    Unsolved qdoc
    26
    0 Votes
    26 Posts
    8k Views
    F
    @mrjj Qt 5.12.4 (GCC 9.1.0, 64 bit) installed on MSYS.
  • What happened to the QGraphicsSceneMouseEvent::button() function?

    Unsolved
    6
    0 Votes
    6 Posts
    466 Views
    YosvanisY
    @sgaist The version is Qt opensource-windows-x86-5.13.0.
  • Is there a fix for Qt-Raspi EGL/GLES names mismatch?

    Solved
    6
    0 Votes
    6 Posts
    463 Views
    R
    It's working now. The problem was linux-rasp-pi3-g++'s qmake.conf file. If we're building Qt for RPi3 we need to create a new qmake.conf based on linux-rasp-pi-g++ and replace the build flags with those from linux-rasp-pi3-g++. The fix is described in this guide.
  • Shared Data with QVector

    Solved
    3
    0 Votes
    3 Posts
    362 Views
    beeckscheB
    @kshegunov I'm sorry, the example i wrote works fine. I found the mistake in my algorithm, the input buffer was recreated, instead of the entries ... input = QVector<fftw_complex>(12); // this doesn't work! ... Thanks anyway! EDIT: To complete the answer, the FFTW library has a "New-Array Execution" function, where the input and output buffer can be set when executing the plan. And with QVarLengthArray you can handle the arrays easily with high performance. QVarLengthArray won't check if the data is shared.