Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • 0 Votes
    3 Posts
    5k Views
    G
    Class name and object name can be the same, it does not matter. You can see, whether the streamList is in the child list at all: @ foreach(const QObject *obj, this->children()) { qDebug() << obj; } @ Check if the streamList is in the debug output.
  • QSqlDatabase Transactions and QSqlQuery Creation

    4
    0 Votes
    4 Posts
    10k Views
    G
    The query may not be executed in the transaction, I would suppose, probably depending on the driver.
  • QTableView - Not Getting Selection Changed Signal

    11
    0 Votes
    11 Posts
    16k Views
    G
    The table implicitly has a selction model, get with <code>tableView->selectionModel()</code>, you don't need to create a new one.
  • [Solved] Can anyone help-i miss something! filedownloader example

    4
    0 Votes
    4 Posts
    3k Views
    K
    Tank you for a quick answer peppe. @m_lblImage = new QLabel(centralWidget);@ @ m_lblImage->setObjectName(QString::fromUtf8("m_lblImage"));@ i forgot to declare something thats right, i looked and looked, but i think it was to late, and after some sleep i found it. i have written @m_ilblImage = new QLabel(centralWidget);@ and that dons't work out ;)
  • Dependent Parallel states in Qt Statemachine

    8
    0 Votes
    8 Posts
    4k Views
    S
    Actually I was looking at possible structure as mentioned here "Parallel structure":http://easycsm.sourceforge.net/SM_5.png .
  • QGraphicsScene + drawing a point

    2
    0 Votes
    2 Posts
    3k Views
    C
    If you want to "connect the dots", so to speak, why did you decide to use an ellipse, rather than a line segment?
  • Does Qt guarantee the order of focus (out and in) signals ?

    5
    0 Votes
    5 Posts
    4k Views
    D
    Thank you for all the feedback: Some more information: Clarification: I understand that the signals from one widget come in the order of the connect statements but as Andre correctly stated, my problem relates to single signals from multiple widgets. Motivation: the problem typically appears when a edit control needs to do some computations when the focus is lost and the results are shown in another field. In this case "our" program logic expects that those computations are already done (during focus lost) before we process the push button (click). [quote author="Andre" date="1324461511"]Perhaps you can avoid any depence on this order, if you use QApplication::focusChanged instead of relying on the order. However, this signal (this is a signal) is send only after both widgets have already been send the FocusEvent. [/quote] I absolutely agree that this should be the way to go and this is also what we generally try to do but especially when there are complex relationships between the edit fields (stuff like default values that need to calculated from others fields but can later be changed by the user) this gets really complicated. Some questions that might help to better understand: 2.1) What should setting the focus policy of a QWidget as a main window for other controls do ? 2.2) When and why should the focus policy been changed in general ? 2.3) Is there any sequence of signals/events that we can rely on in Qt or is it just "random" ?
  • Is there a way to query if the text in a QLineEdit is truncated?

    3
    0 Votes
    3 Posts
    2k Views
    M
    Hm, this hack is exactly what I was trying not to do. It might work, though. Thanks, Andre!
  • QT supports OpenGL 5.0, 6.0 and 10.0

    4
    0 Votes
    4 Posts
    3k Views
    M
    it's about setVersion: [quote author="http://developer.qt.nokia.com/doc/qt-4.8/QGLFormat.html" date="0"] Set the OpenGL version to the major and minor numbers. If a context compatible with the requested OpenGL version cannot be created, a context compatible with version 1.x is created instead. [/quote]
  • Q_OBJECT in template class and order of slots

    2
    0 Votes
    2 Posts
    3k Views
    D
    If you put together a minimal testcase you could submit a bug report, although I'm not sure you're in a supported case there (cf. [[doc:moc]] limitations).
  • 0 Votes
    2 Posts
    2k Views
    EddyE
    Please don't double post. This is the same as "this thread":http://developer.qt.nokia.com/forums/viewthread/12711/. I'm closing this one.
  • Progressbar with two different colors

    5
    0 Votes
    5 Posts
    8k Views
    V
    hello Andre thanks a lot... now i am able to display progress bar with two different colors at a time using style sheets. @ progress->setStyleSheet(QString("QProgressBar::chunk:horizontal {background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 grey, stop: 1 grey);}")+QString("QProgressBar::horizontal {border: 1px solid gray; border-radius: 3px; background: yellow; padding: 0px; text-align: left; margin-right: 4ex;}")); @
  • How to get the first letter of the string?

    5
    0 Votes
    5 Posts
    5k Views
    A
    Thanks a lot for all of u...:) i did like this @ std::cout<<"the first word of the line :"<<line.at(0).toAscii()<<endl; @
  • [SOLVED] QHostinfo: no such file or directory

    2
    0 Votes
    2 Posts
    5k Views
    K
    solved. I have to add another qmake location to the options in qt designer
  • ComboBoxDelegate openPersistentEditor placement

    13
    0 Votes
    13 Posts
    13k Views
    D
    Ah, peppe, I see. I guess you don't even have to subclass the view - it works something like this: http://programmingexamples.net/wiki/Qt/ModelView/ListViewComboBox
  • 0 Votes
    2 Posts
    2k Views
    J
    use regsvr32 to register the dll on the command line/batch file also check if you have the Qt dlls in the same directory as the com-dll so the com server can be executed
  • Running a non-blocking pyside GUI in Python interpreter

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Problems with QTextBrowser

    9
    0 Votes
    9 Posts
    4k Views
    A
    Thanks a lot! Both problems have been solved :)
  • QLocale::system&#40;&#41;

    2
    0 Votes
    2 Posts
    2k Views
    T
    No, C is a valid locale. Basically it is "use no translation at all". Check the environment you are running your application in for the LC_* and LANG variables. Maybe something is forcing them to C. We do that in Qt Creator sometimes when we need to make sure to get parse-able output from the applications we run (e.g. the compiler).
  • QGraphicsScene drag and drop

    11
    0 Votes
    11 Posts
    13k Views
    T
    I had the same problem. Olorin's code worked for me. Thanks for the follow up.