Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Auto can I check the result of a connect() with Qt::AutoConnection

    Solved
    5
    0 Votes
    5 Posts
    662 Views
    J
    Thanks to both of you. I believe my issue has to do with processEvent() and not the connect. I will open another topic
  • This topic is deleted!

    Unsolved
    12
    0 Votes
    12 Posts
    63 Views
  • Searching bar in tree widget

    Unsolved qt5 tree widget search
    19
    0 Votes
    19 Posts
    2k Views
    nageshN
    @Christian-Ehrlicher thanks for the correction. @suslucoder it's showing old search items with different color because you have set it's background color in last search.. It's better to set all with default color and matched items in highlight colour for each search
  • How can i add a scroll bar for QCharts Legend

    Unsolved qt5 charts legend
    4
    0 Votes
    4 Posts
    1k Views
    Pl45m4P
    @suslucoder There is no scrollBar by default but you can increase the space for your QLegend https://doc.qt.io/qt-5/qtcharts-legend-example.html#detaching-and-attaching-legends Or you put a custom legend in a QScrollArea
  • How to create apk file for Desktop GUI

    Unsolved
    10
    0 Votes
    10 Posts
    850 Views
    KroMignonK
    @savithaKM said in How to create apk file for Desktop GUI: I mean, I need to create an app(for my GUI) where it can be used in any other desktop where Qt software is not needed to be installed I am not sure to right understand your problem, so I try to rephrase it, feel free to say what's wrong, what's right: you have create a GUI Qt project for desktop you want to distribute this application What is the target operating system: Linux? Windows? macOS? To deploy your application there are many resources on Qt which describes what you have to do: for Windows: use windeployqt.exe cf. https://doc.qt.io/qt-5/windows-deployment.html for Linux: you have to do more "by hand" cf. https://doc.qt.io/qt-5/linux-deployment.html for macOS (I never do it): follow https://doc.qt.io/qt-5/macos-deployment.html
  • Retrieve the file path using Qprinter or Qpainter class.

    Unsolved
    3
    0 Votes
    3 Posts
    334 Views
    jsulmJ
    @Qt_User444 said in Retrieve the file path using Qprinter or Qpainter class.: Since it is mandatory that the save dialog should be opened by calling the QPainter constructor Why should QPainter open any dialogs?! It's job is painting, not showing any dialogs... But if, for some strange reason, you really need to do so then subclass QPainter and add your own constructor.
  • Should my classes be in a namespace?

    Unsolved
    2
    0 Votes
    2 Posts
    740 Views
    Chris KawaC
    Namespaces are not Qt specific. It's a C++ thing. Qt by default doesn't use them for classes, but puts globals, enums etc. in Qt namespace. You can also configure Qt to put everything in a namespace if you experience name clashing. As for whether or not you should use namespaces in your own code - that's up to you. They are not required. Some projects use them, some don't. It's polite to put your code in a namespace if you're making a library that gets included somewhere, so that you don't pollute somebody's code. @James-Mark-Chan said: is there a one line way to indicate all items in a file are for a particular namespace? No, namespaces in C++ are enclosed in braces. File is not a particularly interesting data unit in C++, apart from some minor scoping details. A more common scope is a translation unit which can be composed of several files.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • Using other application from a qt programm

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    jsulmJ
    @Aarias1989 At least some of your requirements should be doable using ActiveX. In Qt you can access it using https://doc.qt.io/qt-5/qt-activex.html
  • QStyleFactory Styles

    Unsolved
    4
    0 Votes
    4 Posts
    385 Views
    jsulmJ
    @Driftwood said in QStyleFactory Styles: do I have another option? I don't know any other option
  • 2 Votes
    4 Posts
    6k Views
    jsulmJ
    @Sprezzatura said in [Solved] QPrinterInfo::availablePrinters() don't list available printers ?: Is this documented anywhere at qt.io? Well, you have to deploy your app with all libs it needs. On Windows you can use https://doc.qt.io/qt-5/windows-deployment.html for that.
  • QAbstractItemView::visualRect() vs: rect text is drawn?

    Unsolved
    2
    0 Votes
    2 Posts
    159 Views
    Christian EhrlicherC
    When you draw custom text you have to calc it by your own. It's heavily style dependent and therefore no public api possible. For qcommonstyle look at the sources: https://code.woboq.org/qt5/qtbase/src/widgets/styles/qcommonstyle.cpp.html#_ZNK19QCommonStylePrivate12viewItemSizeEPK20QStyleOptionViewItemi
  • Why does QPrinterInfo::availablePrinters return empty list on PC with printers?

    Solved
    2
    0 Votes
    2 Posts
    283 Views
    SprezzaturaS
    The problem was caused by not knowing that I needed to install the following in my app folder: ..\printsupport\windowsprintersupport.dll Answered here: https://forum.qt.io/topic/39319/solved-qprinterinfo-availableprinters-don-t-list-available-printers https://forum.qt.io/post/197518
  • Adding Nordic pc-ble driver to Qt application

    Solved
    5
    0 Votes
    5 Posts
    581 Views
    K
    Hi @SGaist, I forgot the DLLs. It´s working now :)
  • Get geometry qaction or add qactions in qaction

    Unsolved
    2
    0 Votes
    2 Posts
    268 Views
    SGaistS
    Hi, Add a menu to the action. Your explanation is really not clear. Can you maybe show a drawing of what you want.
  • 0 Votes
    8 Posts
    842 Views
    SGaistS
    There's nothing pre-made for that. It looks like you want to implement something like DRM, what is exactly your final goal ?
  • Visual Studio vs. Qt Creator on Windows: which is most popular?

    Solved
    12
    0 Votes
    12 Posts
    19k Views
    SprezzaturaS
    @Sprezzatura Update: We settled for Qt Creator. Its debugger has weaknesses, but it is more important to have a consistent .PRO file to share between macOS and Windows.
  • caffe aplicaion

    Unsolved
    4
    0 Votes
    4 Posts
    336 Views
    Pl45m4P
    @slavisac Paint the background and use QGraphicsItems as your "buttons". You can check their mousePressEvents to trigger some action and do whatever you like. Edit: It's not possible with QtDesigner only. You'll need to subclass QGraphicsObject or QGraphicsItem.
  • 0 Votes
    4 Posts
    379 Views
    G
    @JonB I've applied the proposed approach and works as expected.
  • How to install Qt kits on arm architecture

    Unsolved
    5
    0 Votes
    5 Posts
    6k Views
    N
    Thank guys, i figure it out Thank you @jsulm for replying Turn out it's already installed, and my code work splendidly, before i just assume it won't work without even try to compile it (cause i don't see any kits used like on window version), but it actually does, lol.