Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.3k Posts
  • Designer not working with imported project

    Unsolved
    2
    0 Votes
    2 Posts
    490 Views
    mrjjM
    Hi Can you maybe show your pro file? Normally there is no issues sharing between computers You can delete any .user file and select compiler kit again.
  • Why can't I find " Maintenance Tool " in Qt5 for Ubuntu 16.04 LTs ?

    Unsolved
    3
    0 Votes
    3 Posts
    4k Views
    E
    @kishy-nivas13 Linux distros handle Qt packages differently, they are packaged in the distro's own format and are usually somewhat customized for that distro. If you want to develop with Qt it may be preferable to download the online installer and install an independent Qt version with it, and you will get the maintenance tool, too. It's OK to have both distro's own Qt and manually installed Qt at the same time, you just have to configure it in Creator. At least in the latest Kubuntu the online installer put the maintenance tool and Creator into the Development section of the app launcher desktop menu.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • How to program QScrollArea thorugh QtCreator

    Solved qscrollarea qtcreator qlayout
    4
    0 Votes
    4 Posts
    2k Views
    mrjjM
    @Rohith Hi Im not sure what goes wrong. I guess you are still not using the RIGHT click layout menu ? Do not drag layouts from left box. Please see this video. https://www.dropbox.com/s/t3icclcqb446jkm/scroll.mp4?dl=0
  • how to step into qt source code when debug

    Solved
    14
    0 Votes
    14 Posts
    12k Views
    betterorbestB
    I have solved the problem after I downloaded Qt5.8.0 and installed it. Maybe the problem is just in Qt5.5.0 because of the incorrect pdb files downloaded from Qt official website.
  • Help with conversions of datatype.

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    K
    @iTony Good to see that you have found a solution for your problem. Certainly the solution suggested by @mchinand seems to be the perfect solution since your parameters are separated by <CR><LF> characters. A similar solution could have been achieved by using readLine instead of readAll. Anyway both solutions are somewhat dirty in the sense already mentioned above. @koahnig said in Help with conversions of datatype.: Possibly you are reading already all bytes at the beginning. Anyway, you need to think about how you like to handle and eventually collect the information, because it is unpredictable how much you are going receive each time. There are some examples for reading from QSerialPort around. They will help you to get an understanding of proper handling of serial ports with Qt. Especially when using the readyRead signal for all real-time based communications such serial, TCP, UDP or whatever you can never rely that the complete information is already in the buffer. The buffer may contain one byte to all bytes. All depends on different aspects such as CPU speed, other tasks and speed of communication link. You might even have too much data in the buffer and throwing away some of the information when using readAll. The use of readLine is therefore somewhat less dirty.
  • How to ensure an object is deleted via deleteLater() before the event loop ended?

    Solved
    3
    0 Votes
    3 Posts
    685 Views
    jronaldJ
    @raven-worx delete directly is ok, however delete in a event driven way also makes sense, I did it this way: connect(networkReply, &QNetworkReply::destroyed, this, &QThread::quit); By far delete directly is more efficient and not too complex, but the event driven ways is more general.
  • Passing data from a signal to a slot function

    Solved
    3
    0 Votes
    3 Posts
    663 Views
    R
    I actually figured it out, what I had worked. The problem was I am using QDbus with an interface generated from an introspectable XML file which was not being properly updated.
  • TextEdit FontWeight dont change anymore

    Solved
    2
    0 Votes
    2 Posts
    451 Views
    F
    need to use... textEdit->setFontPointSize(text.toInt());
  • How to get currentTabName from QTabWidget on Qt?

    Solved
    5
    0 Votes
    5 Posts
    15k Views
    K
    @Chris-Kawa thanks a lot. This is exactly what I was looking for.
  • Signal from C++ to QML using custom parameter type

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    C
    @Eeli-K Nope. I used new . Just come from a C background.
  • How to sign a Qt app with a certificate in OSX?

    Unsolved
    4
    0 Votes
    4 Posts
    4k Views
    X
    As part of my research, I found this interesting post right here at Qt forums: https://forum.qt.io/topic/60991/understanding-qt-and-mac-pkg-setups I will try the procedure described there and let you know if it's still valid.
  • Should QTranslator load more specialized translations? (es_US if es_ES is missing)

    Unsolved
    1
    0 Votes
    1 Posts
    296 Views
    No one has replied
  • Adding a Makefile to QMake process

    Solved
    3
    0 Votes
    3 Posts
    700 Views
    HunterMetcalfeH
    @raven-worx Thanks for the reply. I had assumed as much. Technically the Makefile is not entirely a Makefile. It is actually more of a textfile. One solution could be to read in the textfile variables before the QMake process.
  • deleteLater as a slot causes Access Vialoation

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    VRoninV
    I don't really agree with the users before me (which normally means I'm wrong 😉 ). This is a fundamental design flaw. QThread is not the thread, it's a wrapper around it. Things created inside run() are on the secondary thread but thing created in the QThread constructor and the QThread itself are in the main thread. This means networkReply = networkAccessManager.get(QNetworkRequest(url)); is a race condition and even calling networkReply->deleteLater(); from WebPageDownloadSucceeded would be (but probably deleteLater is smart enough to avoid it) The segfault comes from the fact that deleteLater is direct connection (receiver and sender are the same so by definition they are on the same thread) while WebPageDownloadSucceeded is queued connected as networkReply lives in the secondary thread while this lives in the main thread. Please see https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/ and refactor your code to apply that tutorial
  • Checkable box with QAbstractTableModel implementation

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    HunterMetcalfeH
    Thanks for the replies! I will try exactly this. I apologize for the delay. Many other projects to be completed.
  • Reading file with an unknown charset

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    J
    Thank you all for your answers. jcga
  • Qt Static Build Is Very Big

    Unsolved
    31
    0 Votes
    31 Posts
    12k Views
    E
    @Taz742 That's offtopic but you need to link c++ redistributable statically also to have dependancy free application when compiling with MSVC. https://stackoverflow.com/questions/37398/how-do-i-make-a-fully-statically-linked-exe-with-visual-studio-express-2005
  • [solved][tcp][debian] QTcpSocket read buffer size

    Solved
    9
    0 Votes
    9 Posts
    8k Views
    VRoninV
    Partially related. If you use QDataStream for all your read operations and Qt 5.7+ you can use transactions to avoid you doing the manual check of bytesAvailable()
  • QPainter - must it be deleted after draw ?

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    raven-worxR
    @ranshalit being() -> before you start painting end() -> when you're done painting