Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Error trying to build Qt SQL drivers

    Unsolved
    2
    0 Votes
    2 Posts
    533 Views
    SGaistS
    Hi, What exact instructions did you follow ? The ones from the documentation ?
  • Where exactly is qcollectiongenerator?

    Solved
    8
    0 Votes
    8 Posts
    3k Views
    SGaistS
    You're welcome ! Since everything is clear now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
  • Qt 5.8 GUI Application on vncviewer results in segmentation fault

    Unsolved
    1
    0 Votes
    1 Posts
    466 Views
    No one has replied
  • Disable window animation in Windows

    Unsolved
    2
    0 Votes
    2 Posts
    529 Views
    SGaistS
    Hi, That's something you need to check with the Windows API directly. Qt doesn't handle the window decoration.
  • Plotting 3D surface

    Solved q3dsurface c++ data visualizat
    2
    0 Votes
    2 Posts
    908 Views
    Y
    Solve it... added to the .pro file QT += datavisualization
  • Any way to stop QListView reacting to ANY mouse button without subclassing?

    Solved
    3
    0 Votes
    3 Posts
    308 Views
    ZueukZ
    Hmm, this still feels a bit weird, but at least solves the problem. One thing to add: in case of QListView or QTreeView, the event filter should be installed not on the widget itself, but on its viewport.
  • QtCreator no C++ highlighting on MacOS

    Unsolved
    5
    0 Votes
    5 Posts
    571 Views
    F
    @J.Hilk QtCreator dark theme is selected and the preview does show different colors: [image: 7dce418b-9ef1-4939-b1a0-a7af1aa09ca4.png] Screenshot 2019-04-08 at 20.40.33 However in the C++ tab which shows some code, there's no highlighting there either: [image: df7d37e3-d0a8-4b92-93b9-a4e84a8306f4.png] Screenshot 2019-04-08 at 20.42.07
  • png image is blurred on QLabel

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    S
    It'll be useful if you can post screenshot of non-resized (and hence not blurred) and resized/blurred version of the image. Also, note that scaling down images will almost always suffer from quality loss.
  • paintOverlayGL never gets called

    Unsolved
    5
    0 Votes
    5 Posts
    618 Views
    Q
    Possibly relevant, from openGL.org: "How you access overlay planes depends on the windowing system interface. While GLUT 3.7 has entry points defined for the use of overlays, currently the entry points are disabled. To use overlays, your application needs to use WGL, GLX, or another platform-specific interface." I happen to be using GLUT so whatever I was doing wrong, it was bound for failure anyway. Womp.
  • Problem Compiling Widget application, Linux

    Unsolved
    2
    0 Votes
    2 Posts
    579 Views
    Christian EhrlicherC
    @maxwell31 said in Problem Compiling Widget application, Linux: QApplication::QApplication(int&, char**, int) This is a Qt4 ctor: https://doc.qt.io/archives/qt-4.8/qapplication.html#QApplication-3 Looks like you're picking up the Qt4 include files.
  • QStateMachine, scxml, custom states questions

    Unsolved
    3
    0 Votes
    3 Posts
    538 Views
    M
    I don't tend to use the SCXML anymore. I just use the C++ framework and build my state machine in code. I tend to inherit QState with a BaseState class implementation that I can used to define base functionality with certain signals / slots and usually have access to a shared pointer which contains state machine data. From there I inherit the BaseState and apply the state specific logic. For prototyping state machine structure I tend to use the draw.io app which is a little less clunky than the SCXML editor.
  • Automatic crash reporting / collection

    Unsolved
    1
    0 Votes
    1 Posts
    280 Views
    No one has replied
  • connect with extra argument on slot

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    K
    @adaptine said in connect with extra argument on slot: @koahnig I'm not quite sure what you mean, but my additional parameter is not changing all the time. I'm simply looping a QHash once where the connect-method is called, using the QHash-key as the additional parameter such that the "nodeValueUpdate"-method knows which key-value pair in the QHash which is to be updated on "dataChangeOccurred"-signal. I referred to the official documentation which "allows" the default argument through routine declaration. Those default are argument are static and cannot change at all during runtime. The lambda implementation requires newer Qt libs prebuilds because of compiler features. Anyway it is good to see that you have a solution.
  • 0 Votes
    6 Posts
    4k Views
    D
    I found a solution. thank you very much for helping!
  • How to set source directory in qmake?

    Unsolved
    6
    1 Votes
    6 Posts
    2k Views
    Cobra91151C
    @kitfox Hi! You can add these commands to your .pro file: MOC_DIR = ./src/moc OBJECTS_DIR = ./src/objects RCC_DIR = ./src/resource It will clean up your application build directory and store all the moc, objects, resources files in the src directory.
  • Failed to open file when I use fstream

    Unsolved
    7
    0 Votes
    7 Posts
    7k Views
    jsulmJ
    @PsionicAlch Take a look at https://doc.qt.io/qt-5/qmake-variable-reference.html#installs You should also consider using Qt resource files https://doc.qt.io/qt-5/resources.html
  • Can't load text file from .qrc

    Solved
    3
    0 Votes
    3 Posts
    821 Views
    jsulmJ
    @kitfox You can use QTextStream, but you have to open the file first: QFile file(":/mainmenu.xml"); if (data.open(QFile::ReadOnly)) { QTextStream in(&file); QString xmlStrn = in.readAll(); file.close(); }
  • How to use ZPL by serial port on QT

    Unsolved
    2
    0 Votes
    2 Posts
    377 Views
    jsulmJ
    @Kacank87 I don't have any examples for that device (is there any documentation/examples/SDK from device manufacturer?), but in general you can use https://doc.qt.io/qt-5/qserialport.html in Qt to access serial port. What exactly to send/receive depends on your device.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • check for clicks on buttons inside a vector?

    Solved button vector dynamically
    7
    0 Votes
    7 Posts
    2k Views
    SGaistS
    Rather than using a bunch of ifs, what about using a QMap or a QHash to store the information and retrieve that in the slot ? This will make your implementation easier to maintain.