Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Database driven applications

    5
    0 Votes
    5 Posts
    3k Views
    F
    Thanks, this is the piece of information I was seeking for!
  • Including (and viewing) PDF file in Qt Help Collection

    5
    0 Votes
    5 Posts
    8k Views
    T
    [quote author="Lukas Geyer" date="1316504075"]"https://bugreports.qt.nokia.com/browse/QTBUG-2514":https://bugreports.qt.nokia.com/browse/QTBUG-2514 bq. We do not support showing pdf files inside Assistant, we basically dump them out of the compressed help file and use the corresponding desktop application to show it. [/quote] Ah, yes, that's what I thought. I was a bit confused by posts like this, though: http://stackoverflow.com/questions/6947172/how-to-link-to-a-pdf-file-in-qt-assistant [quote author="Lukas Geyer" date="1316504075"] [quote author="toralf" date="1316443967"]I've actually packaged a couple of PDFs and one of my collections, and seem to remember having been able to view them in the past, but I could be wrong...[/quote] Looks like you aren't. If it has worked for you but it doesn't anymore you should file a bug-report.[/quote] https://bugreports.qt.nokia.com/browse/QTBUG-21559 ;-) I've found that as a workaround, PDFs may be packaged with a non-standard filename suffix - I've used ".pdf_". Qt Assistant will then fail to understand that the files have PDF format and will thus not assume they may be viewed internally. The desktop support routine that is called as a consequence, to open the files with an external application, will on the other hand still recognise them (based on content, I suppose) - at least on my setup.
  • [SOlved]Simpel BarDiagram

    3
    0 Votes
    3 Posts
    2k Views
    V
    May be you can get "Pie chart example":http://doc.qt.nokia.com/4.7/itemviews-chart.html and remake it for bar.
  • QAxObject and dynamicCall

    2
    0 Votes
    2 Posts
    9k Views
    P
    Well, answering myself, but the making a html from generateDocumentation().toStdString() was useful. It works partially. I can call functions, but can't get results back from them. I can get results back from int&, but can't get any values back from QString&. I've also used both flavors of dynamicCall().
  • Borderproblems QGroupbox

    3
    0 Votes
    3 Posts
    4k Views
    T
    I use debian with gnome.
  • [solved] Unexpected behaviour for Qt::ItemIsUserCheckable

    2
    0 Votes
    2 Posts
    3k Views
    P
    There was a bug, and I introduced it. Qt is alright ;) . Consider this solved.
  • Regarding displaying tollbar icons in release mode

    3
    0 Votes
    3 Posts
    2k Views
    I
    Hi Lukas I have added those resource files while creating GUI in QtDesigner. I am not adding those through code. How to check wether they are part of application or not?
  • QTextDocument find does not fill in the passed QRegexp?

    7
    0 Votes
    7 Posts
    4k Views
    R
    dcortesi: You're correct. I didn't think about \1s in the replacement string.
  • COM / DLL / ActiveQt

    10
    0 Votes
    10 Posts
    5k Views
    P
    Just in case you're interested, I've gotten a bit further. New thread posted here: http://developer.qt.nokia.com/forums/viewthread/9957/
  • What is the best small 2-dim QT container?

    2
    0 Votes
    2 Posts
    3k Views
    P
    You can use this: @ typedef QVector< short > SubContainer; const int size = 100; QVector< SubContainer > vv( size, SubContainer( size ) ); @ As you said you can access elements with @vv.at( x ).at( y )@ or with @vv[ x ][ y ]@
  • Removing !DOCTYPE from the XML header

    14
    0 Votes
    14 Posts
    14k Views
    AlicemirrorA
    @Volker: Thanks you, very very useful. I am just working with a multilanguage aplication including Turkis.
  • Problem adding QGLWidget to QGridLayout

    5
    0 Votes
    5 Posts
    5k Views
    L
    No problem, just happy to be able to help out!
  • Get first QDockWidget from a given area

    3
    0 Votes
    3 Posts
    4k Views
    M
    Thanks, I ended up doing something similar. I'm surprised there are not direct api calls to help with this.
  • [solved]Pushbutton and Icons

    6
    0 Votes
    6 Posts
    3k Views
    M
    [quote author="fluca1978" date="1316606616"] I believe it is a bad idea to hard code '/' anyway, you should use Qdir::separator instead.[/quote] No, hard coding '/' is indeed the proper way. From the QDir::separator() documentation: bq. You do not need to use this function to build file paths. If you always use "/", Qt will translate your paths to conform to the underlying operating system. If you want to display paths to the user using their operating system's separator use toNativeSeparators().
  • [solved] Drawing on top of an image

    6
    0 Votes
    6 Posts
    6k Views
    AlicemirrorA
    Many thanks, this is really useful. I have a lot of book on C++ but this maybe a idea. I am approaching to develop some GUI stuff in a multiplatform environment :) Cheers, Enrico
  • QtScript: using methods from prototype of derived class

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    G
    it works now. tnx for your help... i had problem with some dll
  • 0 Votes
    4 Posts
    3k Views
    W
    Hi there, thanks for the tipp to build a test case. Indeed, a similar application with only one QTextEdit runs just fine. After two more hours of debugging I found this to be the problem: @setCentralWidget(ui->tabWidgetMain);@ Due to this (experimentally induced) line of code, the texEditPAD was not visible during runtime! (Just the tabWidget is visible, nothing else.) Thus, any call to any function of that TextEdit was doomed to fail. After removing the "setCentralWidget" line, it works fine. Thanks for your replies, wumpus
  • Regarding displaying busy cursor

    3
    0 Votes
    3 Posts
    5k Views
    S
    In my opinion, setOverrideCursor is corresponding to restoreOverrideCursor, so you can either @ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); for(int i=0;i<size;i++) { . . . } QApplication::restoreOverrideCursor(); @ or @ for(int i=0;i<size;i++) { QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); . . . QApplication::restoreOverrideCursor(); } @
  • Cannot find key in INI file with QRegExp

    7
    0 Votes
    7 Posts
    4k Views
    J
    Yehh I divide query onto 2 parts @ QString CInifile::_getValue(const QString & section, const QString &key) { QStringList::const_iterator item = _getSectionItem(section); QStringList::const_iterator atEnd = _inifileContent.constEnd(); if(item == atEnd) return QString::null; QRegExp rxWithComment(QString("^\s*%1\s*=(\s*)(.+)(?=\s)(\s+)(//)|#.").arg(key)); QRegExp rxWithoutComment(QString("^\s%1\s*=(\s*)(.+)(?=\s)(\s+)").arg(key)); QRegExp *rx; while(++item != atEnd) { rx = &rxWithoutComment; if((item->indexOf("//") >= 0) || (item->indexOf("//") >= 0)) rx = &rxWithComment; if(rx->indexIn(*item) > 0) return rx->cap(2); } return QString::null; } @ Question to Andre Some time ago I worked with the MySql NDB cluster. In my.ini there were N [mysqld] sections where N equals number of MySql servers in the cluster. So in which section of N QSettings will store a value, 4Ex, @ QSettings::setValue("mysqld/port", 1234); @ ?