Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • Please instantiate the QApplication object first

    5
    0 Votes
    5 Posts
    9k Views
    M
    I just had the same problem: Turns out I linked Qt5Widgets.lib instead of Qt5Widgetsd.lib The answer is a bit late, but it might help somebody else
  • [Solved] QML delegate Component for TableColumnView

    3
    0 Votes
    3 Posts
    2k Views
    Z
    I needed some experimenting, but I got it. I made a qml-file @// ProjectNameDelegate.qml import QtQuick 2.0 Rectangle { width: parent.width; height: 50 border {color: "#9EDDF2"; width: 2} id: projectNameDelegate Text{ anchors.centerIn: parent color: "#FF0000" } } @ And made the call @TableViewColumn {role: "projectName"; title: "Name" ; width: 134; delegate: ProjectNameDelegate{Text{text: styleData.value}}}@
  • [solved] signal 'destroyed' is not emited

    5
    0 Votes
    5 Posts
    2k Views
    M
    QApplication::closeAllWindows() works in fixed bug reconstruction code. @int main(int argc, char *argv[]) { QApplication a(argc, argv); QDialog dialog; // <<-- dialog.show(); // <<-- MainController mainController; mainController.init(); emit mainController.signal_start(); return a.exec&#40;&#41;; }@ The problem is solved.
  • 0 Votes
    1 Posts
    621 Views
    No one has replied
  • 0 Votes
    1 Posts
    3k Views
    No one has replied
  • 0 Votes
    5 Posts
    18k Views
    M
    Hi, I am trying same program but i am not getting window I am get like "The program has unexpectedly finish" window.exe exited with code -1073741819 plz help me.
  • Qt D-Bus

    4
    0 Votes
    4 Posts
    4k Views
    J
    Hi I have the same problem when running from embedded. I put libdbus-1.so, libQtDBus.so.4, libQtXml.so.4, libexpat.so.1 along with a test executable below. The following is the test code for checking DBus Connection. #include <QtCore> #include <QtDBus> int main( int argc, char *argv[] ) { QCoreApplication app(argc, argv); QDBusConnection bus = QDBusConnection::sessionBus(); if (!QDBusConnection::sessionBus().isConnected()) { qDebug() << "DBUS Connection Fail"; return 1; } QStringList serviceNames = bus.interface()->registeredServiceNames(); qDebug() << serviceNames; return app.exec(); } In addition I set /opt/arm/dbus/lib to the LD_LIBRARY_PATH. Does anyone know how to solve this problem regarding checking sessionBus?
  • [SOLVED] Write to a file without the CR at the end of line

    8
    0 Votes
    8 Posts
    6k Views
    saeedhardanS
    Now solved instead of using endl; i just used flush . thank you all .
  • [SOLVED] Use qSort on QList<QMap<QString, QString> >

    7
    0 Votes
    7 Posts
    4k Views
    R
    I will change this post to solved since I already made the wanted behaviour.
  • Undefined symbols for architecture x86_64

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    Hi, please use code tags (@) when posting code on this forum. Most probably, your library was compiled in 32 bit, but you are trying to link it to your 64 bit application. Best would be to recompile the HID library in 64 bit.
  • QTabWidget style sheet

    3
    0 Votes
    3 Posts
    6k Views
    R
    By setting a width for the tabs I believe they will be fixed at that width, preventing them from adjusting automatically to fit the text. @QTabBar::tab { width: 120px;@ As a suggestion, try commenting out that line and see what happens. You can of course use the min-width property if you want, well, a minimum width. Just a thought.
  • Newbee is wired...

    7
    0 Votes
    7 Posts
    2k Views
    JeroentjehomeJ
    Hi, First of all, always first set ranges, then the working values for your spinbox. That might cause a problem when the range is still 0 to 1 and you want to set it to 22, that won't work! geometries are not used when working in layouts. Only when spacers are used and there is free space left. If the creator did something that you want, but you do not get how, check out the constructor in the ui file that it generates! It will teach you more then we are able to share here. When signal/slots are not working, there are two ways of finding out if the connection was made. First is to debug and read out the returned bool from the connect function. Also when run the application output window in creator will list warnings if connections could not be made. Then the last post? What do you need to do?? In basic I would suggest to inherit QWidget in your designed class. (or QFrame etc etc) and yes implementing a GetValue() etc is always a good way for interfaeing with your class. There is no need for you to overwrite the signals from the inherited class. Or did I misunderstand your post??
  • [Solved] Subclassing from QObject base and non Qobject base classes

    9
    0 Votes
    9 Posts
    4k Views
    M
    Hi, thanks a lot!!! It seems to be helpful. Bye
  • How to set QQuickView window below win7 taskbar?

    2
    0 Votes
    2 Posts
    747 Views
    C
    I found the phenomenon occurs when I have 2 QQuickView. When neither are setFlags with Qt::WindowStaysOnTopHint, both windows are below Win 7 taskbar. As long as one are setFlags with Qt::WindowStaysOnTopHint, both windows are above Win 7 taskbar. The phenomenon also occurs when I have 1 QQuickView and 1 QWidget. The phenomenon also occurs when I have 2 QWidget under Qt4. Is it a bug? Or it is just because something I should do but I didn't? Thank you.
  • In the land of C++ scripting integration, there was ChaiScript

    1
    0 Votes
    1 Posts
    858 Views
    No one has replied
  • Problem with data base queries .

    2
    0 Votes
    2 Posts
    530 Views
    T
    Hi, Find here some advices : First, connOpen() is called twice, The method prepare returns a bool... check it too, Use qry.LastError () for more information. Bye
  • Qt Project for an Application Deployment

    2
    0 Votes
    2 Posts
    519 Views
    sierdzioS
    Hi, welcome to the forum. The deployment process is covered in depth by the documentation: "link":http://qt-project.org/doc/qt-5/windows-deployment.html. Linking other DLLs is actually quite easy, but takes a little bit of getting used to (and some trial and error). Take a look at qmake LIBS and INCLUDEPATH variables.
  • QOpenGLContext for OpenGL version 3.3

    3
    0 Votes
    3 Posts
    1k Views
    Z
    Thank you, I was missing the call to setProfile(QSurfaceFormat::CoreProfile).
  • All my shader uniforms are reporting back -1 on their openGL location.

    3
    0 Votes
    3 Posts
    779 Views
    K
    Doh! You're awesome! That fixed it. I've been staring at this for a hour.
  • Prevent QMainWindow from dragging by mouse

    2
    0 Votes
    2 Posts
    792 Views
    dheerendraD
    Try using the evenFilter to inspect the events and take actions what do you want. or Try to use the event(.....) method to catch the events and give appropriate behaviour.