Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~960 People Reached
Favorite Forums
Favorite Tags
java x 13
c++ x 3
Member Avatar for kjiu

Hello, I have to change this code (c++) on Java, can you help me. [CODE] QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName) { QFile file(fileName); if (!file.open(QFile::ReadOnly)) return new QStringListModel(completer); #ifndef QT_NO_CURSOR QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); #endif QStringList words; while (!file.atEnd()) { QByteArray line = file.readLine(); if (!line.isEmpty()) words << line.trimmed(); } #ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); #endif …

Member Avatar for masijade
0
81
Member Avatar for kjiu

Hj, Why does't appear at editor ? [CODE] public void date() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); java.util.Date date = new java.util.Date(); String datetime = dateFormat.format(date); this.editor.insertPlainText(datetime); }[/CODE]

Member Avatar for javaAddict
0
67
Member Avatar for kjiu

Hj, I have a problem how to do the print. example: I need to print a file. Kjiu

Member Avatar for kjiu
0
73
Member Avatar for kjiu

Hello, I have a problem :icon_confused: which is: [CODE]public void caseUpper() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toUpperCase(); insertPlainText(txt); } public void caseLower() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toLowerCase(); insertPlainText(txt); }[/CODE] I think the problem is that …

0
76
Member Avatar for kjiu

Hello, I have a problem.How I must add QMainWindow to my code, because the error is: [COLOR="Red"]Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method menuBar() is undefined for the type Calendar[/COLOR] [CODE]package Kalendarz; import com.trolltech.qt.gui.*; import com.trolltech.qt.core.*; import com.trolltech.qt.gui.QMenu; import com.trolltech.qt.gui.QAction; import com.trolltech.qt.gui.QApplication; import com.trolltech.qt.gui.QColor; import com.trolltech.qt.gui.QIcon; import …

Member Avatar for kjiu
0
139
Member Avatar for kjiu

Hello, I have the code: [CODE] public void color() { QColor color = QColorDialog.getColor(textEdit.textColor(), this); if (!color.isValid()) return; editor.setTextColor(color); } private void setupEditor() { QFont font = new QFont(); font.setFamily("Arial"); font.setFixedPitch(true); font.setPointSize(10); editor = new CodeEditor(); editor.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap); editor.setFont(font); new Highlighter(editor.document()); }[/CODE] but the error is : [B]The method setTextColor(QColor) is …

0
93
Member Avatar for kjiu

Hello, I have a problem which is this: [CODE]private void setupEditor() { QFont font = new QFont(); font.setFamily("Lucida Console"); font.setFixedPitch(true); font.setPointSize(10); textEdit = new QTextEdit(); textEdit.setLineWrapMode(QTextEdit.LineWrapMode.NoWrap); textEdit.setFont(font); new Highlighter(textEdit.document()); new CodeEditor(textEdit.document()); } public class CodeEditor extends QPlainTextEdit { public CodeEditor(QTextDocument textDocument) // public CodeEditor() { lineNumberArea = new LineNumberArea(this); blockCountChanged.connect(this, …

Member Avatar for kjiu
0
236
Member Avatar for kjiu

Hello, I have a problem (error) the error is : [QUOTE]a.c:354: error: ‘hton1’ was not declared in this scope [/QUOTE] and the code is : [url]http://wklej.org/id/52405/[/url] What is wrong ??

Member Avatar for ArkM
0
67
Member Avatar for kjiu

hi, I must do in Qt a "undo" ( QKeySequence::Undo ) but I don't know do this.Help me ex. [CODE] void MyWindow::Save () { QFile file (fileName); if (file.open (QFile::WriteOnly | QFile::Text)) { QTextStream out (&file); out << textEdit -> toPlainText (); statusBar() -> showMessage ("message",2000); } } [/CODE] but …

0
54
Member Avatar for kjiu

Hi, I have a problem because : this is my code [code] #include <iostream> #include <windows.h> // Sleep() #include <mmsystem.h> // mciSendString() using namespace std; // std::cout, std::cin int main() { mciSendString("open CDAudio", NULL, 0, NULL); Beep(440,1000); cout << "Opening CD-ROM door ..." << endl; mciSendString("set CDAudio door open", NULL, …

Member Avatar for TheBeast32
0
74