Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Is it possible to add QScrollArea in the dock window of QMainWindow?

    Unsolved
    2
    0 Votes
    2 Posts
    290 Views
    SGaistS
    Hi, Sure, set your QScrollArea in a QDockWidget and add that dock widget to the area you want.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    10 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • QSerialPort wait for response

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    JKSHJ
    @jsulm said in QSerialPort wait for response: @JKSH said in QSerialPort wait for response: No separate event loop This was my requirement :-) OP did say "I'd like to rework the code and get rid of the QEventLoop" @Spiel said in QSerialPort wait for response: The application I am working on communicates with an embedded device using a number of different commands, in no particular order, and the responses vary in length. Each step depends on the outcome of the previous - hence I need to somehow wait until I get a response for a command, before deciding what should I do next. I agree with @jsulm -- synchronous operations are not needed for this. Depending on how many possible paths/branches your logic can take, you might benefit from a State Machine architecture (see https://www.mathworks.com/videos/understanding-state-machines-what-are-they-1-of-4-90488.html for an intro). Each "step" could be represented as a state on the state machine diagram. Each time you receive the readyRead() signal from the serial port, you would process the response and then decide which state transition to take.
  • Qtableview double header

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    mrjjM
    @n-2204 Hi But did you try https://stackoverflow.com/questions/22755171/spanning-horizontal-header-in-qt/22756565#22756565 as listed in the other thread ?
  • QT Creator für Ubuntu 20.04 arch64

    Unsolved
    2
    0 Votes
    2 Posts
    194 Views
    jsulmJ
    @abeat said in QT Creator für Ubuntu 20.04 arch64: But the online installer is not compatible I guess you installed an ARM Ubuntu version, right? In this case I think you will need to build Qt by yourself or (way easier) simply install Qt packages provided by Ubuntu (those are not latest, but as long as you don't need latest Qt this isn't an issue).
  • QStringListModel Subclass Drag and Drop

    Solved
    6
    0 Votes
    6 Posts
    584 Views
    K
    Yep, removing my reimplementation of rowCount and data fixed the problem. Like I said, I think I saw somewhere that any subclass needed those functions, but it must have been talking about QAbstractListModel, and at that point I had been reading a LOT of documentation and got them mixed up. :) Thank you for the suggestion!
  • windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory

    Solved
    14
    0 Votes
    14 Posts
    11k Views
    A
    @hskoglund Oh yeah, thank you very much for your patched versions. Sadly, those are still required in Qt 5.15.2 (working also with C:\Qt\5.15.2\mingw81...... )
  • The program has unexpectedly finished

    Unsolved
    3
    0 Votes
    3 Posts
    516 Views
    A
    guys maybe its funny but i just reinstall my windows 10 and everything is work well now[image: c61bb655-5c3f-4e82-a6f7-a51a4d5606b6.png]
  • .pro DEFINES not updating when changed

    Unsolved
    2
    0 Votes
    2 Posts
    260 Views
    jsulmJ
    @PennGar said in .pro DEFINES not updating when changed: i have to delete the entire build folder and totally rebuild This is actually normal. Else changed DEFINES will not have any affect.
  • This topic is deleted!

    Unsolved
    21
    0 Votes
    21 Posts
    38 Views
  • Two questions about the official MDI Example

    Unsolved
    4
    0 Votes
    4 Posts
    355 Views
    artwawA
    @Alvein I have no access to MSVC however I run the example using MinGW. Unfortunately you are right - it looks like a bug. [image: b17e2b9b-7ce3-4832-ae64-9cf344f5e3f8.png]
  • QwtLegend SlideBar

    Unsolved
    1
    0 Votes
    1 Posts
    114 Views
    No one has replied
  • Qt::ItemIsSelectable and QTreeView

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    VRoninV
    Sounds very similar to QTBUG-88723. The code that excludes items that are not selectable and enabled is in indexesFromRange() and it's been there since the trolltech days. You can't use the isSelected() workaround in the bug report either as it only works around the Qt::ItemIsEnabled check so i reckon allowing the change and change it back is the way to go here. Connect a slot to QItemSelectionModel::selectionChanged that reverts the changes you don't want to happen
  • Qtableview-How to make noneditable column?

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    N
    @Christian-Ehrlicher thanks understood
  • Compilation error with Visual Studio

    Unsolved
    2
    0 Votes
    2 Posts
    586 Views
    nageshN
    @chiyuwang Check for the required header file for inclusion and c++ standard
  • Text formatting problem on embedded system

    Unsolved
    4
    0 Votes
    4 Posts
    298 Views
    nageshN
    @sbartolett I have faced the similar issue, reason turns out to be the font that set for the GUI widget will not be available in the target environment. Either make the required fonts to be available in the target system or set the fonts which are currently available in the target
  • QSerialPort Timeout Using waitForReadyRead on Windows

    Solved qserialport arduino windows linux
    4
    0 Votes
    4 Posts
    2k Views
    ?
    Ok well here's an interesting discovery I've made, for anyone who finds this thread in the future: There seems to be an issue with the driver for the off-brand Arduino Nanos possibly not signalling to the OS correctly, or the implementation that Qt uses just really doesn't like the way that the driver responds. I am referring specifically to the nano clone which uses the QinHeng HL-340 serial peripheral. Not sure why this caused a problem, but there it is. Once I used an official Uno the code worked no problem. If I were more patient and had better resources I could possibly trace back the issue, but I do not, so sorry everyone lol. As such I'm marking this as resolved.
  • Restart Application with Updated Executable.

    Unsolved
    4
    0 Votes
    4 Posts
    436 Views
    SGaistS
    Did you check that everything is properly in place ? That you pass a valid path to startDetached ?
  • cannot find C:/Qwt-6.1.6/lib: Permission denied

    Solved
    11
    0 Votes
    11 Posts
    609 Views
    L
    @jsulm Thank you. It seems I figured it out. I just added set ( QT_INCLUDE_DIR "C:/Qwt-6.1.6/include" ) set ( QT_LIBRARY_DIR "C:/Qwt-6.1.6/lib" ) to the FindQwt.cmake and disabled antivirus. @KroMignon I can confirm now that it works. The original program had issues with .png files. This seems to be solved in the fork.