Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • What's the point of QTextCodec::mibEnum?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Mistake in QT DOC ?

    4
    0 Votes
    4 Posts
    2k Views
    M
    Done: https://bugreports.qt.nokia.com/browse/QTBUG-21067
  • 0 Votes
    1 Posts
    3k Views
    No one has replied
  • [Solved] Two different orientations in one print

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] Problems with debug and release configuration

    5
    0 Votes
    5 Posts
    2k Views
    jensen82J
    Sorry! You're right. The rebuild did not work correctyl. After uninstalling/reinstalling mingw and QtCreator it works. Thank you very much!!!
  • Sending a signal to my mainwindow

    4
    0 Votes
    4 Posts
    5k Views
    M
    @MyMainWindow(){ MyWidget * wdgt = new MyWidget(this); connect(wdgt, SIGNAL(mySignal()), this, SLOT(onComeSignal())); } class MyWidget : public QWidget{ Q_OBJECT public: MyWidget(QWidget * parent): QWidget(parent){ QPushButton * btn = new QPushButton(this); connect(btn, SIGNAL(clicked (bool), this, SLOT(onClick(bool))); } private slots: onClick(bool){emit mySignal();} signals: void mySignal(); }@
  • Define global var that is type of QScriptEngine throws exception

    2
    0 Votes
    2 Posts
    2k Views
    L
    You cannot create a script engine (and many other Qt objects) as long as you haven't created a Q(Core)Application. @ QScriptEngine* engine; int main(int argc, char *argv[]) { QApplication a(argc, argv); engine = new QScriptEngine(&a); MainWindow w; w.show(); return a.exec(); } @ Passing the script engine as a global variable is a very questionable design decision. A better choice would be subclassing QApplication and adding it as a member or storing it as a property of QApplication (the QApplication instance is accessible from anywhere using qApp() or QCoreApplication::instance()).
  • [SOLVED] strange output for html bold

    3
    0 Votes
    3 Posts
    2k Views
    K
    hi Eus. we posted at the same time. I finally discovered my error. I had a textEdit and outputting the results to that textEdit. instead, i should have had a plainTextEdit and outputting the results to it.
  • Where do i find library files for windows

    10
    0 Votes
    10 Posts
    7k Views
    AlicemirrorA
    hi thambi03, your problem seems a problem over I spent a lot of time to understand what to do exactly in a general case. Please take a look to this (solved) thread, I hope it maybe useful for your case. http://developer.qt.nokia.com/forums/viewthread/5310/
  • How QtClucene work?

    3
    0 Votes
    3 Posts
    8k Views
    P
    There is no Qt-like interface for using QtLucene (=CLucene) in your app. What a pity!!! You have to compile+link the sources in your app and use CLucene API, like: int iFlags = lucene::document::Field::STORE_YES | lucene::document::Field::INDEX_TOKENIZED; lucene::document::Document doc; doc.add(*(_CLNEW lucene::document::Field(tFieldName, tFieldVal, iFlags))); writer.addDocument(&doc); search: lucene::analysis::WhitespaceAnalyzer analyzer; m_pQuery = lucene::queryParser::QueryParser::parse(a,_T("text"),&analyzer); lucene::search::IndexSearcher searcher(sDirOfIndex); m_pHits = searcher.search(m_pQuery);
  • How do i create my 1st Qt application

    7
    0 Votes
    7 Posts
    3k Views
    S
    Thanks for the information. i would love to hear more from you in future.
  • [SOLVED] how to get html bold to be inserted beside the selected word?

    4
    0 Votes
    4 Posts
    2k Views
    K
    i solved the textCursor issue. textCursor() should have been ui->textEdit->textCursor(). the selectedText() i can use to make the bold. this topic is solved.
  • QDataWidgetMapper and formatting date/time

    5
    0 Votes
    5 Posts
    4k Views
    G
    Just for the records: Unfortunately, SQLite does not provide a native date/time type. It is usually mapped into a string columns (like in your case) or an int or double typed column (usually holding seconds since epoch = 1970-01-01 00:00:00 GMT). PS: Ah, I see you got that string to date conversion already and just search for the proper way to inject that beast.
  • [Solved] QUdpSocket - create a connection

    12
    0 Votes
    12 Posts
    35k Views
    L
    You're welcome! If the problem is solved for you feel to edit the title of your inital post to '[Solved] QUdpSocket ...' so it is indicated as such.
  • 0 Votes
    3 Posts
    3k Views
    S
    Thanks Volker. I will test that next week. I am on leave
  • [NEWBIE] Parsing XML to strings

    20
    0 Votes
    20 Posts
    11k Views
    G
    Relative paths are resolved relative to the current directory. The dot "." represents the current directory. So our setCurrent is nothing else than "change the current directory to the current directory". I guess you want to set the current directory to that folder that holds the executable. If so, then use this: @ QDir::setCurrent(qApp->applicationDirPath()); @ Or better prepend your file path with that string.
  • [Moved] QtWebKit not responding to mouse events?

    3
    0 Votes
    3 Posts
    3k Views
    K
    [quote author="Volker" date="1313674766"]The web view has a parent and "suffers" from event propagation through that, but it is not in a layout and it may fail to receive some events this way.[/quote] Very good to know, thanks for the reply (and sorry for my late one). Kyle
  • ItemHasNoContents and boundingRect

    3
    0 Votes
    3 Posts
    2k Views
    I
    hi, i will try but there are perhaps some side-effects, I do not see! So, I ask to prevent this ;) But good idea, I will have a look at this method.
  • QPixmap .png in the same project directory

    4
    0 Votes
    4 Posts
    8k Views
    R
    @QPixmap* pixmap = new QPixmap("some.png");@ This is should work. Since you are not using the resource system, you must do one thing :) . Copy the image to build directory. According to "doc":http://doc.qt.nokia.com/latest/qpixmap.html#QPixmap-4 bq. If fileName contains a relative path (e.g. the filename only) the relevant file must be found relative to the runtime working directory.
  • Add more content to QMenu

    2
    0 Votes
    2 Posts
    3k Views
    S
    You can't add layouts to a QMenu, but you can add widgets containing menus to a QMenu using "QWidgetAction":http://doc.qt.nokia.com/latest/qwidgetaction.html.